Wip on frame tracking,
add import statistics
This commit is contained in:
@@ -13,6 +13,7 @@ layout(binding = SCENE_UNIFORM_BINDING, std140) uniform SceneUniform {
|
||||
float screenH;
|
||||
uint renderQueueMaxSize;
|
||||
float minSSS;
|
||||
uint frameId;
|
||||
};
|
||||
|
||||
#import <voxy:lod/hierarchical/queue.glsl>
|
||||
@@ -31,6 +32,10 @@ layout(binding = RENDER_QUEUE_BINDING, std430) restrict buffer renderQueueStruct
|
||||
uint[] renderQueue;
|
||||
};
|
||||
|
||||
layout(binding = RENDER_TRACKER_BINDING, std430) restrict writeonly buffer renderTrackerArray {
|
||||
uint[] lastRenderFrame;
|
||||
};
|
||||
|
||||
void addRequest(inout UnpackedNode node) {
|
||||
//printf("Put node decend request");
|
||||
if (!hasRequested(node)) {
|
||||
@@ -61,6 +66,10 @@ void enqueueSelfForRender(in UnpackedNode node) {
|
||||
#ifdef IS_DEBUG
|
||||
debugRenderNodeQueue[atomicAdd(debugRenderNodeQueueIndex, 1)] = node.nodeId;
|
||||
#endif
|
||||
|
||||
//TODO: decide if it should be this node id, or the mesh id
|
||||
// for now do node id... think
|
||||
lastRenderFrame[getId(node)] = frameId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user