Differential D13910 Diff 47394 source/blender/draw/engines/workbench/shaders/workbench_merge_infront_frag.glsl
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/workbench/shaders/workbench_merge_infront_frag.glsl
| uniform sampler2D depthBuffer; | |||||
| in vec4 uvcoordsvar; | |||||
| out vec4 fragColor; | |||||
| void main() | void main() | ||||
| { | { | ||||
| float depth = texture(depthBuffer, uvcoordsvar.st).r; | float depth = texture(depthBuffer, uvcoordsvar.st).r; | ||||
| /* Fix issues with Intel drivers (see T80023). */ | /* Fix issues with Intel drivers (see T80023). */ | ||||
| fragColor = vec4(0.0); | fragColor = vec4(0.0); | ||||
| /* Discard background pixels. */ | /* Discard background pixels. */ | ||||
| if (depth == 1.0) { | if (depth == 1.0) { | ||||
| discard; | discard; | ||||
| } | } | ||||
| /* Make this fragment occlude any fragment that will try to | /* Make this fragment occlude any fragment that will try to | ||||
| * render over it in the normal passes. */ | * render over it in the normal passes. */ | ||||
| gl_FragDepth = 0.0; | gl_FragDepth = 0.0; | ||||
| } | } | ||||