mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-09 12:00:05 +00:00
25 lines
383 B
GLSL
25 lines
383 B
GLSL
|
|
||
|
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;
|
||
|
}
|