Merging changes from private branch
This commit is contained in:
@@ -15,16 +15,22 @@ uniform float u_time;
|
||||
varying vec2 v_texCoords;
|
||||
|
||||
void main(){
|
||||
vec2 c = v_texCoords.xy;
|
||||
vec2 coords = vec2(c.x * u_resolution.x + u_campos.x, c.y * u_resolution.y + u_campos.y);
|
||||
vec2 coords = v_texCoords * u_resolution + u_campos;
|
||||
|
||||
float btime = u_time / 5000.0;
|
||||
float noise = (texture2D(u_noise, (coords) / NSCALE + vec2(btime) * vec2(-0.9, 0.8)).r + texture2D(u_noise, (coords) / NSCALE + vec2(btime * 1.1) * vec2(0.8, -1.0)).r) / 2.0;
|
||||
|
||||
//TODO: pack noise texture
|
||||
vec2 c = v_texCoords + (vec2(
|
||||
texture2D(u_noise, (coords) / 170.0 + vec2(btime) * vec2(-0.9, 0.8)).r,
|
||||
texture2D(u_noise, (coords) / 170.0 + vec2(btime * 1.1) * vec2(0.8, -1.0)).r
|
||||
) - vec2(0.5)) * 8.0 / u_resolution;
|
||||
|
||||
vec4 color = texture2D(u_texture, c);
|
||||
|
||||
if(noise > 0.6){
|
||||
color.rgb = S2;
|
||||
}else if (noise > 0.54){
|
||||
}else if(noise > 0.54){
|
||||
color.rgb = S1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user