SHARE
TWEET

Untitled

a guest Jan 25th, 2013 27 Never
  1. //VERTEX
  2. attribute vec2 coord2d;
  3. void main(void)
  4. {
  5.   gl_Position = vec4(coord2d, 0.0, 1.0);
  6. }
  7.  
  8. //FRAGMENT
  9. void main(void)
  10. {
  11.   gl_FragColor[0] = gl_FragCoord.x/640.0;
  12.   gl_FragColor[1] = gl_FragCoord.y/480.0;
  13.   gl_FragColor[2] = 0.5;
  14. }
RAW Paste Data
Top