-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scene Management in Compute #62
Comments
GPU Culling Compute ShaderPer-view cull (frustum and possibly occlusion) the meshbuffers of chosen LoD meshes of all the instances. Input:
Optimization opportunities:
Output:
Forward Compatibility:
|
MDI Compaction Compute ShaderInput:
Output:
|
Bone MVP*BindPose ComputationTODO Compute Skinning (Optional)Need to allocate a total copy of all vertices of a skinned meshbuffer from a dedicated buffer range meant for vertices and normals. To save space we can alias a LoDs to the same allocation (as which LoD is rendered is exclusive, unless you've got two viewing cameras), therefore we should allow for a flag specifying whether all views must use the same LoD (aliased) or not. Compute skinning recomputes the vertex positions and normals (fresh position and normal buffer per instance). The skinning must always be an indirect dispatch, we should only skin potentially visible instances (at least frustum cull them). Input:
Output:
Optimization opportunities (in order of ease):
Forward Compatibility:
|
almost done |
Description
Description of the related problem
Solution proposal
Compute Shader for position update decoupled from framerate [REWRITE the WRITE UP]
Position Update Dispatch
Takes the requested relative user-control transform updates, and animation blends scheduled for this frame (animation blending rate is different per-node, and supplied from a buffer).
The user supplied relative matrices overwrite the target nodes' relative transforms (blend manager's relative transform modifications are pushed to
TransformTreeManager
before user sourced CPU relative transform modifications are pushed toTransformTreeManager
).The first blend for a node overwrites the target node relative transform, the following accumulate.
We map 1 invocation : 1 node, not 1 invocation : 1 blend.
Therefore the blendlists need to be kept together by nodeID via
https://github.com/Devsh-Graphics-Programming/Nabla/blob/scene_manager/include/nbl/builtin/glsl/transform_tree/modification_request_range.glsl
Nodes without parents should write to their global matrices directly as an optimization if possible.
Input:
Output:
Improvement: Reduce blend rates for nodes that have small projections on the screen (far away), out of frustums, not visible by occlusion culling.
At this point a question poses itself, do we control the Animation Rate via comparing the
current_timestamp-last_modified_timestamp>animation_rate_delta
(which requires us to launch an invocation for every single animated node), or do we somehow bin/sort the nodes by update frequency (how!?) and dispatch only what we need ( would need a prefix sum dispatch before the main one).Best thing would be to treat this like a particle system (have animation records jump between buckets), but then it makes it pretty hard to remove/pause/suspect/end already added animations (requires parallel searching in the deletion list).
Manual control of skeleton nodes is achieved via not having any animation blends.
Global matrix override achieved via not having/detaching from a parent.
Bind pose matrices handled via adding pseudo-children.
Compute Shader for bone translation
The text was updated successfully, but these errors were encountered: