SHOW:
|
|
- or go back to the newest paste.
| 1 | // passthrough.vert | |
| 2 | #version 120 | |
| 3 | ||
| 4 | attribute vec3 position; | |
| 5 | attribute vec4 incolor; | |
| 6 | ||
| 7 | varying vec3 vertex; | |
| 8 | varying vec4 color; | |
| 9 | ||
| 10 | void main() {
| |
| 11 | vertex = position; | |
| 12 | color = incolor; | |
| 13 | gl_Position = vec4(position, 1); | |
| 14 | } | |
| 15 | ||
| 16 | // passthrough.frag | |
| 17 | #version 120 | |
| 18 | ||
| 19 | varying vec3 vertex; | |
| 20 | varying vec4 color; | |
| 21 | ||
| 22 | ||
| 23 | void main() {
| |
| 24 | gl_FragColor = color; | |
| 25 | } |