Skip to content

Commit

Permalink
GarageGames#770 resolution suggested by @LuisAntonRebollo
Browse files Browse the repository at this point in the history
  • Loading branch information
Azaezel committed Mar 4, 2015
1 parent a73850a commit bc32da7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Expand Up @@ -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
Expand Down
Expand Up @@ -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
Expand Down

0 comments on commit bc32da7

Please sign in to comment.