From 5220032bd40314315a5188c88118ab4bf23c8eff Mon Sep 17 00:00:00 2001 From: Areloch Date: Mon, 11 Sep 2017 23:48:49 -0500 Subject: [PATCH] Moves the initialization of the shader common path const var so it is set before we do an initial setup of some shadergen fields. --- Engine/source/shaderGen/shaderGen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Engine/source/shaderGen/shaderGen.cpp b/Engine/source/shaderGen/shaderGen.cpp index 713db9030..a182588d5 100644 --- a/Engine/source/shaderGen/shaderGen.cpp +++ b/Engine/source/shaderGen/shaderGen.cpp @@ -96,6 +96,8 @@ void ShaderGen::initShaderGen() if (!mInitDelegates[adapterType]) return; + smCommonShaderPath = String(Con::getVariable("$Core::CommonShaderPath", "shaders/common")); + mInitDelegates[adapterType](this); mFeatureInitSignal.trigger( adapterType ); mInit = true; @@ -125,8 +127,6 @@ void ShaderGen::initShaderGen() // Delete the auto-generated conditioner include file. Torque::FS::Remove( "shadergen:/" + ConditionerFeature::ConditionerIncludeFileName ); - - smCommonShaderPath = String(Con::getVariable("$Core::CommonShaderPath", "shaders/common")); } void ShaderGen::generateShader( const MaterialFeatureData &featureData,