Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/shaders/outline_detect_frag.glsl
- This file was moved from source/blender/draw/modes/shaders/object_outline_detect_frag.glsl.
| in vec4 uvcoordsvar; | in vec4 uvcoordsvar; | ||||
| out vec4 FragColor; | out vec4 FragColor; | ||||
| uniform usampler2D outlineId; | uniform usampler2D outlineId; | ||||
| uniform sampler2D outlineDepth; | uniform sampler2D outlineDepth; | ||||
| uniform sampler2D sceneDepth; | uniform sampler2D sceneDepth; | ||||
| uniform float alphaOcclu; | uniform float alphaOcclu; | ||||
| uniform vec2 viewportSize; | |||||
| void main() | void main() | ||||
| { | { | ||||
| ivec2 texel = ivec2(gl_FragCoord.xy); | ivec2 texel = ivec2(gl_FragCoord.xy); | ||||
| #ifdef GPU_ARB_texture_gather | #ifdef GPU_ARB_texture_gather | ||||
| vec2 texel_size = 1.0 / vec2(textureSize(outlineId, 0).xy); | vec2 texel_size = 1.0 / vec2(textureSize(outlineId, 0).xy); | ||||
| vec2 uv = ceil(gl_FragCoord.xy) * texel_size; | vec2 uv = ceil(gl_FragCoord.xy) * texel_size; | ||||
| ▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines | |||||