Implement sonic blast rendering effect.
This commit is contained in:
committed by
Gustas Kažukauskas
parent
3111d06fcf
commit
5da2f1ba8a
18
glsl/postprocess_textured_sonic.frag
Normal file
18
glsl/postprocess_textured_sonic.frag
Normal file
@@ -0,0 +1,18 @@
|
||||
#version {VERSION}
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
uniform sampler2D WorldTexture;
|
||||
uniform float Scale;
|
||||
|
||||
in vec2 vTexCoord;
|
||||
out vec4 fragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
if (dot(vTexCoord, vTexCoord) >= 1.0)
|
||||
discard;
|
||||
|
||||
fragColor = texelFetch(WorldTexture, ivec2(gl_FragCoord.xy + Scale * vTexCoord), 0);
|
||||
}
|
||||
Reference in New Issue
Block a user