From 385dd0dcf8fd003db604355341b00baa1fe1c1a0 Mon Sep 17 00:00:00 2001 From: Andreas Grois Date: Sun, 18 Mar 2018 16:24:50 +0100 Subject: Add option to skip short orbits. Add option to print debug output. --- BuddhaTest/Shaders/BuddhaCompute.glsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'BuddhaTest/Shaders/BuddhaCompute.glsl') diff --git a/BuddhaTest/Shaders/BuddhaCompute.glsl b/BuddhaTest/Shaders/BuddhaCompute.glsl index 025f5de..10ed77f 100644 --- a/BuddhaTest/Shaders/BuddhaCompute.glsl +++ b/BuddhaTest/Shaders/BuddhaCompute.glsl @@ -31,7 +31,7 @@ layout(packed, binding=5) restrict buffer statusBuffer uniform uint width; uniform uint height; -uniform uvec3 orbitLength; +uniform uvec4 orbitLength; uniform uint iterationsPerDispatch; @@ -156,9 +156,9 @@ bool isGoingToBeDrawn(in vec2 offset, in uint totalIterations, inout vec2 lastVa lastVal = compSqr(lastVal) + offset; if(dot(lastVal,lastVal) > 4.0) { - result = true; iterationsLeftThisFrame -= ((i+1)-doneIterations); doneIterations = i+1; + result = orbitLength.w < doneIterations; return true; } } -- cgit v1.2.3