HLSL: implement TextureBuffer<type>
Almost equivalent to tbuffer, except members not at global scope. So, reference is "TextureBuffer_var.member", not simply "member".
This commit is contained in:
17
Test/hlsl.texturebuffer.frag
Normal file
17
Test/hlsl.texturebuffer.frag
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
struct Data {
|
||||
float4 f;
|
||||
int4 i;
|
||||
};
|
||||
|
||||
TextureBuffer<Data> TextureBuffer_var : register(t0);
|
||||
|
||||
tbuffer tbuf2 {
|
||||
float4 f2;
|
||||
int4 i2;
|
||||
};
|
||||
|
||||
float4 main(float4 pos : SV_POSITION) : SV_TARGET
|
||||
{
|
||||
return TextureBuffer_var.f + f2;
|
||||
}
|
||||
Reference in New Issue
Block a user