mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
RTLightingFeat work.
1) we do *not* in fact want to early out in the presence of MFT_ImposterVert. it mangles the position-send. 2) dx sucessfuly handles the if ( !fd.features[MFT_NormalMap] ) case, so use the same for gl
This commit is contained in:
parent
661a192e87
commit
42e90ad3fb
2 changed files with 2 additions and 7 deletions
|
|
@ -2070,7 +2070,6 @@ RTLightingFeatGLSL::RTLightingFeatGLSL()
|
||||||
void RTLightingFeatGLSL::processVert( Vector<ShaderComponent*> &componentList,
|
void RTLightingFeatGLSL::processVert( Vector<ShaderComponent*> &componentList,
|
||||||
const MaterialFeatureData &fd )
|
const MaterialFeatureData &fd )
|
||||||
{
|
{
|
||||||
if (fd.features[MFT_ImposterVert]) return;
|
|
||||||
MultiLine *meta = new MultiLine;
|
MultiLine *meta = new MultiLine;
|
||||||
|
|
||||||
ShaderConnector *connectComp = dynamic_cast<ShaderConnector *>( componentList[C_CONNECTOR] );
|
ShaderConnector *connectComp = dynamic_cast<ShaderConnector *>( componentList[C_CONNECTOR] );
|
||||||
|
|
@ -2124,8 +2123,7 @@ void RTLightingFeatGLSL::processVert( Vector<ShaderComponent*> &componentList,
|
||||||
|
|
||||||
// If there isn't a normal map then we need to pass
|
// If there isn't a normal map then we need to pass
|
||||||
// the world space normal to the pixel shader ourselves.
|
// the world space normal to the pixel shader ourselves.
|
||||||
//Temporarily disabled while we figure out how to better handle normals without a normal map
|
if ( !fd.features[MFT_NormalMap] )
|
||||||
/*if ( !fd.features[MFT_NormalMap] )
|
|
||||||
{
|
{
|
||||||
Var *outNormal = connectComp->getElement( RT_TEXCOORD );
|
Var *outNormal = connectComp->getElement( RT_TEXCOORD );
|
||||||
outNormal->setName( "wsNormal" );
|
outNormal->setName( "wsNormal" );
|
||||||
|
|
@ -2137,7 +2135,7 @@ void RTLightingFeatGLSL::processVert( Vector<ShaderComponent*> &componentList,
|
||||||
|
|
||||||
// Transform the normal to world space.
|
// Transform the normal to world space.
|
||||||
meta->addStatement( new GenOp( " @ = tMul( @, vec4( normalize( @ ), 0.0 ) ).xyz;\r\n", outNormal, objTrans, inNormal ) );
|
meta->addStatement( new GenOp( " @ = tMul( @, vec4( normalize( @ ), 0.0 ) ).xyz;\r\n", outNormal, objTrans, inNormal ) );
|
||||||
}*/
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2136,8 +2136,6 @@ RTLightingFeatHLSL::RTLightingFeatHLSL()
|
||||||
void RTLightingFeatHLSL::processVert( Vector<ShaderComponent*> &componentList,
|
void RTLightingFeatHLSL::processVert( Vector<ShaderComponent*> &componentList,
|
||||||
const MaterialFeatureData &fd )
|
const MaterialFeatureData &fd )
|
||||||
{
|
{
|
||||||
if (fd.features[MFT_ImposterVert]) return;
|
|
||||||
|
|
||||||
MultiLine *meta = new MultiLine;
|
MultiLine *meta = new MultiLine;
|
||||||
|
|
||||||
ShaderConnector *connectComp = dynamic_cast<ShaderConnector *>( componentList[C_CONNECTOR] );
|
ShaderConnector *connectComp = dynamic_cast<ShaderConnector *>( componentList[C_CONNECTOR] );
|
||||||
|
|
@ -2192,7 +2190,6 @@ void RTLightingFeatHLSL::processVert( Vector<ShaderComponent*> &componentList,
|
||||||
|
|
||||||
// If there isn't a normal map then we need to pass
|
// If there isn't a normal map then we need to pass
|
||||||
// the world space normal to the pixel shader ourselves.
|
// the world space normal to the pixel shader ourselves.
|
||||||
//Temporarily disabled while we figure out how to better handle normals without a normal map
|
|
||||||
if ( !fd.features[MFT_NormalMap] )
|
if ( !fd.features[MFT_NormalMap] )
|
||||||
{
|
{
|
||||||
Var *outNormal = connectComp->getElement( RT_TEXCOORD );
|
Var *outNormal = connectComp->getElement( RT_TEXCOORD );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue