Working radial distortion
This commit is contained in:
@@ -4,14 +4,18 @@ layout (location = 1) in vec2 rad1;
|
||||
layout (location = 2) in vec2 rad2;
|
||||
layout (location = 3) in float factor;
|
||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||
out vec2 vCen;
|
||||
out vec2 vRad1;
|
||||
out vec2 vRad2;
|
||||
out float vFactor;
|
||||
void main()
|
||||
{
|
||||
gl_Position = theMat * vec4(pos,0,1);
|
||||
//gl_Position = vec4(1,1,0,1);
|
||||
gl_Position = vec4(0,0,0,1);
|
||||
vCen = (theMat * vec4(pos,0,1)).xy;
|
||||
//vCen = (theMat * vec4(0,0,0,1)).xy;
|
||||
vRad1 = (theMat * vec4(rad1,0,1)).xy;
|
||||
//vRad1 = (theMat * vec4(0,200,0,1)).xy;
|
||||
vRad2 = (theMat * vec4(rad2,0,1)).xy;
|
||||
//vRad2 = (theMat * vec4(200,0,0,1)).xy;
|
||||
vFactor = factor;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user