SHARE
TWEET

Untitled

a guest Jan 25th, 2013 119 Never
  1. (fragment.glsl)
  2. varying vec3 f_color;
  3. void main(void) {
  4.   gl_FragColor = vec4(f_color.x, f_color.y, f_color.z, 1.0);
  5. }
  6.  
  7.  
  8. (vertex.glsl)
  9. attribute vec3 coord3d;
  10. attribute vec3 v_color;
  11. varying vec3 f_color;
  12. void main(void) {
  13.   gl_Position = vec4(coord3d, 1.0);
  14.   f_color = v_color;
  15. }
RAW Paste Data
Top