From 1067da284f60b9c9f28fb6211ef7cfbced349183 Mon Sep 17 00:00:00 2001 From: LuisAntonRebollo Date: Sun, 8 Mar 2015 22:10:22 +0100 Subject: [PATCH] Add error msg to Shadergen when GBufferConditioner?LSL::processVert don't have normals defined. --- Engine/source/lighting/advanced/glsl/gBufferConditionerGLSL.cpp | 1 + Engine/source/lighting/advanced/hlsl/gBufferConditionerHLSL.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/Engine/source/lighting/advanced/glsl/gBufferConditionerGLSL.cpp b/Engine/source/lighting/advanced/glsl/gBufferConditionerGLSL.cpp index 4f430ae64..6e5795e83 100644 --- a/Engine/source/lighting/advanced/glsl/gBufferConditionerGLSL.cpp +++ b/Engine/source/lighting/advanced/glsl/gBufferConditionerGLSL.cpp @@ -96,6 +96,7 @@ void GBufferConditionerGLSL::processVert( Vector &componentLis { inNormal = new Var("normal", "vec3"); meta->addStatement(new GenOp(" @ = vec3( 0.0, 0.0, 1.0 );\r\n", new DecOp(inNormal))); + Con::errorf("ShagerGen: Something went bad with ShaderGen. The normal should be already defined."); } AssertFatal( inNormal, "Something went bad with ShaderGen. The normal should be already defined." ); diff --git a/Engine/source/lighting/advanced/hlsl/gBufferConditionerHLSL.cpp b/Engine/source/lighting/advanced/hlsl/gBufferConditionerHLSL.cpp index 1a5b896a9..93f9477e9 100644 --- a/Engine/source/lighting/advanced/hlsl/gBufferConditionerHLSL.cpp +++ b/Engine/source/lighting/advanced/hlsl/gBufferConditionerHLSL.cpp @@ -96,6 +96,7 @@ void GBufferConditionerHLSL::processVert( Vector &componentLis { inNormal = new Var("normal", "float3"); meta->addStatement(new GenOp(" @ = float3( 0.0, 0.0, 1.0 );\r\n", new DecOp(inNormal))); + Con::errorf("ShagerGen: Something went bad with ShaderGen. The normal should be already defined."); } AssertFatal( inNormal, "Something went bad with ShaderGen. The normal should be already defined." );