Advertisement
chunkyguy

Shader code

Jan 15th, 2012
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. //texture.vsh
  2.  
  3. attribute vec4 a_position;
  4. attribute vec2 a_texCoord;
  5. varying vec2 v_texCoord;
  6.  
  7. void main(void){
  8.     gl_Position = a_position;
  9.     v_texCoord = a_texCoord;
  10. }
  11.  
  12. //texture.fsh
  13. precision mediump float;
  14. varying vec2 v_texCoord;
  15. uniform sampler2D s_texture;
  16.  
  17. void main(void){
  18.     gl_FragColor = texture2D(s_texture, v_texCoord);
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement