Fixed some typos with shader generation.

--HG--
branch : gsoc2013-dfighter
hg/feature/gsoc2013-dfighter
dfighter1985 11 years ago
parent 37c8b096b1
commit d6558b5b0d

@ -586,7 +586,7 @@ namespace NL3D
std::string As = texelNames[ stage ]; std::string As = texelNames[ stage ];
As.append( ".a" ); As.append( ".a" );
ss << "texel.rgb = " << arg0 << " * " << As << ";"; ss << "texel.rgb = " << arg0 << " * " << As << ";" << std::endl;
ss << "texel.rgb = texel.rgb + " << arg1 << " * " << "( 1.0 - " << As << " );" << std::endl; ss << "texel.rgb = texel.rgb + " << arg1 << " * " << "( 1.0 - " << As << " );" << std::endl;
} }
break; break;
@ -598,7 +598,7 @@ namespace NL3D
std::string As = "texel.a"; std::string As = "texel.a";
ss << "texel.rgb = " << arg0 << " * " << As << ";"; ss << "texel.rgb = " << arg0 << " * " << As << ";" << std::endl;
ss << "texel.rgb = texel.rgb + " << arg1 << " * " << "( 1.0 - " << As << " );" << std::endl; ss << "texel.rgb = texel.rgb + " << arg1 << " * " << "( 1.0 - " << As << " );" << std::endl;
} }
break; break;
@ -610,7 +610,7 @@ namespace NL3D
std::string As = "diffuse.a"; std::string As = "diffuse.a";
ss << "texel.rgb = " << arg0 << " * " << As << ";"; ss << "texel.rgb = " << arg0 << " * " << As << ";" << std::endl;
ss << "texel.rgb = texel.rgb + " << arg1 << " * " << "( 1.0 - " << As << " );" << std::endl; ss << "texel.rgb = texel.rgb + " << arg1 << " * " << "( 1.0 - " << As << " );" << std::endl;
} }
break; break;
@ -623,7 +623,7 @@ namespace NL3D
std::string As = constantNames[ stage ]; std::string As = constantNames[ stage ];
As.append( ".a" ); As.append( ".a" );
ss << "texel.rgb = " << arg0 << " * " << As << ";"; ss << "texel.rgb = " << arg0 << " * " << As << ";" << std::endl;
ss << "texel.rgb = texel.rgb + " << arg1 << " * " << "( 1.0 - " << As << " );" << std::endl; ss << "texel.rgb = texel.rgb + " << arg1 << " * " << "( 1.0 - " << As << " );" << std::endl;
} }
break; break;
@ -689,7 +689,7 @@ namespace NL3D
std::string As = texelNames[ stage ]; std::string As = texelNames[ stage ];
As.append( ".a" ); As.append( ".a" );
ss << "texel.a = " << arg0 << " * " << As << ";"; ss << "texel.a = " << arg0 << " * " << As << ";" << std::endl;
ss << "texel.a = texel.a + " << arg1 << " * " << "( 1.0 - " << As << " );" << std::endl; ss << "texel.a = texel.a + " << arg1 << " * " << "( 1.0 - " << As << " );" << std::endl;
} }
break; break;
@ -701,7 +701,7 @@ namespace NL3D
std::string As = "texel.a"; std::string As = "texel.a";
ss << "texel.a = " << arg0 << " * " << As << ";"; ss << "texel.a = " << arg0 << " * " << As << ";" << std::endl;
ss << "texel.a = texel.a + " << arg1 << " * " << "( 1.0 - " << As << " );" << std::endl; ss << "texel.a = texel.a + " << arg1 << " * " << "( 1.0 - " << As << " );" << std::endl;
} }
break; break;
@ -713,7 +713,7 @@ namespace NL3D
std::string As = "diffuse.a"; std::string As = "diffuse.a";
ss << "texel.a = " << arg0 << " * " << As << ";"; ss << "texel.a = " << arg0 << " * " << As << ";" << std::endl;
ss << "texel.a = texel.a + " << arg1 << " * " << "( 1.0 - " << As << " );" << std::endl; ss << "texel.a = texel.a + " << arg1 << " * " << "( 1.0 - " << As << " );" << std::endl;
} }
break; break;
@ -726,7 +726,7 @@ namespace NL3D
std::string As = constantNames[ stage ]; std::string As = constantNames[ stage ];
As.append( ".a" ); As.append( ".a" );
ss << "texel.a = " << arg0 << " * " << As << ";"; ss << "texel.a = " << arg0 << " * " << As << ";" << std::endl;
ss << "texel.a = texel.a + " << arg1 << " * " << "( 1.0 - " << As << " );" << std::endl; ss << "texel.a = texel.a + " << arg1 << " * " << "( 1.0 - " << As << " );" << std::endl;
} }
break; break;
@ -793,7 +793,7 @@ namespace NL3D
break; break;
case CMaterial::SrcAlpha: case CMaterial::SrcAlpha:
ds << "texel.a;"; ds << "texel.a";
break; break;
case CMaterial::InvSrcAlpha: case CMaterial::InvSrcAlpha:
@ -829,19 +829,19 @@ namespace NL3D
switch( op ) switch( op )
{ {
case CMaterial::SrcColor: case CMaterial::SrcColor:
ss << constantNames[ stage ] << ".rgb"; ds << constantNames[ stage ] << ".rgb";
break; break;
case CMaterial::InvSrcColor: case CMaterial::InvSrcColor:
ss << "( vec3( 1.0, 1.0, 1.0 ) - " << constantNames[ stage ] << ".rgb )"; ds << "( vec3( 1.0, 1.0, 1.0 ) - " << constantNames[ stage ] << ".rgb )";
break; break;
case CMaterial::SrcAlpha: case CMaterial::SrcAlpha:
ss << constantNames[ stage ] << ".a"; ds << constantNames[ stage ] << ".a";
break; break;
case CMaterial::InvSrcAlpha: case CMaterial::InvSrcAlpha:
ss << "( 1.0 - " << constantNames[ stage ] << ".a )"; ds << "( 1.0 - " << constantNames[ stage ] << ".a )";
break; break;
} }
break; break;

Loading…
Cancel
Save