mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2026-10-12 02:08:16 +08:00
make greenscreen invert work with infinite distance
This commit is contained in:
1 parent
a006877513
commit
7cab950c51
1 file changed
+12
-5
@@ -200,12 +200,19 @@ void doCameraGridLines(inout vec3 color, in vec2 texcoord){
|
||||
if(linearDistance > 0.0) color = vec3(COLOR_KEY_R,COLOR_KEY_G,COLOR_KEY_B);
|
||||
|
||||
#else
|
||||
// composite
|
||||
#ifdef USING_LOD_MOD
|
||||
if(min(texelFetch(LOD_DEPTHTEX0,ivec2(gl_FragCoord.xy),0).r,texelFetch(depthtex0,ivec2(gl_FragCoord.xy),0).r) >= 1.0) color = vec3(COLOR_KEY_R,COLOR_KEY_G,COLOR_KEY_B);
|
||||
#ifdef COLOR_KEY_INVERT
|
||||
#ifdef USING_LOD_MOD
|
||||
if(min(texelFetch(LOD_DEPTHTEX0,ivec2(gl_FragCoord.xy),0).r,texelFetch(depthtex0,ivec2(gl_FragCoord.xy),0).r) < 1.0) color = vec3(COLOR_KEY_R,COLOR_KEY_G,COLOR_KEY_B);
|
||||
#else
|
||||
if(texelFetch(depthtex0,ivec2(gl_FragCoord.xy),0).r < 1.0) color = vec3(COLOR_KEY_R,COLOR_KEY_G,COLOR_KEY_B);
|
||||
#endif
|
||||
#else
|
||||
if(texelFetch(depthtex0,ivec2(gl_FragCoord.xy),0).r >= 1.0) color = vec3(COLOR_KEY_R,COLOR_KEY_G,COLOR_KEY_B);
|
||||
#endif
|
||||
#ifdef USING_LOD_MOD
|
||||
if(min(texelFetch(LOD_DEPTHTEX0,ivec2(gl_FragCoord.xy),0).r,texelFetch(depthtex0,ivec2(gl_FragCoord.xy),0).r) >= 1.0) color = vec3(COLOR_KEY_R,COLOR_KEY_G,COLOR_KEY_B);
|
||||
#else
|
||||
if(texelFetch(depthtex0,ivec2(gl_FragCoord.xy),0).r >= 1.0) color = vec3(COLOR_KEY_R,COLOR_KEY_G,COLOR_KEY_B);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user