![]() |
Lysa
0.0
Lysa 3D Engine
|
Performs frustum culling on a list of mesh instances using a compute shader.
Public Member Functions | |
| FrustumCulling (bool isForScene, const DeviceMemoryArray &meshInstancesArray, const DeviceMemoryArray &instancesArray, pipeline_id pipelineId, const vireo::Buffer &input, const vireo::Buffer &inputCounter, const vireo::Buffer &output, const vireo::Buffer &outputCounter) | |
| void | dispatch (vireo::CommandList &commandList, uint32 drawCommandsCount, const float4x4 &view, const float4x4 &projection) |
| virtual | ~FrustumCulling () = default |
| FrustumCulling (FrustumCulling &) = delete | |
| FrustumCulling & | operator= (FrustumCulling &) = delete |
Static Public Member Functions | |
| static void | cleanup () |
| FrustumCulling | ( | bool | isForScene, |
| const DeviceMemoryArray & | meshInstancesArray, | ||
| const DeviceMemoryArray & | instancesArray, | ||
| pipeline_id | pipelineId, | ||
| const vireo::Buffer & | input, | ||
| const vireo::Buffer & | inputCounter, | ||
| const vireo::Buffer & | output, | ||
| const vireo::Buffer & | outputCounter | ||
| ) |
Constructs a new FrustumCulling pipeline.
| isForScene | True if the culling is for a scene, false for shadow maps. |
| meshInstancesArray | The array containing all mesh instance data. |
| instancesArray | The buffer containing the instances to cull. |
| pipelineId | The attached material pipeline id |
| input | The buffer containing the input indirect draw commands. |
| inputCounter | The buffer containing the counter for the total number of instances. |
| output | The buffer where the visible indirect draw commands will be written. |
| outputCounter | The buffer containing the counter for the number of visible instances. |
|
virtualdefault |
|
delete |
|
static |
Cleans up global resources shared by all FrustumCulling instances.
| void dispatch | ( | vireo::CommandList & | commandList, |
| uint32 | drawCommandsCount, | ||
| const float4x4 & | view, | ||
| const float4x4 & | projection | ||
| ) |
Dispatches the frustum culling compute shader.
| commandList | The command list to record the dispatch command into. |
| drawCommandsCount | The total number of draw commands to process. |
| view | The camera view matrix. |
| projection | The camera projection matrix. |
|
delete |