| 87:874a02a683c5 | 88:6234b7ea48f3 |
|---|---|
| 1 #version 400 core | 1 #version 400 core |
| 2 | 2 |
| 3 layout(location = 0) in vec2 position; | 3 layout(location = 0) in vec2 position; |
| 4 out vec2 texcoord; | 4 out vec2 texcoord; |
| 5 out vec2 uvcoord; | |
| 5 | 6 |
| 6 uniform mat4 projection; | 7 uniform mat4 projection; |
| 7 uniform mat4 view; | 8 uniform mat4 view; |
| 8 uniform mat4 model; | 9 uniform mat4 model; |
| 9 uniform float depth; | 10 uniform float depth; |
| 11 void main(void) { | 12 void main(void) { |
| 12 vec4 pos = projection*view*model*vec4(position.x, position.y, 0, 1.0); | 13 vec4 pos = projection*view*model*vec4(position.x, position.y, 0, 1.0); |
| 13 // apply depth | 14 // apply depth |
| 14 pos.z = depth / -1024.0; | 15 pos.z = depth / -1024.0; |
| 15 gl_Position = pos; | 16 gl_Position = pos; |
| 17 uvcoord = position; | |
| 16 texcoord = vec2(model[0].x, model[1].y)*position; | 18 texcoord = vec2(model[0].x, model[1].y)*position; |
| 17 } | 19 } |