diff options
| author | gabrielsteglich <63128571+gabrielsteglich@users.noreply.github.com> | 2026-11-22 01:13:30 -0300 |
|---|---|---|
| committer | gabrielsteglich <63128571+gabrielsteglich@users.noreply.github.com> | 2026-11-22 01:13:30 -0300 |
| commit | cce77b65ef0bab7bfcad431d0fc96c9c122b67c6 (patch) | |
| tree | bd74f63a7a6424fb43192da8b03ce104c514fb0e /runtime/src/binary_occlusion.comp | |
| parent | 4a36bb19979b611f525d027f92e0fefad1626546 (diff) | |
Normalize binary occlusion results in Vulkan replay
Diffstat (limited to 'runtime/src/binary_occlusion.comp')
| -rw-r--r-- | runtime/src/binary_occlusion.comp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/runtime/src/binary_occlusion.comp b/runtime/src/binary_occlusion.comp new file mode 100644 index 000000000..30f43ebc6 --- /dev/null +++ b/runtime/src/binary_occlusion.comp | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | #version 450 | ||
| 2 | |||
| 3 | layout(local_size_x = 64) in; | ||
| 4 | layout(set = 0, binding = 0, std430) buffer QueryResults { uvec2 results[]; }; | ||
| 5 | layout(push_constant) uniform ResolveRange { uint count; }; | ||
| 6 | |||
| 7 | void main() { | ||
| 8 | uint index = gl_GlobalInvocationID.x; | ||
| 9 | if (index < count) { | ||
| 10 | uvec2 raw = results[index]; | ||
| 11 | results[index] = uvec2(uint((raw.x | raw.y) != 0u), 0u); | ||
| 12 | } | ||
| 13 | } | ||