shaderGenVars.cpp
Engine/source/shaderGen/shaderGenVars.cpp
Detailed Description
1 2//----------------------------------------------------------------------------- 3// Copyright (c) 2012 GarageGames, LLC 4// 5// Permission is hereby granted, free of charge, to any person obtaining a copy 6// of this software and associated documentation files (the "Software"), to 7// deal in the Software without restriction, including without limitation the 8// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 9// sell copies of the Software, and to permit persons to whom the Software is 10// furnished to do so, subject to the following conditions: 11// 12// The above copyright notice and this permission notice shall be included in 13// all copies or substantial portions of the Software. 14// 15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21// IN THE SOFTWARE. 22//----------------------------------------------------------------------------- 23 24#include "platform/platform.h" 25#include "shaderGen/shaderGenVars.h" 26 27const String ShaderGenVars::modelview("$modelview"); 28const String ShaderGenVars::worldViewOnly("$worldViewOnly"); 29const String ShaderGenVars::worldToCamera("$worldToCamera"); 30const String ShaderGenVars::cameraToWorld("$cameraToWorld"); 31const String ShaderGenVars::worldToObj("$worldToObj"); 32const String ShaderGenVars::viewToObj("$viewToObj"); 33const String ShaderGenVars::invCameraTrans("$invCameraTrans"); 34const String ShaderGenVars::cameraToScreen("$cameraToScreen"); 35const String ShaderGenVars::screenToCamera("$screenToCamera"); 36const String ShaderGenVars::cubeTrans("$cubeTrans"); 37const String ShaderGenVars::cubeMips("$cubeMips"); 38const String ShaderGenVars::objTrans("$objTrans"); 39const String ShaderGenVars::cubeEyePos("$cubeEyePos"); 40const String ShaderGenVars::eyePos("$eyePos"); 41const String ShaderGenVars::eyePosWorld("$eyePosWorld"); 42const String ShaderGenVars::vEye("$vEye"); 43const String ShaderGenVars::eyeMat("$eyeMat"); 44const String ShaderGenVars::oneOverFarplane("$oneOverFarplane"); 45const String ShaderGenVars::nearPlaneWorld("$nearPlaneWorld"); 46const String ShaderGenVars::fogData("$fogData"); 47const String ShaderGenVars::fogColor("$fogColor"); 48const String ShaderGenVars::detailScale("$detailScale"); 49const String ShaderGenVars::visibility("$visibility"); 50const String ShaderGenVars::colorMultiply("$colorMultiply"); 51const String ShaderGenVars::alphaTestValue("$alphaTestValue"); 52const String ShaderGenVars::texMat("$texMat"); 53const String ShaderGenVars::accumTime("$accumTime"); 54const String ShaderGenVars::minnaertConstant("$minnaertConstant"); 55const String ShaderGenVars::subSurfaceParams("$subSurfaceParams"); 56 57const String ShaderGenVars::diffuseAtlasParams("$diffuseAtlasParams"); 58const String ShaderGenVars::diffuseAtlasTileParams("$diffuseAtlasTileParams"); 59const String ShaderGenVars::bumpAtlasParams("$bumpAtlasParams"); 60const String ShaderGenVars::bumpAtlasTileParams("$bumpAtlasTileParams"); 61 62const String ShaderGenVars::targetSize("$targetSize"); 63const String ShaderGenVars::oneOverTargetSize("$oneOverTargetSize"); 64 65const String ShaderGenVars::lightPosition("$inLightPos"); 66const String ShaderGenVars::lightDiffuse("$inLightColor"); 67const String ShaderGenVars::lightAmbient("$ambient"); 68const String ShaderGenVars::lightConfigData("$inLightConfigData"); 69const String ShaderGenVars::lightSpotDir("$inLightSpotDir"); 70const String ShaderGenVars::lightSpotParams("$lightSpotParams"); 71 72const String ShaderGenVars::hasVectorLight("$hasVectorLight"); 73const String ShaderGenVars::vectorLightDirection("$vectorLightDirection"); 74const String ShaderGenVars::vectorLightColor("$vectorLightColor"); 75const String ShaderGenVars::vectorLightBrightness("$vectorLightBrightness"); 76 77const String ShaderGenVars::ormConfig("$ORMConfig"); 78const String ShaderGenVars::roughness("$roughness"); 79const String ShaderGenVars::metalness("$metalness"); 80const String ShaderGenVars::glowMul("$glowMul"); 81 82//Reflection Probes 83const String ShaderGenVars::probePosition("$inProbePosArray"); 84const String ShaderGenVars::probeRefPos("$inRefPosArray"); 85const String ShaderGenVars::refScale("$inRefScale"); 86const String ShaderGenVars::worldToObjArray("$worldToObjArray"); 87const String ShaderGenVars::probeConfigData("$probeConfigData"); 88const String ShaderGenVars::specularCubemapAR("$specularCubemapAR"); 89const String ShaderGenVars::irradianceCubemapAR("$irradianceCubemapAR"); 90const String ShaderGenVars::probeCount("$numProbes"); 91 92const String ShaderGenVars::BRDFTextureMap("$BRDFTexture"); 93 94//Skylight 95const String ShaderGenVars::skylightCubemapIdx("$skylightCubemapIdx"); 96 97// These are ignored by the D3D layers. 98const String ShaderGenVars::fogMap("$fogMap"); 99const String ShaderGenVars::dlightMap("$dlightMap"); 100const String ShaderGenVars::dlightMask("$dlightMask"); 101const String ShaderGenVars::dlightMapSec("$dlightMapSec"); 102const String ShaderGenVars::blackfogMap("$blackfogMap"); 103const String ShaderGenVars::bumpMap("$bumpMap"); 104const String ShaderGenVars::lightMap("$lightMap"); 105const String ShaderGenVars::lightNormMap("$lightNormMap"); 106const String ShaderGenVars::cubeMap("$cubeMap"); 107const String ShaderGenVars::dLightMap("$dlightMap"); 108const String ShaderGenVars::dLightMapSec("$dlightMapSec"); 109const String ShaderGenVars::dLightMask("$dlightMask"); 110const String ShaderGenVars::toneMap("$toneMap"); 111 112// Deferred shading 113const String ShaderGenVars::matInfoFlags("$matInfoFlags"); 114