#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; } }