You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
413 B
24 lines
413 B
struct sb_t
|
|
{
|
|
float3 color;
|
|
bool test;
|
|
};
|
|
|
|
|
|
globallycoherent RWStructuredBuffer<sb_t> sbuf;
|
|
globallycoherent RWStructuredBuffer<float> sbuf2;
|
|
|
|
float4 main(uint pos : FOO) : SV_Target0
|
|
{
|
|
sbuf2[pos+1] = 42;
|
|
|
|
uint size;
|
|
uint stride;
|
|
sbuf.GetDimensions(size, stride);
|
|
|
|
if (sbuf[pos].test)
|
|
return float4(sbuf[pos].color + sbuf2[pos], 0);
|
|
else
|
|
return size + stride;
|
|
}
|