shaderGenVars.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. //-----------------------------------------------------------------------------
  2. // Copyright (c) 2012 GarageGames, LLC
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to
  6. // deal in the Software without restriction, including without limitation the
  7. // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  8. // sell copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  20. // IN THE SOFTWARE.
  21. //-----------------------------------------------------------------------------
  22. #ifndef _SHADERGENVARS_H_
  23. #define _SHADERGENVARS_H_
  24. #ifndef _TORQUE_STRING_H_
  25. #include "core/util/str.h"
  26. #endif
  27. ///
  28. /// ShaderGenVars, predefined string names for variables that shadergen based shaders use, this avoids
  29. /// misspelling and string creation issues
  30. ///
  31. struct ShaderGenVars
  32. {
  33. const static String modelview;
  34. const static String worldViewOnly;
  35. const static String worldToCamera;
  36. const static String cameraToWorld;
  37. const static String worldToObj;
  38. const static String viewToObj;
  39. const static String invCameraTrans;
  40. const static String cameraToScreen;
  41. const static String screenToCamera;
  42. const static String cubeTrans;
  43. const static String cubeMips;
  44. const static String objTrans;
  45. const static String cubeEyePos;
  46. const static String eyePos;
  47. const static String eyePosWorld;
  48. const static String vEye;
  49. const static String eyeMat;
  50. const static String oneOverFarplane;
  51. const static String nearPlaneWorld;
  52. const static String fogData;
  53. const static String fogColor;
  54. const static String detailScale;
  55. const static String visibility;
  56. const static String colorMultiply;
  57. const static String alphaTestValue;
  58. const static String texMat;
  59. const static String accumTime;
  60. const static String dampness;
  61. const static String minnaertConstant;
  62. const static String subSurfaceParams;
  63. // Texture atlasing parameters
  64. const static String diffuseAtlasParams;
  65. const static String diffuseAtlasTileParams;
  66. const static String bumpAtlasParams;
  67. const static String bumpAtlasTileParams;
  68. // Render target parameters
  69. const static String targetSize;
  70. const static String oneOverTargetSize;
  71. // Lighting parameters used by the default
  72. // RTLighting shader feature.
  73. const static String lightPosition;
  74. const static String lightDiffuse;
  75. const static String lightAmbient;
  76. const static String lightConfigData;
  77. const static String lightSpotDir;
  78. const static String lightSpotParams;
  79. const static String hasVectorLight;
  80. const static String vectorLightDirection;
  81. const static String vectorLightColor;
  82. const static String vectorLightBrightness;
  83. const static String ormConfig;
  84. const static String roughness;
  85. const static String metalness;
  86. const static String glowMul;
  87. //Reflection Probes
  88. const static String probePositionArray;
  89. const static String probeRefPosArray;
  90. const static String refScaleArray;
  91. const static String worldToObjArray;
  92. const static String probeConfigDataArray;
  93. const static String specularCubemapAR;
  94. const static String irradianceCubemapAR;
  95. const static String probeCount;
  96. const static String BRDFTextureMap;
  97. const static String WetnessTextureMap;
  98. const static String maxProbeDrawDistance;
  99. //Skylight
  100. const static String skylightCubemapIdx;
  101. const static String skylightDamp;
  102. // Textures
  103. const static String fogMap;
  104. const static String dlightMap;
  105. const static String dlightMask;
  106. const static String dlightMapSec;
  107. const static String blackfogMap;
  108. const static String bumpMap;
  109. const static String lightMap;
  110. const static String lightNormMap;
  111. const static String cubeMap;
  112. const static String dLightMap;
  113. const static String dLightMapSec;
  114. const static String dLightMask;
  115. const static String toneMap;
  116. // Deferred Shading
  117. const static String matInfoFlags;
  118. };
  119. #endif