diff options
Diffstat (limited to 'assets/fragment.glsl')
-rw-r--r-- | assets/fragment.glsl | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/assets/fragment.glsl b/assets/fragment.glsl index 3e67b83..91d89a2 100644 --- a/assets/fragment.glsl +++ b/assets/fragment.glsl @@ -8,19 +8,13 @@ out vec4 oColor; uniform sampler2D materialTexture; //uniform sampler2DShadow prevDepth; -uniform sampler2DMS prevDepth; -//uniform sampler2D prevDepth; +//uniform sampler2DMS prevDepth; +uniform sampler2D prevDepth; void main() { //if (texture(prevDepth, vec3(fDepthTexCoord, gl_FragCoord.z + 0.000005)) == 1) - //if (gl_FragCoord.z + 0.000005 < texelFetch(prevDepth, ivec2(gl_FragCoord.xy), gl_SampleID).r) - if (gl_FragCoord.z + 0.000005 < texelFetch(prevDepth, ivec2(gl_FragCoord.xy), gl_SampleID).r) - oColor = vec4(fPos, 0.5); - //oColor = texelFetch(prevDepth, ivec2(gl_FragCoord.xy), gl_SampleID); - else + if (gl_FragCoord.z + 0.000005 >= texelFetch(prevDepth, ivec2(gl_FragCoord.xy), gl_SampleID).r) discard; - //if (texture(prevDepth, vec3(fDepthTexCoord, )) < 1) - // discard; - + oColor = vec4(fPos, 0.5); } |