Files
CDAG/Research/shaders/RenderTexture.frag

19 lines
287 B
GLSL

#version 330 core
in vec2 UV;
out vec3 color;
uniform sampler2D depthTexture;
uniform sampler2D renderTexture;
uniform bool showDepth = false;
void main(){
if (showDepth)
{
color = vec3(texture2D( depthTexture, UV ).r ) ;
} else
{
color = texture(renderTexture, UV).xyz;
}
}