invisible
annotate data/shaders/invisible.v.glsl @ 23:b50ad2711f5f
fixed fov aspect projection et c, added shaders
todo: segmentation
author | Eleni Maria Stea <eleni@mutantstargoat.com> |
---|---|
date | Sat, 16 Nov 2013 23:29:15 +0200 |
parents | 531a814d4d6b |
children | 8b81571dd4dd |
rev | line source |
---|---|
eleni@23 | 1 uniform sampler2D depth_tex; |
eleni@23 | 2 |
eleni@23 | 3 void main() |
eleni@23 | 4 { |
eleni@23 | 5 float depth = texture2D(depth_tex, gl_MultiTexCoord0.xy).r; |
eleni@23 | 6 vec4 vpos = gl_Vertex; |
eleni@23 | 7 vpos.z = depth; |
eleni@23 | 8 |
eleni@23 | 9 gl_Position = gl_ModelViewProjectionMatrix * vpos; |
eleni@23 | 10 gl_TexCoord[0] = gl_MultiTexCoord0; |
eleni@23 | 11 } |