some diffuse added for funzies
This commit is contained in:
@@ -5,7 +5,16 @@ uniform sampler2D sim_texture;
|
||||
uniform float decay_factor;
|
||||
|
||||
void fragment() {
|
||||
float c = texture(sim_texture, UV).r;
|
||||
c = c * decay_factor;
|
||||
COLOR = vec4(c, c, c, 1.0);
|
||||
vec3 orig = texture(sim_texture, UV).rgb;
|
||||
float trail = texture(sim_texture, UV).g;
|
||||
|
||||
float sum = 0.0;
|
||||
for(int i=-1;i<=1;i++) {
|
||||
for(int j=-1;j<=1;j++) {
|
||||
sum += texture(sim_texture, UV).g;
|
||||
}
|
||||
}
|
||||
trail = sum / 9.0;
|
||||
trail = trail * decay_factor;
|
||||
COLOR = vec4(orig.r, trail, orig.b, 1.0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user