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.
This commit is contained in:
parent
913e3b686a
commit
001dfa1c5c
6 changed files with 367 additions and 62 deletions
10
Test/hlsl.matrixSwizzle.vert
Normal file
10
Test/hlsl.matrixSwizzle.vert
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue