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.
25 lines
383 B
25 lines
383 B
|
|
cbuffer TestCB
|
|
{
|
|
uint W;
|
|
uint H;
|
|
};
|
|
|
|
struct BufType
|
|
{
|
|
float4 va;
|
|
float4 vb;
|
|
};
|
|
|
|
StructuredBuffer < BufType > SB0;
|
|
RWStructuredBuffer < BufType > SB1;
|
|
|
|
float4 main(float4 pos : POS) : SV_Target0
|
|
{
|
|
float4 vTmp = SB0[pos.y * W + pos.x].va + SB0[pos.y * W + pos.x].vb;
|
|
|
|
vTmp += SB1[pos.y * W + pos.x].va + SB1[pos.y * W + pos.x].vb;
|
|
|
|
return vTmp;
|
|
}
|