local_resource7.hlsl 389 B

123456789101112131415161718192021
  1. // RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
  2. // CHECK: main
  3. float4 Tex2D(Texture2D<float4> t,
  4. SamplerState s, float2 c) {
  5. return t.Sample(s, c);
  6. }
  7. SamplerState g_ss;
  8. Texture2D<float4> g_texture[6];
  9. float4 main(float2 c: T) : SV_Target {
  10. Texture2D<float4> texture;
  11. if (c.x>0)
  12. texture = g_texture[0];
  13. else
  14. texture = g_texture[2];
  15. return Tex2D(texture, g_ss, c);
  16. }