tab space conversion
This commit is contained in:
parent
1c1262af82
commit
a992558c77
|
|
@ -103,26 +103,26 @@ void vertex() {
|
||||||
|
|
||||||
void fragment() {
|
void fragment() {
|
||||||
vec2 uv = UV + texture(noise, UV * 0.1 - TIME * vec2(0, 0.01)).zx * 0.2;
|
vec2 uv = UV + texture(noise, UV * 0.1 - TIME * vec2(0, 0.01)).zx * 0.2;
|
||||||
|
|
||||||
float rainAmount = sin(TIME*.05)*10.0+0.7;
|
float rainAmount = sin(TIME*.05)*10.0+0.7;
|
||||||
rainAmount = 1.5;
|
rainAmount = 1.5;
|
||||||
|
|
||||||
float staticDrops = S(-.5, 1., rainAmount)*2.;
|
float staticDrops = S(-.5, 1., rainAmount)*2.;
|
||||||
float layer1 = S(.25, .5, rainAmount);
|
float layer1 = S(.25, .5, rainAmount);
|
||||||
float layer2 = S(.0, .5, rainAmount);
|
float layer2 = S(.0, .5, rainAmount);
|
||||||
|
|
||||||
vec2 c = Drops(-uv, TIME*.3, staticDrops, layer1, layer2);
|
vec2 c = Drops(-uv, TIME*.3, staticDrops, layer1, layer2);
|
||||||
vec2 e = vec2(.001, 0.);
|
vec2 e = vec2(.001, 0.);
|
||||||
float cx = Drops(-uv+e, TIME*.3, staticDrops, layer1, layer2).x;
|
float cx = Drops(-uv+e, TIME*.3, staticDrops, layer1, layer2).x;
|
||||||
float cy = Drops(-uv+e.yx, TIME*.3, staticDrops, layer1, layer2).x;
|
float cy = Drops(-uv+e.yx, TIME*.3, staticDrops, layer1, layer2).x;
|
||||||
vec2 n = vec2(cx-c.x, cy-c.x); // expensive normals
|
vec2 n = vec2(cx-c.x, cy-c.x); // expensive normals
|
||||||
n *= 0.3;
|
n *= 0.3;
|
||||||
|
|
||||||
vec2 flowing_water = texture(noise, UV * vec2(1, 0.3) - TIME * vec2(0.01, 0.2)).xy;
|
vec2 flowing_water = texture(noise, UV * vec2(1, 0.3) - TIME * vec2(0.01, 0.2)).xy;
|
||||||
flowing_water = texture(noise, UV + flowing_water - TIME * vec2(-0.02, 0.2)).yz;
|
flowing_water = texture(noise, UV + flowing_water - TIME * vec2(-0.02, 0.2)).yz;
|
||||||
flowing_water = flowing_water * vec2(0.03, 0.02);
|
flowing_water = flowing_water * vec2(0.03, 0.02);
|
||||||
vec3 col = texture(viewport_tex, flowing_water + SCREEN_UV + n).rgb;
|
vec3 col = texture(viewport_tex, flowing_water + SCREEN_UV + n).rgb;
|
||||||
|
|
||||||
ROUGHNESS = 0.1;
|
ROUGHNESS = 0.1;
|
||||||
SPECULAR = 1.0;
|
SPECULAR = 1.0;
|
||||||
ALBEDO = vec3(0.02);
|
ALBEDO = vec3(0.02);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue