mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-14 22:01:04 +00:00
34 lines
644 B
GLSL
34 lines
644 B
GLSL
|
#pragma pack_matrix(row_major)
|
||
|
|
||
|
struct MyBuffer1
|
||
|
{
|
||
|
column_major float4x4 mat1;
|
||
|
row_major float4x4 mat2;
|
||
|
/*floating*/ float4x4 mat3;
|
||
|
};
|
||
|
|
||
|
#pragma pack_matrix(column_major)
|
||
|
|
||
|
struct MyBuffer2
|
||
|
{
|
||
|
column_major float4x4 mat1;
|
||
|
row_major float4x4 mat2;
|
||
|
/*floating*/ float4x4 mat3;
|
||
|
};
|
||
|
|
||
|
#pragma pack_matrix(random_string_foo)
|
||
|
|
||
|
cbuffer Example
|
||
|
{
|
||
|
MyBuffer1 g_MyBuffer1;
|
||
|
MyBuffer2 g_MyBuffer2;
|
||
|
column_major float4x4 mat1a;
|
||
|
};
|
||
|
|
||
|
float4 main() : SV_Target0
|
||
|
{
|
||
|
return
|
||
|
g_MyBuffer1.mat1[0] + g_MyBuffer1.mat2[0] + g_MyBuffer1.mat3[0] +
|
||
|
g_MyBuffer2.mat1[0] + g_MyBuffer2.mat2[0] + g_MyBuffer2.mat3[0];
|
||
|
}
|