Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vertex shader:
- #version 120
- attribute vec3 coord2d;
- attribute vec3 v_colour;
- varying vec3 f_colour;
- uniform mat4 mvp;
- void main(void) {
- gl_Position = mvp * vec4(coord2d, 1.0);
- f_colour=v_colour;
- }
- Fragment shader:
- #version 120
- varying vec3 f_colour;
- void main(void) {
- gl_FragColor = vec4(f_colour.x, f_colour.y, f_colour.z, 1.0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement