diff options
author | Julian Eisel <julian@blender.org> | 2020-03-12 17:58:03 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-03-12 17:58:03 +0300 |
commit | b86be9b2145458037fd0b17433b7af0efa7b6472 (patch) | |
tree | f333625555402992ebb35d258f93eda1130389e6 /source/blender/draw/engines/workbench/shaders/workbench_forward_composite_frag.glsl | |
parent | 00f83ec125207e90bf180b3eb7752d8cb6482a86 (diff) | |
parent | cb6cec904fa14ce0ab10a2a53af5c936d56376cf (diff) |
Merge branch 'temp-openxr-ghostxr' into temp-openxr-blenderside
Diffstat (limited to 'source/blender/draw/engines/workbench/shaders/workbench_forward_composite_frag.glsl')
-rw-r--r-- | source/blender/draw/engines/workbench/shaders/workbench_forward_composite_frag.glsl | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/source/blender/draw/engines/workbench/shaders/workbench_forward_composite_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_forward_composite_frag.glsl deleted file mode 100644 index 0a4d64b37ad..00000000000 --- a/source/blender/draw/engines/workbench/shaders/workbench_forward_composite_frag.glsl +++ /dev/null @@ -1,36 +0,0 @@ -out vec4 fragColor; - -uniform usampler2D objectId; -uniform sampler2D transparentAccum; -uniform sampler2D transparentRevealage; -uniform vec2 invertedViewportSize; - -#ifndef ALPHA_COMPOSITE -layout(std140) uniform world_block -{ - WorldData world_data; -}; -#endif - -/* TODO: Bypass the whole shader if there is no xray pass and no outline pass. */ -void main() -{ - ivec2 texel = ivec2(gl_FragCoord.xy); - vec2 uv_viewport = gl_FragCoord.xy * invertedViewportSize; - - /* Listing 4 */ - vec4 trans_accum = texelFetch(transparentAccum, texel, 0); - float trans_revealage = trans_accum.a; - trans_accum.a = texelFetch(transparentRevealage, texel, 0).r; - - vec3 trans_color = trans_accum.rgb / clamp(trans_accum.a, 1e-4, 5e4); - - fragColor.a = 1.0 - trans_revealage; - fragColor.rgb = trans_color * fragColor.a; - -#ifdef V3D_SHADING_OBJECT_OUTLINE - uint object_id = texelFetch(objectId, texel, 0).r; - float outline = calculate_object_outline(objectId, texel, object_id); - fragColor = mix(vec4(world_data.object_outline_color.rgb, 1.0), fragColor, outline); -#endif -} |