Initial commit: Final state of the master project
This commit is contained in:
19
Research/shaders/RenderTexture.frag
Normal file
19
Research/shaders/RenderTexture.frag
Normal file
@@ -0,0 +1,19 @@
|
||||
#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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user