|
Nameless Engine
|
#include <LightingShaderResourceManager.h>
Public Member Functions | |
| std::optional< Error > | initialize (Renderer *pRenderer, const FrustumGridComputeShader::ComputeShader &frustumGridShader) |
| std::variant< bool, Error > | createLightIndexListsAndLightGrid (Renderer *pRenderer, size_t iTileCountX, size_t iTileCountY) |
| std::optional< Error > | queueExecutionForNextFrame (Renderer *pRenderer, FrameResource *pCurrentFrameResource, size_t iCurrentFrameResourceIndex, GpuResource *pGeneralLightingData, GpuResource *pPointLightArray, GpuResource *pSpotlightArray, GpuResource *pNonCulledPointLightsIndicesArray, GpuResource *pNonCulledSpotlightsIndicesArray) const |
Public Attributes | |
| std::unique_ptr< ComputeShaderInterface > | pComputeInterface |
| ShaderResources | resources |
| ThreadGroupCount | threadGroupCount |
| bool | bIsInitialized = false |
Static Public Attributes | |
| static const auto | sDepthTextureShaderResourceName = "depthTexture" |
| static const auto | sThreadGroupCountShaderResourceName = "threadGroupCount" |
| static const auto | sGlobalCountersIntoLightIndexListShaderResourceName |
Groups compute interface and its resources.
| std::variant< bool, Error > ne::LightingShaderResourceManager::ComputeShaderData::LightCullingComputeShader::ComputeShader::createLightIndexListsAndLightGrid | ( | Renderer * | pRenderer, |
| size_t | iTileCountX, | ||
| size_t | iTileCountY | ||
| ) |
(Re)creates light index lists and light grid if tile count was changed and binds them to the shader.
| pRenderer | Renderer. |
| iTileCountX | The current number of light grid tiles in the X direction. |
| iTileCountY | The current number of light grid tiles in the Y direction. |
true if resources were re-created, false if not, otherwise error if something went wrong. | std::optional< Error > ne::LightingShaderResourceManager::ComputeShaderData::LightCullingComputeShader::ComputeShader::initialize | ( | Renderer * | pRenderer, |
| const FrustumGridComputeShader::ComputeShader & | frustumGridShader | ||
| ) |
| std::optional< Error > ne::LightingShaderResourceManager::ComputeShaderData::LightCullingComputeShader::ComputeShader::queueExecutionForNextFrame | ( | Renderer * | pRenderer, |
| FrameResource * | pCurrentFrameResource, | ||
| size_t | iCurrentFrameResourceIndex, | ||
| GpuResource * | pGeneralLightingData, | ||
| GpuResource * | pPointLightArray, | ||
| GpuResource * | pSpotlightArray, | ||
| GpuResource * | pNonCulledPointLightsIndicesArray, | ||
| GpuResource * | pNonCulledSpotlightsIndicesArray | ||
| ) | const |
Called to queue compute shader to be executed on the next frame.
drawNextFrame function so that renderer's depth texture without multisampling pointer will not change.| pRenderer | Renderer. |
| pCurrentFrameResource | Current frame resource that will be used to submit the next frame. |
| iCurrentFrameResourceIndex | Index of the frame resource that will be used to submit the next frame. |
| pGeneralLightingData | GPU resource that stores general lighting information. |
| pPointLightArray | Array that stores all spawned point lights. |
| pSpotlightArray | Array that stores all spawned spotlights. |
| pNonCulledPointLightsIndicesArray | Array that stores indices of point lights in camera's frustum. |
| pNonCulledSpotlightsIndicesArray | Array that stores indices of spotlights in camera's frustum. |
| bool ne::LightingShaderResourceManager::ComputeShaderData::LightCullingComputeShader::ComputeShader::bIsInitialized = false |
true if initialize was called, false otherwise.
| std::unique_ptr<ComputeShaderInterface> ne::LightingShaderResourceManager::ComputeShaderData::LightCullingComputeShader::ComputeShader::pComputeInterface |
Compute interface.
| ShaderResources ne::LightingShaderResourceManager::ComputeShaderData::LightCullingComputeShader::ComputeShader::resources |
Shader resources that this compute shader "owns".
|
inlinestatic |
Name of the shader resource (name from shader code) that stores depth texture recorded on depth prepass.
|
inlinestatic |
Name of the shader resource (name from shader code) that stores global counters into various light index lists.
|
inlinestatic |
Name of the shader resource (name from shader code) that stores additional information that might not be available as built-in semantics.
| ThreadGroupCount ne::LightingShaderResourceManager::ComputeShaderData::LightCullingComputeShader::ComputeShader::threadGroupCount |
Stores the number of thread groups that we need to dispatch.