Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #version 430 core
- layout (location = 0) uniform sampler2D screenTexture;
- layout (location = 0) out vec3 OutputColor;
- in vec2 TexCoord;
- void main()
- {
- OutputColor = texture(screenTexture, UV).rgb;
- }
- void main()
- {
- TexCoord = (vertex.xy + vec2(1.0)) / 2.0;
- // Strip the translation from the matrix
- mat4 InvRotVMatrix = vMatrix_Inverse;
- InvRotVMatrix[3][0] = 0;
- InvRotVMatrix[3][1] = 0;
- InvRotVMatrix[3][2] = 0;
- vec4 WorldPos = (InvRotVMatrix * pMatrix_Inverse * vec4(vertex.xyz, 1));
- gl_Position = Proj * View[View_Index] * WorldPos;
- }
Add Comment
Please, Sign In to add comment