diff --git a/src/main/resources/assets/voxy/shaders/lod/hierarchical/screenspace.glsl b/src/main/resources/assets/voxy/shaders/lod/hierarchical/screenspace.glsl index cbada3bc..b37329a0 100644 --- a/src/main/resources/assets/voxy/shaders/lod/hierarchical/screenspace.glsl +++ b/src/main/resources/assets/voxy/shaders/lod/hierarchical/screenspace.glsl @@ -22,6 +22,9 @@ vec3 maxBB; vec2 size; float zThing; +uint BASE_IDX = gl_LocalInvocationID.x*8; +shared vec2[LOCAL_SIZE*8] screenPoints; + //Sets up screenspace with the given node id, returns true on success false on failure/should not continue //Accesses data that is setup in the main traversal and is just shared to here void setupScreenspace(in UnpackedNode node) { @@ -46,6 +49,7 @@ void setupScreenspace(in UnpackedNode node) { maxBB = minBB; zThing = -999999999999.0f; + screenPoints[BASE_IDX+0] = minBB.xy*0.5f+0.5f; for (int i = 1; i < 8; i++) { //NOTE!: cant this be precomputed and put in an array?? in the scene uniform?? vec4 pPoint = (VP*vec4(vec3((i&1)!=0,(i&2)!=0,(i&4)!=0)*(32< minSSS; + return size > minSSS; } \ No newline at end of file