slugsoft @slugsoft.dev · Nov 19

Everything with a shadow is drawn on two render targets. One is darkened and blurred, the other is kept normal. Then I layer them. I think it could be more efficient but... it runs fine.

13 likes 2 replies

?

Replies

Descenacre · Nov 20

You could manage the effect with a single one by adding something simple like vec4 color = [the blurry shadow texture] if (color.a > 0.5) { color.a = 1.0; } gl_FragColor = color; to the end of whatever shader you were using (depending on what language the shader is in) ^_^

Yongmin Park · Nov 19

yo thanks for an explanation