Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 25th, 2013  |  syntax: C  |  size: 0.24 KB  |  views: 23  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }