Skip to content

Commit

Permalink
Fix for one block
Browse files Browse the repository at this point in the history
  • Loading branch information
sa2urami committed Nov 4, 2024
1 parent 3710d0c commit d045fe8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion prismarine-viewer/examples/Cube.comp.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fn main(@builtin(global_invocation_id) global_id: vec3<u32>) {
var depthPrev = atomicMin(&depthAtomic.locks[pos.x][pos.y], depth);
//depthPrev = atomicLoad(&depthAtomic.locks[pos.x][pos.y]);
if (depth < depthPrev) {
atomicStore(&occlusion.locks[pos.x][pos.y], index);
atomicStore(&occlusion.locks[pos.x][pos.y], index + 1);
}


Expand Down
2 changes: 1 addition & 1 deletion prismarine-viewer/examples/CubeSort.comp.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ fn main(@builtin(global_invocation_id) global_id: vec3<u32>) {

if (occlusionData != 0) {
let visibleIndex = atomicAdd(&drawParams.instanceCount, 1);
visibleCubes[visibleIndex].ptr = occlusionData;
visibleCubes[visibleIndex].ptr = occlusionData - 1;
}
}

0 comments on commit d045fe8

Please sign in to comment.