diff options
author | Andreas Grois <andi@grois.info> | 2018-03-25 12:28:03 +0200 |
---|---|---|
committer | Andreas Grois <andi@grois.info> | 2018-03-25 12:28:03 +0200 |
commit | 1b0905fd7367d599b2fd875b1c456005c1e7bb31 (patch) | |
tree | 10a29006810a7485e97f16495c352abb8cabb8d2 | |
parent | b8082e3ef23758ce0f3a541aecf5a87efe3c1d53 (diff) | |
parent | 06c38f755d6aca9a2c43e206f640422c477322bc (diff) |
Merge branch 'master' into feature/04-zoomability
-rw-r--r-- | BuddhaTest/Shaders/BuddhaCompute.glsl | 6 | ||||
-rw-r--r-- | BuddhaTest/Shaders/BuddhaFragment.glsl | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/BuddhaTest/Shaders/BuddhaCompute.glsl b/BuddhaTest/Shaders/BuddhaCompute.glsl index 91c1195..ebfdb29 100644 --- a/BuddhaTest/Shaders/BuddhaCompute.glsl +++ b/BuddhaTest/Shaders/BuddhaCompute.glsl @@ -70,7 +70,7 @@ void addToColorOfCell(uvec2 cell, uvec3 toAdd) uvec2 getCell(vec2 complex) { - vec2 uv = clamp(vec2((complex.x+2.5)/3.5, (abs(complex.y))),vec2(0.0),vec2(1.0)); + vec2 uv = clamp(vec2((complex.x+2.875)/4.025, (abs(complex.y/1.15))),vec2(0.0),vec2(1.0)); return uvec2(width * uv.x, height * uv.y); } @@ -236,7 +236,7 @@ bool drawOrbit(in vec2 offset, in uint totalIterations, inout vec2 lastVal, inou doneIterations = i+1; return true; //done. } - if(lastVal.x > -2.5 && lastVal.x < 1.0 && lastVal.y > -1.0 && lastVal.y < 1.0) + if(lastVal.x > -2.875 && lastVal.x < 1.15 && lastVal.y > -1.15 && lastVal.y < 1.15) { addToColorAt(lastVal,uvec3(i < orbitLength.r,i < orbitLength.g,i < orbitLength.b)); } @@ -253,7 +253,7 @@ vec2 getCurrentOrbitOffset(const uint orbitNumber, const uint totalWorkers, cons seed = (seed ^ (intHash(orbitNumber+totalWorkers))); float y = hash1(seed,seed); vec2 random = vec2(x,y); - return vec2(random.x * 3.5-2.5,random.y*1.55); + return vec2(random.x * 4.025-2.875,random.y*1.8); } void main() { diff --git a/BuddhaTest/Shaders/BuddhaFragment.glsl b/BuddhaTest/Shaders/BuddhaFragment.glsl index 52a0354..ad184e6 100644 --- a/BuddhaTest/Shaders/BuddhaFragment.glsl +++ b/BuddhaTest/Shaders/BuddhaFragment.glsl @@ -28,7 +28,6 @@ uvec3 getColorAt(vec2 fragCoord) void main(){ uvec3 totalCount = getColorAt(uv); - vec3 scaled = pow(min(vec3(1.0),colorScale*vec3(totalCount)/max(float(brightness),1.0)),vec3(gamma)); color = scaled; } |