25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
478 B

  1. #include "ccParamIO.glsl"
  2. attribute vec4 a_position;
  3. attribute vec2 a_texCoord;
  4. attribute vec4 a_color;
  5. #ifdef OPENGL_ES
  6. varying lowp vec4 v_fragmentColor;
  7. varying mediump vec2 v_texCoord;
  8. #else
  9. varying vec4 v_fragmentColor;
  10. varying vec2 v_texCoord;
  11. #endif
  12. uniform mat4 u_uvTransform;
  13. void main()
  14. {
  15. gl_Position = CC_MVPMatrix * a_position;
  16. v_fragmentColor = a_color;
  17. vec4 uv = u_uvTransform * vec4(a_texCoord.x , a_texCoord.y , 0 , 1);
  18. v_texCoord = uv.xy;
  19. }