From 82b7787a2535568834213bc17ebdce53ef376973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oktay=20Can=20I=C5=9Fmar?= <241971@buas.nl> Date: Fri, 21 Feb 2025 15:41:50 +0100 Subject: [PATCH] Fix r2 and r3 using the incorrect noise variable. --- wavefront.cl | 2 +- wavefront2.cl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wavefront.cl b/wavefront.cl index da28819..d881085 100644 --- a/wavefront.cl +++ b/wavefront.cl @@ -187,7 +187,7 @@ void kernel Shade( global float4* accumulator, float2 noise0 = Noise( pixelIdx % height, pixelIdx / height, sampleIdx * 2 ); float2 noise1 = Noise( pixelIdx % height, pixelIdx / height, sampleIdx * 2 + 1 ); r0 = noise0.x, r1 = noise0.y; - r2 = noise0.x, r3 = noise0.y; + r2 = noise1.x, r3 = noise1.y; } else { diff --git a/wavefront2.cl b/wavefront2.cl index 1cc1349..f1ab312 100644 --- a/wavefront2.cl +++ b/wavefront2.cl @@ -213,7 +213,7 @@ void kernel Shade( global float4* accumulator, float2 noise0 = Noise( pixelIdx % height, pixelIdx / height, sampleIdx * 2 ); float2 noise1 = Noise( pixelIdx % height, pixelIdx / height, sampleIdx * 2 + 1 ); r0 = noise0.x, r1 = noise0.y; - r2 = noise0.x, r3 = noise0.y; + r2 = noise1.x, r3 = noise1.y; } else {