skia2/resources/sksl/runtime/AllowNarrowingConversions.rts
John Stiles e9dcbfdaa1 Add test for Runtime Effects and narrowing conversions.
This code intentionally mixes half4s and float4s everywhere. Before
http://review.skia.org/435916 landed, this resulted in a compile error.

Change-Id: I852fef6ee99a8b78623e0e9ddeee2ad84a8c0504
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436058
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-03 15:58:46 +00:00

10 lines
181 B
Plaintext

uniform half4 colorGreen;
half4 main(float2 coords) {
half4 one = float4(1);
half4 zero = one * float4(0);
float4 green = colorGreen;
return green * one + zero;
}