From ab39ab82b4dc60e4a181140dc91ee046e5daa6ea Mon Sep 17 00:00:00 2001 From: ladevieq Date: Sun, 16 Jan 2022 22:03:56 +0100 Subject: Fix barriers --- shaders/compute.comp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'shaders') 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); -- cgit v1.3