ece1d794b9
This will be implemented in Metal and SPIR-V in followup CLs. Change-Id: I397b4db40b15dd54cf1d8a17f414c3fe184b48d2 Bug: skia:10851 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/387638 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
17 lines
401 B
GLSL
17 lines
401 B
GLSL
|
|
out vec4 sk_FragColor;
|
|
uniform vec4 color;
|
|
float count = 0.0;
|
|
vec4 trueSide_h4h4(vec4 v) {
|
|
count += 1.0;
|
|
return vec4(sin(v.x), sin(v.y), sin(v.z), sin(v.w));
|
|
}
|
|
vec4 falseSide_h4h4(vec4 v) {
|
|
count += 1.0;
|
|
return vec4(cos(v.y), cos(v.z), cos(v.w), cos(v.z));
|
|
}
|
|
void main() {
|
|
sk_FragColor = color.x <= 0.5 ? trueSide_h4h4(color) : falseSide_h4h4(color);
|
|
sk_FragColor *= count;
|
|
}
|