skia2/tests/sksl/blend/BlendHardLightStandaloneSettings.glsl
John Stiles c5b381c479 Use $ prefix on built-in private functions.
This guards against any potential for conflict with user code.

Change-Id: Iecaf3ead5f8ada50b6dc159a4ad9e7f3e371edc7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/499296
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-01-25 15:21:42 +00:00

13 lines
534 B
GLSL

out vec4 sk_FragColor;
uniform vec4 src;
uniform vec4 dst;
float blend_overlay_component_Qhh2h2(vec2 s, vec2 d) {
return 2.0 * d.x <= d.y ? (2.0 * s.x) * d.x : s.y * d.y - (2.0 * (d.y - d.x)) * (s.y - s.x);
}
void main() {
vec4 _0_result = vec4(blend_overlay_component_Qhh2h2(dst.xw, src.xw), blend_overlay_component_Qhh2h2(dst.yw, src.yw), blend_overlay_component_Qhh2h2(dst.zw, src.zw), dst.w + (1.0 - dst.w) * src.w);
_0_result.xyz += src.xyz * (1.0 - dst.w) + dst.xyz * (1.0 - src.w);
sk_FragColor = _0_result;
}