Nameless Engine
Loading...
Searching...
No Matches
ne::LightingShaderResourceManager::ComputeShaderData::FrustumGridComputeShader::ComputeShader Struct Reference

#include <LightingShaderResourceManager.h>

Public Member Functions

std::optional< Errorinitialize (Renderer *pRenderer)
 
std::optional< ErrorupdateDataAndSubmitShader (Renderer *pRenderer, const std::pair< unsigned int, unsigned int > &renderTargetSize, const glm::mat4 &inverseProjectionMatrix)
 

Public Attributes

std::unique_ptr< ComputeShaderInterfacepComputeInterface
 
ShaderResources resources
 
unsigned int iLastUpdateTileCountX = 0
 
unsigned int iLastUpdateTileCountY = 0
 
bool bIsInitialized = false
 

Static Public Attributes

static const auto sComputeInfoShaderResourceName = "computeInfo"
 
static const auto sScreenToViewDataShaderResourceName = "screenToViewData"
 
static const auto sCalculatedFrustumsShaderResourceName = "calculatedFrustums"
 

Detailed Description

Groups compute interface and its resources.

Member Function Documentation

◆ initialize()

std::optional< Error > ne::LightingShaderResourceManager::ComputeShaderData::FrustumGridComputeShader::ComputeShader::initialize ( Renderer pRenderer)

Creates compute interface and resources and binds them to the interface.

Parameters
pRendererRenderer.
Returns
Error if something went wrong.

◆ updateDataAndSubmitShader()

std::optional< Error > ne::LightingShaderResourceManager::ComputeShaderData::FrustumGridComputeShader::ComputeShader::updateDataAndSubmitShader ( Renderer pRenderer,
const std::pair< unsigned int, unsigned int > &  renderTargetSize,
const glm::mat4 &  inverseProjectionMatrix 
)

Updates data used by shaders.

Parameters
pRendererRenderer.
renderTargetSizeSize of the underlying render image in pixels.
inverseProjectionMatrixInverse projection matrix of the active camera.
Returns
Error if something went wrong.

Member Data Documentation

◆ bIsInitialized

bool ne::LightingShaderResourceManager::ComputeShaderData::FrustumGridComputeShader::ComputeShader::bIsInitialized = false

true if initialize was called, false otherwise.

◆ iLastUpdateTileCountX

unsigned int ne::LightingShaderResourceManager::ComputeShaderData::FrustumGridComputeShader::ComputeShader::iLastUpdateTileCountX = 0

Total number of tiles in the X direction that was used when updateDataAndSubmitShader was called the last time.

◆ iLastUpdateTileCountY

unsigned int ne::LightingShaderResourceManager::ComputeShaderData::FrustumGridComputeShader::ComputeShader::iLastUpdateTileCountY = 0

Total number of tiles in the X direction that was used when updateDataAndSubmitShader was called the last time.

◆ pComputeInterface

std::unique_ptr<ComputeShaderInterface> ne::LightingShaderResourceManager::ComputeShaderData::FrustumGridComputeShader::ComputeShader::pComputeInterface

Shader Compute.

◆ resources

ShaderResources ne::LightingShaderResourceManager::ComputeShaderData::FrustumGridComputeShader::ComputeShader::resources

Shader resources.

◆ sCalculatedFrustumsShaderResourceName

const auto ne::LightingShaderResourceManager::ComputeShaderData::FrustumGridComputeShader::ComputeShader::sCalculatedFrustumsShaderResourceName = "calculatedFrustums"
inlinestatic

Name of the shader resource (name from shader code) that stores calculated frustums.

◆ sComputeInfoShaderResourceName

const auto ne::LightingShaderResourceManager::ComputeShaderData::FrustumGridComputeShader::ComputeShader::sComputeInfoShaderResourceName = "computeInfo"
inlinestatic

Name of the shader resource (name from shader code) that stores additional data for compute shader.

◆ sScreenToViewDataShaderResourceName

const auto ne::LightingShaderResourceManager::ComputeShaderData::FrustumGridComputeShader::ComputeShader::sScreenToViewDataShaderResourceName = "screenToViewData"
inlinestatic

Name of the shader resource (name from shader code) that stores data to convert from screen space to view space.


The documentation for this struct was generated from the following files: