HLSL: cbuffer and tbuffer grammar and production.
This commit is contained in:
parent
b8d2a006d1
commit
3d157c510f
9 changed files with 268 additions and 46 deletions
22
Test/hlsl.buffer.frag
Normal file
22
Test/hlsl.buffer.frag
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
cbuffer {
|
||||
float4 v1;
|
||||
};
|
||||
|
||||
tbuffer {
|
||||
float4 v2;
|
||||
};
|
||||
|
||||
cbuffer cbufName : register(b2) {
|
||||
float4 v3;
|
||||
int i3 : packoffset(c1.y);
|
||||
};
|
||||
|
||||
tbuffer tbufName : register(b8) {
|
||||
float4 v4 : packoffset(c1);
|
||||
int i4 : packoffset(c3);
|
||||
};
|
||||
|
||||
float4 PixelShaderFunction(float4 input) : COLOR0
|
||||
{
|
||||
return input + v1 + v2 + v3 + v4;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue