Implement multiple radial distortion rendering

This commit is contained in:
2021-07-10 14:04:01 +02:00
parent 1c519259a1
commit c63b293ea5
8 changed files with 75 additions and 22 deletions
-7
View File
@@ -6,10 +6,7 @@ in vec2 vcpos;
out vec4 fColor;
layout (binding = 1) uniform sampler2D screenTexture;
float f ( float x) {
//return max (1, 1 / (2 * x + 0.5)) ;
//return min (1, x) ;
if (x>1) {return 1;} else {return (1-gfactor)*x + gfactor;}
//if (x>1) {return 1;} else {return 0.5;}
}
void main()
{
@@ -18,8 +15,4 @@ void main()
, 0.5+0.5 *( vcpos + t * (texPos - vcpos))
)
);
//vec4 tColor = vec4(texture(screenTexture , cpos + (texPos - cpos)) );
//float t = distance(cenPos,texPos);
//fColor = vec4(tColor.xy,t,tColor.w);
//fColor = tColor;
}