diff options
author | Andreas Grois <andi@grois.info> | 2018-03-18 16:24:50 +0100 |
---|---|---|
committer | Andreas Grois <andi@grois.info> | 2018-03-18 16:24:50 +0100 |
commit | 385dd0dcf8fd003db604355341b00baa1fe1c1a0 (patch) | |
tree | 865d70f26341a019df54cf7492a5fb943eac3325 /BuddhaTest/Shaders/BuddhaCompute.glsl | |
parent | f3f67518d7eb74c868b523851ec482cd2177c3ce (diff) |
Add option to skip short orbits. Add option to print debug output.
Diffstat (limited to 'BuddhaTest/Shaders/BuddhaCompute.glsl')
-rw-r--r-- | BuddhaTest/Shaders/BuddhaCompute.glsl | 4 |
1 files changed, 2 insertions, 2 deletions
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; } } |