testing?
This commit is contained in:
parent
ca0613b705
commit
3ad04282f0
1 changed files with 25 additions and 11 deletions
|
@ -148,14 +148,14 @@ void main()
|
|||
thermo = misc.x;
|
||||
}
|
||||
else { // wandering
|
||||
age += 0.02;
|
||||
age += 10.02;
|
||||
// age += 0.01;
|
||||
thermo = misc.x;
|
||||
}
|
||||
|
||||
if(vValid == 1 && target.w > 0 && length(target.xy - pos.xy) < 100) { // arrived
|
||||
age += 0.03;
|
||||
}
|
||||
// if(vValid == 1 && target.w > 0 && length(target.xy - pos.xy) < 100) { // arrived
|
||||
// age += 0.03;
|
||||
// }
|
||||
|
||||
// wandering
|
||||
vec3 force = vec3(0,0,0);
|
||||
|
@ -169,18 +169,32 @@ void main()
|
|||
if(age < 0.001) { // targetting
|
||||
target.w = 0;
|
||||
if(random3(pos).x > pow(length(texCoordVarying.st/4 - uHottest0.st)/5,16*16)+0) {
|
||||
vec3 H = uHottest3d0;
|
||||
H.x *= -1;
|
||||
H.z *= -1;
|
||||
vec2 h = uHottest1.st;
|
||||
vec4 hray = texture(u_world, h);
|
||||
float hdepth = -depth * 65535.0;
|
||||
if(hdepth == 0) hdepth = -0.01 * 65535.0;
|
||||
vec3 H = vec3(hray.xy * hdepth, hdepth);
|
||||
target.xyz = H + random3(pos);
|
||||
target.w = 1;
|
||||
// vec3 H = uHottest3d0;
|
||||
// H.x *= -1;
|
||||
// H.z *= -1;
|
||||
// target.xyz = H + random3(pos);
|
||||
// target.w = 1;
|
||||
}
|
||||
else if(random3(pos).x > pow(length(texCoordVarying.st/4 - uHottest1.st)/5,16*16)+0) {
|
||||
vec3 H = uHottest3d1;
|
||||
H.x *= -1;
|
||||
H.z *= -1;
|
||||
vec2 h = uHottest0.st;
|
||||
vec4 hray = texture(u_world, h);
|
||||
float hdepth = -depth * 65535.0;
|
||||
if(hdepth == 0) hdepth = -0.01 * 65535.0;
|
||||
vec3 H = vec3(hray.xy * hdepth, hdepth);
|
||||
target.xyz = H + random3(pos);
|
||||
target.w = 1;
|
||||
// vec3 H = uHottest3d1;
|
||||
// // H.x *= -1;
|
||||
// // H.z *= -1;
|
||||
// target.xyz = H + random3(pos);
|
||||
// target.w = 1;
|
||||
}
|
||||
// else if(random3(pos).x > pow(length(texCoordVarying.st - uColdest0.st)/20,16)+0) {
|
||||
// vec2 h = uColdest1.st;
|
||||
|
@ -211,7 +225,7 @@ void main()
|
|||
force.y = sin(th) * cos(phi);
|
||||
force.z = sin(phi);
|
||||
force *= 200 + 200 * simplex3d_fractal(vec3(texCoordVarying, 0.0));
|
||||
// force += (target.xyz - pos) * 0.35;
|
||||
// force += (target.xyz - pos) * 0.3;
|
||||
}
|
||||
|
||||
// damping
|
||||
|
|
Loading…
Reference in a new issue