xavier | eb71cdd | 2017-08-24 08:28:57 +0200 | [diff] [blame] | 1 | #define DEFINE_TEXTURE(name) Texture2D name; SamplerState name##_ss; |
2 | #define SAMPLE_TEXTURE(name, uv) name.Sample(name##_ss, (uv).xy) | ||||
3 | |||||
4 | #define test_texture2 test_texture | ||||
5 | |||||
6 | DEFINE_TEXTURE(test_texture) | ||||
7 | |||||
8 | float4 main(float4 input : TEXCOORD0) : SV_TARGET | ||||
9 | { | ||||
10 | float4 tex = SAMPLE_TEXTURE(test_texture2, input.xy); | ||||
11 | return tex; | ||||
12 | } | ||||
13 |