shaderTextureDepth.frag 280 Bytes
Newer Older
1 2
// ShaderTextureDepth::fragmentShaderText

kvanhoey's avatar
kvanhoey committed
3
PRECISION;
4 5 6 7 8 9
VARYING_FRAG vec2 texCoord;
uniform sampler2D textureUnit;
uniform sampler2D textureDepthUnit;
FRAG_OUT_DEF;
void main()
{
Sylvain Thery's avatar
Sylvain Thery committed
10 11 12
	gl_FragDepth = TEXTURE2D(textureDepthUnit,texCoord).r;
	FRAG_OUT = TEXTURE2D(textureUnit,texCoord);
}