Unity3d – HLSL float4x4 individual floats

hlslunity3d

Simple question, but how can I access single floats or float4's in a 4×4 matrix in HLSL?

I tried: matrix._m00_m01_m02 for a float3 to no avail.
I also tried matrix._00_01_02 to no avail.

What is the correct way to get single floats or float3/4's of a matrix in HLSL?

Also, how do I insert a float4 in a matrix?

Best Answer

Why not use the same accessing method as matrices in almost all languages?

myField[row][column] = potato;
Related Topic