hqlite.vert 518 B

1234567891011121314151617181920212223242526272829
  1. uniform mat4 u_mvpMatrix;
  2. uniform vec3 texSize;
  3. in vec4 a_position;
  4. in vec3 a_texCoord;
  5. out vec2 leftTop;
  6. out vec2 edgePos;
  7. out vec4 misc;
  8. out vec2 videoCoord;
  9. void main()
  10. {
  11. gl_Position = u_mvpMatrix * a_position;
  12. edgePos = a_texCoord.xy * vec2(1.0, 2.0);
  13. vec2 texStep = 1.0 / texSize.xy;
  14. leftTop = a_texCoord.xy - texStep;
  15. vec2 subPixelPos = edgePos * texSize.xy * vec2(1.0, 0.5);
  16. vec2 texStep2 = 2.0 * texStep;
  17. misc = vec4(subPixelPos, texStep2);
  18. #if SUPERIMPOSE
  19. videoCoord = a_texCoord.xz;
  20. #endif
  21. }