SHARE
TWEET

Untitled

a guest Nov 13th, 2012 28 Never
  1. <script type="x-shader/x-vertex" id="vshPic">
  2. uniform vec4 uRect;
  3. uniform mat4 uOrtho;
  4. attribute vec2 aPoint;
  5. varying vec2 vTexCoord;
  6. void main(void)
  7. {
  8.         gl_Position = uOrtho * vec4(uRect.xy + uRect.zw * aPoint.xy, 0.0, 1.0);
  9.         vTexCoord = aPoint;
  10. }
  11. </script>
  12. <script type="x-shader/x-fragment" id="fshPic">
  13. precision mediump float;
  14. uniform sampler2D tTexture;
  15. varying vec2 vTexCoord;
  16. void main(void)
  17. {
  18.         gl_FragColor = texture2D(tTexture, vTexCoord);
  19. }
  20. </script>
RAW Paste Data
Top