parent
82e95a3aa5
commit
eb71cdd5bb
6 changed files with 580 additions and 0 deletions
13
Test/hlsl.preprocessor.frag
Normal file
13
Test/hlsl.preprocessor.frag
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#define DEFINE_TEXTURE(name) Texture2D name; SamplerState name##_ss;
|
||||
#define SAMPLE_TEXTURE(name, uv) name.Sample(name##_ss, (uv).xy)
|
||||
|
||||
#define test_texture2 test_texture
|
||||
|
||||
DEFINE_TEXTURE(test_texture)
|
||||
|
||||
float4 main(float4 input : TEXCOORD0) : SV_TARGET
|
||||
{
|
||||
float4 tex = SAMPLE_TEXTURE(test_texture2, input.xy);
|
||||
return tex;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue