mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-18 20:00:56 +00:00
Reworks the $Core::commonShaderPath variable usage to be a static variable in ShaderGen for efficiency(only one getVariable when shadergen is initialized), as well as implements the ability to set a default value, and ensures that it tries to set a path even if the pref variable is missing which is important for ported projects from older builds.
This commit is contained in:
parent
3d7c1bbbf7
commit
7567ca10c3
17 changed files with 65 additions and 55 deletions
|
|
@ -69,7 +69,7 @@ MODULE_END;
|
|||
|
||||
|
||||
TerrainFeatHLSL::TerrainFeatHLSL()
|
||||
: mTorqueDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/torque.hlsl" ))
|
||||
: mTorqueDep(ShaderGen::smCommonShaderPath + String("/torque.hlsl" ))
|
||||
{
|
||||
addDependency( &mTorqueDep );
|
||||
}
|
||||
|
|
@ -299,8 +299,8 @@ U32 TerrainBaseMapFeatHLSL::getOutputTargets( const MaterialFeatureData &fd ) co
|
|||
}
|
||||
|
||||
TerrainDetailMapFeatHLSL::TerrainDetailMapFeatHLSL()
|
||||
: mTorqueDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/torque.hlsl" )),
|
||||
mTerrainDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/terrain/terrain.hlsl" ))
|
||||
: mTorqueDep(ShaderGen::smCommonShaderPath + String("/torque.hlsl" )),
|
||||
mTerrainDep(ShaderGen::smCommonShaderPath + String("/terrain/terrain.hlsl" ))
|
||||
|
||||
{
|
||||
addDependency( &mTorqueDep );
|
||||
|
|
@ -629,8 +629,8 @@ U32 TerrainDetailMapFeatHLSL::getOutputTargets( const MaterialFeatureData &fd )
|
|||
|
||||
|
||||
TerrainMacroMapFeatHLSL::TerrainMacroMapFeatHLSL()
|
||||
: mTorqueDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/torque.hlsl" )),
|
||||
mTerrainDep(String(Con::getVariable("$Core::CommonShaderPath")) + String("/terrain/terrain.hlsl" ))
|
||||
: mTorqueDep(ShaderGen::smCommonShaderPath + String("/torque.hlsl" )),
|
||||
mTerrainDep(ShaderGen::smCommonShaderPath + String("/terrain/terrain.hlsl" ))
|
||||
|
||||
{
|
||||
addDependency( &mTorqueDep );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue