2023-05-03 16:25:24 -07:00
|
|
|
[require]
|
|
|
|
shader model >= 5.0
|
|
|
|
|
|
|
|
[pixel shader todo]
|
|
|
|
struct s
|
|
|
|
{
|
|
|
|
float3 a;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct s2
|
|
|
|
{
|
|
|
|
float4x4 f1, f2, f3;
|
|
|
|
};
|
|
|
|
|
|
|
|
RWStructuredBuffer<float4> u : register(u2);
|
|
|
|
RWStructuredBuffer<float> u1;
|
|
|
|
RWStructuredBuffer<float2x2> u2;
|
|
|
|
RWStructuredBuffer<struct s> u3;
|
|
|
|
RWStructuredBuffer<float4x4> u4;
|
|
|
|
RWStructuredBuffer<struct s2> u5;
|
|
|
|
|
|
|
|
float4 main() : sv_target1
|
|
|
|
{
|
|
|
|
u[0] = float4(11.1, 12.2, 13.3, 14.4);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2023-10-13 14:35:12 -07:00
|
|
|
[pixel shader todo]
|
|
|
|
struct s
|
|
|
|
{
|
|
|
|
float3 a;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct s2
|
|
|
|
{
|
|
|
|
float4x4 f1, f2, f3;
|
|
|
|
};
|
|
|
|
|
|
|
|
RasterizerOrderedStructuredBuffer<float4> u : register(u2);
|
|
|
|
RasterizerOrderedStructuredBuffer<float> u1;
|
|
|
|
RasterizerOrderedStructuredBuffer<float2x2> u2;
|
|
|
|
RasterizerOrderedStructuredBuffer<struct s> u3;
|
|
|
|
RasterizerOrderedStructuredBuffer<float4x4> u4;
|
|
|
|
RasterizerOrderedStructuredBuffer<struct s2> u5;
|
|
|
|
|
|
|
|
float4 main() : sv_target1
|
|
|
|
{
|
|
|
|
u[0] = float4(11.1, 12.2, 13.3, 14.4);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2023-05-03 16:25:24 -07:00
|
|
|
% Array type
|
|
|
|
[pixel shader]
|
|
|
|
typedef float arr[2];
|
|
|
|
RWStructuredBuffer<arr> u;
|
|
|
|
|
|
|
|
float4 main() : sv_target1
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2023-10-12 10:32:02 -07:00
|
|
|
[pixel shader]
|
2023-10-13 14:35:12 -07:00
|
|
|
typedef float arr[2];
|
|
|
|
RasterizerOrderedStructuredBuffer<arr> u;
|
|
|
|
|
|
|
|
float4 main() : sv_target1
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2023-05-03 16:25:24 -07:00
|
|
|
% Object types
|
2023-09-14 02:29:24 -07:00
|
|
|
[pixel shader fail(sm<6)]
|
2023-05-03 16:25:24 -07:00
|
|
|
RWStructuredBuffer<Texture2D> u;
|
|
|
|
|
|
|
|
float4 main() : sv_target1
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
[pixel shader fail]
|
|
|
|
struct s
|
|
|
|
{
|
|
|
|
Texture2D t;
|
|
|
|
};
|
|
|
|
RWStructuredBuffer<struct s> u;
|
|
|
|
|
|
|
|
float4 main() : sv_target1
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2023-10-13 14:35:12 -07:00
|
|
|
|
|
|
|
[pixel shader fail(sm<6)]
|
|
|
|
RasterizerOrderedStructuredBuffer<Texture2D> u;
|
|
|
|
|
|
|
|
float4 main() : sv_target1
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
[pixel shader fail]
|
|
|
|
struct s
|
|
|
|
{
|
|
|
|
Texture2D t;
|
|
|
|
};
|
|
|
|
RasterizerOrderedStructuredBuffer<struct s> u;
|
|
|
|
|
|
|
|
float4 main() : sv_target1
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2024-02-16 12:05:49 -08:00
|
|
|
|
|
|
|
|
|
|
|
[pixel shader todo]
|
|
|
|
struct apple
|
|
|
|
{
|
|
|
|
float3 a, x;
|
|
|
|
};
|
|
|
|
|
|
|
|
RWStructuredBuffer<apple> u;
|
|
|
|
|
|
|
|
float4 main() : sv_target
|
|
|
|
{
|
|
|
|
u[0].x = float3(30.0, 40.0, 50.0);
|
|
|
|
return 0;
|
|
|
|
}
|