aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Grois <andi@grois.info>2018-03-16 07:23:49 +0100
committerAndreas Grois <andi@grois.info>2018-03-16 07:23:49 +0100
commit94de8caf4bc3edc87d4b9f92143efd4c6c0f6012 (patch)
treed91561dc67fd373317c04dfac4d925d6a4260471
parent627aa610fc93398ac51129096ce8fb30731af341 (diff)
Fix wrong seed calculation, now I've had some sleep.
-rw-r--r--BuddhaTest/Shaders/BuddhaCompute.glsl3
1 files changed, 1 insertions, 2 deletions
diff --git a/BuddhaTest/Shaders/BuddhaCompute.glsl b/BuddhaTest/Shaders/BuddhaCompute.glsl
index ddcbace..bca9025 100644
--- a/BuddhaTest/Shaders/BuddhaCompute.glsl
+++ b/BuddhaTest/Shaders/BuddhaCompute.glsl
@@ -193,8 +193,7 @@ void main() {
uvec3 totalWorkersPerDimension = gl_WorkGroupSize * gl_NumWorkGroups;
uint totalWorkers = totalWorkersPerDimension.x*totalWorkersPerDimension.y*totalWorkersPerDimension.z;
- //TODO: Check this once I've had some sleep. Anyhow, I'm using 1D, so y and z components globalInfocationID should be zero anyhow.
- uint seed = iterationCount * totalWorkers + gl_GlobalInvocationID.x + gl_GlobalInvocationID.y*totalWorkersPerDimension.x + gl_GlobalInvocationID.z*(totalWorkersPerDimension.x + totalWorkersPerDimension.y);
+ uint seed = iterationCount * totalWorkers + gl_GlobalInvocationID.x + gl_GlobalInvocationID.y*totalWorkersPerDimension.x + gl_GlobalInvocationID.z*(totalWorkersPerDimension.x * totalWorkersPerDimension.y);
uint yDecoupler = iterationCount;
vec2 offset = getStartValue(seed, yDecoupler);