Guest User

Untitled

a guest
Mar 17th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #version 430 core
  2. layout (location = 0) uniform sampler2D screenTexture;
  3. layout (location = 0) out vec3 OutputColor;
  4. in vec2 TexCoord;
  5.  
  6. void main()
  7. {
  8. OutputColor = texture(screenTexture, UV).rgb;
  9. }
  10.  
  11. void main()
  12. {
  13. TexCoord = (vertex.xy + vec2(1.0)) / 2.0;
  14.  
  15. // Strip the translation from the matrix
  16. mat4 InvRotVMatrix = vMatrix_Inverse;
  17. InvRotVMatrix[3][0] = 0;
  18. InvRotVMatrix[3][1] = 0;
  19. InvRotVMatrix[3][2] = 0;
  20.  
  21. vec4 WorldPos = (InvRotVMatrix * pMatrix_Inverse * vec4(vertex.xyz, 1));
  22. gl_Position = Proj * View[View_Index] * WorldPos;
  23. }
Add Comment
Please, Sign In to add comment