Various rendering improvements
This commit is contained in:
@@ -29,10 +29,6 @@ bool cont(vec2 T, vec2 v){
|
||||
id(T + vec2(step, 0) * v, base) || id(T + vec2(-step, 0) * v, base));
|
||||
}
|
||||
|
||||
float rand(vec2 co){
|
||||
return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
|
||||
}
|
||||
|
||||
void main() {
|
||||
|
||||
vec2 t = v_texCoord.xy;
|
||||
@@ -51,11 +47,11 @@ void main() {
|
||||
chance = 1.0-(u_progress-0.8)*5.0;
|
||||
}
|
||||
|
||||
if((mod(u_time / 1.5 + value, 20.0) < 5.0 && cont(t, v)) && rand(coords) < chance){
|
||||
if((mod(u_time / 1.5 + value, 20.0) < 5.0 && cont(t, v))){
|
||||
gl_FragColor = u_color;
|
||||
}else if(dst > (1.0-u_progress) * (center.x)){
|
||||
gl_FragColor = color;
|
||||
}else if((dst + 1.0 > (1.0-u_progress) * (center.x)) && color.a > 0.1 && rand(coords) < chance){
|
||||
}else if((dst + 1.0 > (1.0-u_progress) * (center.x)) && color.a > 0.1){
|
||||
gl_FragColor = u_color;
|
||||
}else{
|
||||
gl_FragColor = vec4(0.0);
|
||||
|
||||
Reference in New Issue
Block a user