blob: ce16b91ce9825b47b7d34d67c8ef213ef4abdb92 [file] [log] [blame]
/*
* Copyright 2018 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
in float k1;
in float k2;
in float k3;
in float k4;
layout(key) in bool enforcePMColor;
in fragmentProcessor child;
uniform float4 k;
void main() {
half4 dst = process(child);
sk_OutColor = saturate(k.x * sk_InColor * dst + k.y * sk_InColor + k.z * dst + k.w);
if (enforcePMColor) {
sk_OutColor.rgb = min(sk_OutColor.rgb, sk_OutColor.a);
}
}
@setData(pdman) {
pdman.set4f(k, k1, k2, k3, k4);
}