169c8903be
This is a reland of 22dcb5fd7e
Original change's description:
> Add coords parameter to all .sksl test files used as runtime effects
>
> Convert to use the newer MakeForShader factory, which requires this.
>
> Change-Id: Ifaf6054054027c78f3f3fe15596e435e0f79b877
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399336
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>
Bug: skia:11919
Change-Id: I5f745c54b2bc3712f2281db6e067345903e81931
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401836
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
36 lines
847 B
Plaintext
36 lines
847 B
Plaintext
uniform half4 colorGreen, colorRed;
|
|
|
|
bool test_float() {
|
|
float2x3 m23 = float2x3(23);
|
|
float2x4 m24 = float2x4(24);
|
|
float3x2 m32 = float3x2(32);
|
|
float3x4 m34 = float3x4(34);
|
|
float4x2 m42 = float4x2(42);
|
|
float4x3 m43 = float4x3(44);
|
|
|
|
float2x2 m22 = m32 * m23; m22 *= m22;
|
|
float3x3 m33 = m43 * m34; m33 *= m33;
|
|
float4x4 m44 = m24 * m42; m44 *= m44;
|
|
|
|
return true;
|
|
}
|
|
|
|
bool test_half() {
|
|
half2x3 m23 = half2x3(23);
|
|
half2x4 m24 = half2x4(24);
|
|
half3x2 m32 = half3x2(32);
|
|
half3x4 m34 = half3x4(34);
|
|
half4x2 m42 = half4x2(42);
|
|
half4x3 m43 = half4x3(44);
|
|
|
|
half2x2 m22 = m32 * m23; m22 *= m22;
|
|
half3x3 m33 = m43 * m34; m33 *= m33;
|
|
half4x4 m44 = m24 * m42; m44 *= m44;
|
|
|
|
return true;
|
|
}
|
|
|
|
half4 main(float2 coords) {
|
|
return test_float() && test_half() ? colorGreen : colorRed;
|
|
}
|