![]() |
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, pipeline_id pipelineId) | |
| void | dispatch (vireo::CommandList &commandList, uint32 drawCommandsCount, const float4x4 &view, const float4x4 &projection, const vireo::Buffer &instances, const vireo::Buffer &input, const vireo::Buffer &output, const vireo::Buffer &counter) |
| uint32 | getDrawCommandsCount () const |
| virtual | ~FrustumCulling () = default |
| FrustumCulling (FrustumCulling &) = delete | |
| FrustumCulling & | operator= (FrustumCulling &) = delete |
Static Public Member Functions | |
| static void | cleanup () |
| FrustumCulling | ( | bool | isForScene, |
| const DeviceMemoryArray & | meshInstancesArray, | ||
| pipeline_id | pipelineId | ||
| ) |
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. |
| pipelineId | The attached material pipeline id |
|
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, | ||
| const vireo::Buffer & | instances, | ||
| const vireo::Buffer & | input, | ||
| const vireo::Buffer & | output, | ||
| const vireo::Buffer & | counter | ||
| ) |
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. |
| instances | The buffer containing the instances to cull. |
| input | The buffer containing the input indirect draw commands. |
| output | The buffer where the visible indirect draw commands will be written. |
| counter | The buffer containing the counter for the number of visible instances. |
| uint32 getDrawCommandsCount | ( | ) | const |
Gets the number of instances that passed the frustum culling.
|
delete |