This commit is contained in:
Azaezel 2015-03-03 23:10:47 -06:00
parent a73850a4bb
commit bc32da74ca
2 changed files with 10 additions and 0 deletions

View file

@ -92,6 +92,11 @@ void GBufferConditionerGLSL::processVert( Vector<ShaderComponent*> &componentLis
// grab incoming vert normal
Var *inNormal = (Var*) LangElement::find( "normal" );
if (!inNormal)
{
inNormal = new Var("normal", "vec3");
meta->addStatement(new GenOp(" @ = vec3( 0.0, 0.0, 1.0 );\r\n", new DecOp(inNormal)));
}
AssertFatal( inNormal, "Something went bad with ShaderGen. The normal should be already defined." );
// grab output for gbuffer normal

View file

@ -92,6 +92,11 @@ void GBufferConditionerHLSL::processVert( Vector<ShaderComponent*> &componentLis
// grab incoming vert normal
Var *inNormal = (Var*) LangElement::find( "normal" );
if (!inNormal)
{
inNormal = new Var("normal", "float3");
meta->addStatement(new GenOp(" @ = float3( 0.0, 0.0, 1.0 );\r\n", new DecOp(inNormal)));
}
AssertFatal( inNormal, "Something went bad with ShaderGen. The normal should be already defined." );
// grab output for gbuffer normal