• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1uniform half4 colorGreen, colorRed;
2
3bool test_float() {
4    float3 v1 = float3x3(1) * float3(2);
5    float3 v2 = float3(2) * float3x3(1);
6
7    float2x2 m1 = float2x2(float4(1, 2, 3, 4));
8    float2x2 m2 = float2x2(float4(0));
9    float2x2 m3 = float2x2(m1);
10    float2x2 m4 = float2x2(1);
11    m3 *= m4;
12    float2x2 m5 = float2x2(m1[0][0]);
13    float2x2 m6 = float2x2(1, 2, 3, 4);
14    m6 += m5;
15    float2x2 m7 = float2x2(5, float3(6, 7, 8));
16    float3x3 m9 = float3x3(1);
17    float4x4 m10 = float4x4(1);
18    float4x4 m11 = float4x4(2);
19    m11 -= m10;
20
21    return true;
22}
23
24bool test_half() {
25    half3 v1 = half3x3(1) * half3(2);
26    half3 v2 = half3(2) * half3x3(1);
27
28    half2x2 m1 = half2x2(half4(1, 2, 3, 4));
29    half2x2 m2 = half2x2(half4(0));
30    half2x2 m3 = half2x2(m1);
31    half2x2 m4 = half2x2(1);
32    m3 *= m4;
33    half2x2 m5 = half2x2(m1[0][0]);
34    half2x2 m6 = half2x2(1, 2, 3, 4);
35    m6 += m5;
36    half2x2 m7 = half2x2(5, half3(6, 7, 8));
37    half3x3 m9 = half3x3(1);
38    half4x4 m10 = half4x4(1);
39    half4x4 m11 = half4x4(2);
40    m11 -= m10;
41
42    return true;
43}
44
45half4 main(float2 coords) {
46    return test_float() && test_half() ? colorGreen : colorRed;
47}
48