glslang/Test/hlsl.matrixSwizzle.vert
John Kessenich 001dfa1c5c HLSL: matrix swizzle (_12, _m23) syntax, partial semantics.
This partially addressess issue #670, for when the matrix swizzle
degenerates to a component or column: m[c], m[c][r] (where HLSL
swaps rows and columns for user's view).

An error message is given for the arbitrary cases not covered.

These cases will work for arbitrary use of l-values.

Future work will handle more arbitrary swizzles, which might
not work as arbitrary l-values.
2017-01-12 16:51:18 -07:00

11 lines
345 B
GLSL

void ShaderFunction(float inf) : COLOR0
{
float3x4 m;
m._34 = 1.0; // AST should have a normal component select
m._m23 = 2.0; // same code
m._11_12_13_14 = float4(3.0); // AST should have normal column selection (first row)
m._m10_m11_m12_m13 = float4(3.0); // AST should have normal column selection (second row)
}