2022-04-28 06:31:59 -07:00
|
|
|
[pixel shader]
|
2022-10-14 07:09:36 -07:00
|
|
|
struct apple
|
2022-04-28 06:31:59 -07:00
|
|
|
{
|
|
|
|
float3 aa;
|
|
|
|
float4 bb;
|
|
|
|
};
|
|
|
|
|
2022-10-14 07:09:36 -07:00
|
|
|
struct banana
|
2022-04-28 06:31:59 -07:00
|
|
|
{
|
2022-10-14 07:09:36 -07:00
|
|
|
struct apple aa;
|
2022-04-28 06:31:59 -07:00
|
|
|
int2 bb;
|
|
|
|
int4 cc[8];
|
|
|
|
};
|
|
|
|
|
|
|
|
float4 main() : SV_TARGET
|
|
|
|
{
|
2022-10-14 07:09:36 -07:00
|
|
|
struct banana p = (struct banana)42;
|
2022-04-28 06:31:59 -07:00
|
|
|
return p.aa.bb + p.cc[5];
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
|
|
|
todo draw quad
|
|
|
|
todo probe all rgba (84.0, 84.0, 84.0, 84.0)
|
2022-10-10 15:23:00 -07:00
|
|
|
|
|
|
|
|
|
|
|
[pixel shader fail todo]
|
|
|
|
struct apple
|
|
|
|
{
|
|
|
|
float3 aa;
|
|
|
|
float4 bb;
|
|
|
|
};
|
|
|
|
|
|
|
|
float4 main() : SV_TARGET
|
|
|
|
{
|
|
|
|
struct apple f = 31;
|
|
|
|
return f.bb;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[pixel shader fail]
|
|
|
|
struct apple
|
|
|
|
{
|
|
|
|
float3 aa;
|
|
|
|
float4 bb;
|
|
|
|
};
|
|
|
|
|
|
|
|
float4 fun(struct apple f)
|
|
|
|
{
|
|
|
|
return f.bb;
|
|
|
|
}
|
|
|
|
|
|
|
|
float4 main() : SV_TARGET
|
|
|
|
{
|
|
|
|
return fun(31);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[pixel shader fail]
|
|
|
|
struct apple
|
|
|
|
{
|
|
|
|
float4 foo;
|
|
|
|
Texture2D tex;
|
|
|
|
};
|
|
|
|
|
|
|
|
float4 PSMain() : SV_TARGET
|
|
|
|
{
|
|
|
|
struct apple a1;
|
|
|
|
a1 = (struct apple)1;
|
|
|
|
return a1.foo;
|
|
|
|
}
|