hdrFiltering.vertex.fx 299 B

12345678910111213141516
  1. // Attributes
  2. attribute vec2 position;
  3. // Output
  4. varying vec3 direction;
  5. // Uniforms
  6. uniform vec3 up;
  7. uniform vec3 right;
  8. uniform vec3 front;
  9. void main(void) {
  10. mat3 view = mat3(up, right, front);
  11. direction = view * vec3(position, 1.0);
  12. gl_Position = vec4(position, 0.0, 1.0);
  13. }