diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2022-01-16 22:03:56 +0100 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2022-01-16 22:03:56 +0100 |
| commit | ab39ab82b4dc60e4a181140dc91ee046e5daa6ea (patch) | |
| tree | b228c4b586f55b09e59e5572ee3dd8d2e81f1236 /shaders/compute.comp | |
| parent | c24761cfaf0d4c510504e6ddc08f6a8399295cac (diff) | |
Fix barriers
Diffstat (limited to 'shaders/compute.comp')
| -rw-r--r-- | shaders/compute.comp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/shaders/compute.comp b/shaders/compute.comp index c8257cf..6ca193e 100644 --- a/shaders/compute.comp +++ b/shaders/compute.comp @@ -270,6 +270,9 @@ ray generate_camera_ray(ivec2 coords, uint seed) { } void main() { + if (any(greaterThanEqual(gl_GlobalInvocationID.xy, uvec2(bufs.scene.width, bufs.scene.height)))) + return; + ivec2 coords = ivec2(gl_GlobalInvocationID.xy) * bufs.scene.downscale_factor; uint seed = uint(coords.x * uint(1973) + coords.y * uint(9277) + bufs.scene.sample_index * uint(26699)) | uint(1); |
