bfc9be0f77
This will allow us to load these inputs for unit testing in `dm`. Change-Id: Id256ba7c30d3ec94b98048e47af44cf9efe580d5 Bug: skia:11009 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357282 Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
15 lines
514 B
GLSL
15 lines
514 B
GLSL
#version 400
|
|
out vec4 sk_FragColor;
|
|
in vec4 src;
|
|
in vec4 dst;
|
|
float _blend_overlay_component(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 _2_result = vec4(_blend_overlay_component(dst.xw, src.xw), _blend_overlay_component(dst.yw, src.yw), _blend_overlay_component(dst.zw, src.zw), dst.w + (1.0 - dst.w) * src.w);
|
|
_2_result.xyz += src.xyz * (1.0 - dst.w) + dst.xyz * (1.0 - src.w);
|
|
sk_FragColor = _2_result;
|
|
|
|
|
|
}
|