skia2/tests/sksl/blend/golden/BlendOverlay.glsl
John Stiles 09b9eade20 Rename BlendOverlap to BlendOverlay.
Just a typo fix.

Change-Id: I2fe1f6ae1c99d7f20a4fa5f49eefea514e224652
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321977
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-10-02 22:26:15 +00:00

29 lines
1.0 KiB
GLSL

#version 400
out vec4 sk_FragColor;
in vec4 src, dst;
void main() {
vec4 _1_blend_overlay;
{
float _3_blend_overlay_component;
{
_3_blend_overlay_component = 2.0 * dst.x <= dst.w ? (2.0 * src.x) * dst.x : src.w * dst.w - (2.0 * (dst.w - dst.x)) * (src.w - src.x);
}
float _4_blend_overlay_component;
{
_4_blend_overlay_component = 2.0 * dst.y <= dst.w ? (2.0 * src.y) * dst.y : src.w * dst.w - (2.0 * (dst.w - dst.y)) * (src.w - src.y);
}
float _5_blend_overlay_component;
{
_5_blend_overlay_component = 2.0 * dst.z <= dst.w ? (2.0 * src.z) * dst.z : src.w * dst.w - (2.0 * (dst.w - dst.z)) * (src.w - src.z);
}
vec4 _2_result = vec4(_3_blend_overlay_component, _4_blend_overlay_component, _5_blend_overlay_component, src.w + (1.0 - src.w) * dst.w);
_2_result.xyz += dst.xyz * (1.0 - src.w) + src.xyz * (1.0 - dst.w);
_1_blend_overlay = _2_result;
}
sk_FragColor = _1_blend_overlay;
}