simple.vert 540 B

12345678910111213141516171819202122232425
  1. uniform mat4 u_mvpMatrix;
  2. uniform vec3 texSize;
  3. uniform vec3 texStepX; // = vec3(vec2(1.0 / texSize.x), 0.0);
  4. uniform vec4 cnst; // = vec4(scan_a, scan_b, scan_c, alpha);
  5. in vec4 a_position;
  6. in vec3 a_texCoord;
  7. out vec2 scaled;
  8. out vec3 misc;
  9. out vec2 videoCoord;
  10. void main()
  11. {
  12. float alpha = cnst.w;
  13. gl_Position = u_mvpMatrix * a_position;
  14. misc = vec3((vec2(0.5) - vec2(1.0, 0.0) * alpha) * texStepX.x, a_texCoord.y);
  15. scaled = a_texCoord.xy * texSize.xy + vec2(0.0, 0.5);
  16. #if SUPERIMPOSE
  17. videoCoord = a_texCoord.xz;
  18. #endif
  19. }