From f2bcafa2b9e8bfd35aafed1545946c083011ae17 Mon Sep 17 00:00:00 2001 From: micuat Date: Sat, 31 Oct 2020 22:58:34 +0100 Subject: [PATCH] hmmmm --- zoneb/bin/data/shaders/particles/draw.frag | 2 +- zoneb/bin/data/shaders/particles/update.frag | 8 ++++---- zoneb/src/ofApp.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/zoneb/bin/data/shaders/particles/draw.frag b/zoneb/bin/data/shaders/particles/draw.frag index 648cc3e..97edda2 100755 --- a/zoneb/bin/data/shaders/particles/draw.frag +++ b/zoneb/bin/data/shaders/particles/draw.frag @@ -118,7 +118,7 @@ void main() float alpha = min(1, max(0, 1 - pow(gAge,4))); if(uEnergy > 0) { // alpha = 1; - alpha *= 0.15; + alpha *= 0.1; } else { alpha *= 0.1; diff --git a/zoneb/bin/data/shaders/particles/update.frag b/zoneb/bin/data/shaders/particles/update.frag index 9874256..2fb69fe 100755 --- a/zoneb/bin/data/shaders/particles/update.frag +++ b/zoneb/bin/data/shaders/particles/update.frag @@ -195,7 +195,7 @@ void main() if(age < 0.001) { // targetting target.w = 0; - if(random3(pos + vec3(u_time, 0, 0)).x > 8*pow(length(texCoordVarying.st/fraction - uHottest0.st)/50,1)) { + if(random3(pos).x > mod(u_time*0.1+random3(pos).y,1) + pow(max(0,length(texCoordVarying.st/fraction - uHottest0.st + random3(pos).xy*5)/50),1)) { vec2 h = uHottest1.st; vec4 hray = texture(u_world, h); float hdepth = -depth * 65535.0; @@ -205,7 +205,7 @@ void main() target.w = 1; thermo += random3(pos).y * 0.2 - 0.1; } - else if(random3(pos + vec3(u_time, 0, 0)).x > 8*pow(length(texCoordVarying.st/fraction - uHottest1.st)/50,1)) { + else if(random3(pos).x > mod(u_time*0.1+random3(pos).y,1) + 2*pow(max(0,length(texCoordVarying.st/fraction - uHottest1.st + random3(pos).xy*5)/50),1)) { vec2 h = uHottest0.st; vec4 hray = texture(u_world, h); float hdepth = -depth * 65535.0; @@ -220,8 +220,8 @@ void main() if(target.w > 0) { // go to target float th = atan(-pos.y + target.y, -pos.x + target.x); float phi = atan(-pos.z + target.z, length(target.xy-pos.xy)); - th += 3.1415 / 1 * simplex3d_fractal(vec3(pos.xyz * 0.01) + vec3(u_time, 0, 0)); - phi += 3.1415 / 1 * simplex3d_fractal(pos.xyz * 0.01); + th += 3.1415 * 1 * simplex3d_fractal(vec3(pos.xyz * 0.01) + vec3(u_time, 0, 0)); + phi += 3.1415 * 1 * simplex3d_fractal(pos.xyz * 0.01); force.x = cos(th) * cos(phi); force.y = sin(th) * cos(phi); force.z = sin(phi); diff --git a/zoneb/src/ofApp.cpp b/zoneb/src/ofApp.cpp index f2007cc..158e776 100644 --- a/zoneb/src/ofApp.cpp +++ b/zoneb/src/ofApp.cpp @@ -135,7 +135,7 @@ void ofApp::setupGui() gui.add(v4l2Delay.setup("thermo delay", 0, 0, 59)); gui.add(captureDeviceName.setup("device", "video3")); gui.add(blendAdd.setup("blend add", false)); - gui.add(renderTimes.setup("render times", 1, 1, 30)); + gui.add(renderTimes.setup("render times", 0, 0, 30)); gui.add(traceTimes.setup("trace times", 3, 1, 30)); gui.loadFromFile("settings.xml"); gui.setPosition(10, 10);