This commit is contained in:
micuat 2020-10-31 22:58:34 +01:00
parent 41f84881b1
commit f2bcafa2b9
3 changed files with 6 additions and 6 deletions

View file

@ -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;

View file

@ -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);

View file

@ -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);