shaderGenVars.cpp 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. #include "platform/platform.h"
  23. #include "shaderGen/shaderGenVars.h"
  24. const String ShaderGenVars::modelview("$modelview");
  25. const String ShaderGenVars::worldViewOnly("$worldViewOnly");
  26. const String ShaderGenVars::worldToCamera("$worldToCamera");
  27. const String ShaderGenVars::worldToObj("$worldToObj");
  28. const String ShaderGenVars::viewToObj("$viewToObj");
  29. const String ShaderGenVars::cubeTrans("$cubeTrans");
  30. const String ShaderGenVars::objTrans("$objTrans");
  31. const String ShaderGenVars::cubeEyePos("$cubeEyePos");
  32. const String ShaderGenVars::eyePos("$eyePos");
  33. const String ShaderGenVars::eyePosWorld("$eyePosWorld");
  34. const String ShaderGenVars::vEye("$vEye");
  35. const String ShaderGenVars::eyeMat("$eyeMat");
  36. const String ShaderGenVars::oneOverFarplane("$oneOverFarplane");
  37. const String ShaderGenVars::nearPlaneWorld("$nearPlaneWorld");
  38. const String ShaderGenVars::fogData("$fogData");
  39. const String ShaderGenVars::fogColor("$fogColor");
  40. const String ShaderGenVars::detailScale("$detailScale");
  41. const String ShaderGenVars::visibility("$visibility");
  42. const String ShaderGenVars::colorMultiply("$colorMultiply");
  43. const String ShaderGenVars::alphaTestValue("$alphaTestValue");
  44. const String ShaderGenVars::texMat("$texMat");
  45. const String ShaderGenVars::accumTime("$accumTime");
  46. const String ShaderGenVars::minnaertConstant("$minnaertConstant");
  47. const String ShaderGenVars::subSurfaceParams("$subSurfaceParams");
  48. const String ShaderGenVars::diffuseAtlasParams("$diffuseAtlasParams");
  49. const String ShaderGenVars::diffuseAtlasTileParams("$diffuseAtlasTileParams");
  50. const String ShaderGenVars::bumpAtlasParams("$bumpAtlasParams");
  51. const String ShaderGenVars::bumpAtlasTileParams("$bumpAtlasTileParams");
  52. const String ShaderGenVars::targetSize("$targetSize");
  53. const String ShaderGenVars::oneOverTargetSize("$oneOverTargetSize");
  54. const String ShaderGenVars::lightPosition("$inLightPos");
  55. const String ShaderGenVars::lightDiffuse("$inLightColor");
  56. const String ShaderGenVars::lightAmbient("$ambient");
  57. const String ShaderGenVars::lightInvRadiusSq("$inLightInvRadiusSq");
  58. const String ShaderGenVars::lightSpotDir("$inLightSpotDir");
  59. const String ShaderGenVars::lightSpotAngle("$inLightSpotAngle");
  60. const String ShaderGenVars::lightSpotFalloff("$inLightSpotFalloff");
  61. const String ShaderGenVars::specularColor("$specularColor");
  62. const String ShaderGenVars::specularPower("$specularPower");
  63. const String ShaderGenVars::specularStrength("$specularStrength");
  64. // These are ignored by the D3D layers.
  65. const String ShaderGenVars::fogMap("$fogMap");
  66. const String ShaderGenVars::dlightMap("$dlightMap");
  67. const String ShaderGenVars::dlightMask("$dlightMask");
  68. const String ShaderGenVars::dlightMapSec("$dlightMapSec");
  69. const String ShaderGenVars::blackfogMap("$blackfogMap");
  70. const String ShaderGenVars::bumpMap("$bumpMap");
  71. const String ShaderGenVars::lightMap("$lightMap");
  72. const String ShaderGenVars::lightNormMap("$lightNormMap");
  73. const String ShaderGenVars::cubeMap("$cubeMap");
  74. const String ShaderGenVars::dLightMap("$dlightMap");
  75. const String ShaderGenVars::dLightMapSec("$dlightMapSec");
  76. const String ShaderGenVars::dLightMask("$dlightMask");
  77. const String ShaderGenVars::toneMap("$toneMap");
  78. // Deferred shading
  79. const String ShaderGenVars::matInfoFlags("$matInfoFlags");