1struct MyBuffer1 2{ 3 column_major float4x4 mat1; 4 row_major float4x4 mat2; 5 float4 vec1; 6 float foo; 7}; 8 9struct MyBuffer2 10{ 11 row_major float4x4 mat1; 12 float4 vec1; 13}; 14 15cbuffer Example 16{ 17 MyBuffer1 g_MyBuffer1; 18 MyBuffer2 g_MyBuffer2; 19 column_major float4x4 mat1a; 20}; 21 22float4 main() : SV_Target0 23{ 24 return mul(g_MyBuffer1.mat1, g_MyBuffer1.vec1) + 25 mul(g_MyBuffer2.mat1, g_MyBuffer2.vec1); 26} 27 28