InTerra_LayersDeclaration.hlsl 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. TEXTURE2D(_Control0);
  2. #define DECLARE_TERRAIN_LAYER_TEXS(n) \
  3. TEXTURE2D(_Splat##n); \
  4. TEXTURE2D(_Normal##n); \
  5. TEXTURE2D(_Mask##n)
  6. DECLARE_TERRAIN_LAYER_TEXS(0);
  7. DECLARE_TERRAIN_LAYER_TEXS(1);
  8. DECLARE_TERRAIN_LAYER_TEXS(2);
  9. DECLARE_TERRAIN_LAYER_TEXS(3);
  10. #if defined(_LAYERS_EIGHT) || defined(_LAYERS_SIXTEEN)
  11. DECLARE_TERRAIN_LAYER_TEXS(4);
  12. DECLARE_TERRAIN_LAYER_TEXS(5);
  13. DECLARE_TERRAIN_LAYER_TEXS(6);
  14. DECLARE_TERRAIN_LAYER_TEXS(7);
  15. TEXTURE2D(_Control1);
  16. #endif
  17. #ifdef _LAYERS_SIXTEEN
  18. DECLARE_TERRAIN_LAYER_TEXS(8);
  19. DECLARE_TERRAIN_LAYER_TEXS(9);
  20. DECLARE_TERRAIN_LAYER_TEXS(10);
  21. DECLARE_TERRAIN_LAYER_TEXS(11);
  22. TEXTURE2D(_Control2);
  23. DECLARE_TERRAIN_LAYER_TEXS(12);
  24. DECLARE_TERRAIN_LAYER_TEXS(13);
  25. DECLARE_TERRAIN_LAYER_TEXS(14);
  26. DECLARE_TERRAIN_LAYER_TEXS(15);
  27. TEXTURE2D(_Control3);
  28. #endif
  29. #undef DECLARE_TERRAIN_LAYER_TEXS
  30. #ifdef TESSELLATION_ON
  31. SAMPLER(sampler_Mask0);
  32. #endif
  33. SAMPLER(sampler_Splat0);
  34. SAMPLER(sampler_Control0);
  35. #ifdef OVERRIDE_SPLAT_SAMPLER_NAME
  36. #define sampler_Splat0 OVERRIDE_SPLAT_SAMPLER_NAME
  37. SAMPLER(OVERRIDE_SPLAT_SAMPLER_NAME);
  38. #endif