24 lines
791 B
GLSL
24 lines
791 B
GLSL
#version 450 core
|
|
in vec2 texPos;
|
|
in vec2 distmask;
|
|
in vec2 pinch;
|
|
out vec4 fColor;
|
|
layout (binding = 1) uniform sampler2D screenTexture;
|
|
float x = 1 - min(1, dot(distmask,distmask));
|
|
float xab = abs(distmask.x);
|
|
float yab = abs(distmask.y);
|
|
void main()
|
|
{
|
|
fColor = (xab < 1 && yab < 1
|
|
//? vec4 (0.5*(distmask.x+1),0.5*(distmask.y+1),0,1)
|
|
? vec4 (0.5*(distmask.x+1),0.5*(distmask.y+1),0,1)
|
|
: texture(screenTexture, texPos));
|
|
//fColor = texture(screenTexture, (texPos + x*x*pinch));
|
|
//fColor = vec4
|
|
// ( texture(screenTexture, (texPos + x*x*pinch)).r
|
|
// , texture(screenTexture, (texPos - x*x*pinch)).g
|
|
// , texture(screenTexture, (texPos - x*x*(pinch.yx))).b
|
|
// , texture(screenTexture, texPos).a
|
|
// ) ;
|
|
}
|