4d6310ab20
This creates a helper function, _entrypoint, which invokes main() and assigns its result into sk_FragColor. We also make sure to prevent sk_FragColor from being dead-stripped from the code during IR generation. At present this is useful for allowing our SkSL test shaders to compile. Change-Id: I2d7fab0e1959a77778ffdb18ca569e869bcaeece Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358525 Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
26 lines
412 B
GLSL
26 lines
412 B
GLSL
|
|
out vec4 sk_FragColor;
|
|
uniform vec4 color;
|
|
vec4 main() {
|
|
float _9_a = color.x * color.y;
|
|
float _10_c = _9_a + color.z;
|
|
float a = _10_c;
|
|
|
|
|
|
float _12_a = color.y * color.z;
|
|
float _13_c = _12_a + color.w;
|
|
float b = _13_c;
|
|
|
|
|
|
float _15_a = color.z * color.w;
|
|
float _16_c = _15_a + color.x;
|
|
float c = _16_c;
|
|
|
|
|
|
float _19_b = b * c;
|
|
return vec4(a, b, c * c, a * _19_b);
|
|
|
|
|
|
|
|
}
|