mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-24 05:45:40 +00:00
uninitialized and unused value cleanups
(cherry picked from commit 1f08602cf0ad84409cd8b3520510f9c6ce7d5f9c)
This commit is contained in:
parent
1230d0d280
commit
0d4221fa59
38 changed files with 176 additions and 360 deletions
|
|
@ -184,7 +184,7 @@ void CustomFeatureGLSL::addVariable(String name, String type, String defaultValu
|
|||
void CustomFeatureGLSL::addConnector(String name, String type, String elementName)
|
||||
{
|
||||
// grab connector texcoord register
|
||||
ShaderConnector* connectComp = dynamic_cast<ShaderConnector*>(mComponentList[C_CONNECTOR]);
|
||||
//ShaderConnector* connectComp = dynamic_cast<ShaderConnector*>(mComponentList[C_CONNECTOR]);
|
||||
|
||||
//Get element
|
||||
S32 element = -1;
|
||||
|
|
|
|||
|
|
@ -2139,16 +2139,8 @@ void RTLightingFeatGLSL::processPix( Vector<ShaderComponent*> &componentList,
|
|||
if ( fd.features[MFT_LightMap] || fd.features[MFT_ToneMap] || fd.features[MFT_VertLit] )
|
||||
return;
|
||||
|
||||
ShaderConnector *connectComp = dynamic_cast<ShaderConnector *>( componentList[C_CONNECTOR] );
|
||||
|
||||
MultiLine *meta = new MultiLine;
|
||||
|
||||
// Now the wsPosition and wsView.
|
||||
Var *wsPosition = getInWsPosition( componentList );
|
||||
Var* worldToTangent = getInWorldToTangent(componentList);
|
||||
Var* wsNormal = getInWorldNormal(componentList);
|
||||
Var *wsView = getWsView( wsPosition, meta );
|
||||
|
||||
// Look for a light mask generated from a previous
|
||||
// feature (this is done for BL terrain lightmaps).
|
||||
LangElement *lightMask = LangElement::find( "lightMask" );
|
||||
|
|
@ -2202,10 +2194,7 @@ void RTLightingFeatGLSL::processPix( Vector<ShaderComponent*> &componentList,
|
|||
{
|
||||
Con::errorf("ShaderGen::RTLightingFeatGLSL() - failed to generate surface!");
|
||||
return;
|
||||
}
|
||||
Var *roughness = (Var*)LangElement::find("roughness");
|
||||
|
||||
Var *metalness = (Var*)LangElement::find("metalness");
|
||||
}
|
||||
|
||||
Var *curColor = (Var*)LangElement::find(getOutputTargetVarName(ShaderFeature::DefaultTarget));
|
||||
|
||||
|
|
@ -2957,16 +2946,8 @@ void ReflectionProbeFeatGLSL::processPix(Vector<ShaderComponent*>& componentList
|
|||
if (fd.features[MFT_LightMap] || fd.features[MFT_ToneMap] || fd.features[MFT_VertLit])
|
||||
return;
|
||||
|
||||
ShaderConnector * connectComp = dynamic_cast<ShaderConnector*>(componentList[C_CONNECTOR]);
|
||||
|
||||
MultiLine * meta = new MultiLine;
|
||||
|
||||
// Now the wsPosition and wsView.
|
||||
Var *wsPosition = getInWsPosition(componentList);
|
||||
Var *worldToTangent = getInWorldToTangent(componentList);
|
||||
Var *wsNormal = getInWorldNormal(componentList);
|
||||
Var *wsView = getWsView(wsPosition, meta);
|
||||
|
||||
|
||||
//Reflection Probe WIP
|
||||
U32 MAX_FORWARD_PROBES = 4;
|
||||
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ void CustomFeatureHLSL::addVariable(String name, String type, String defaultValu
|
|||
void CustomFeatureHLSL::addConnector(String name, String type, String elementName)
|
||||
{
|
||||
// grab connector texcoord register
|
||||
ShaderConnector* connectComp = dynamic_cast<ShaderConnector*>(mComponentList[C_CONNECTOR]);
|
||||
//ShaderConnector* connectComp = dynamic_cast<ShaderConnector*>(mComponentList[C_CONNECTOR]);
|
||||
|
||||
//Get element
|
||||
S32 element = -1;
|
||||
|
|
|
|||
|
|
@ -122,19 +122,6 @@ void DebugVizHLSL::processPix(Vector<ShaderComponent*>& componentList,
|
|||
if (fd.features[MFT_LightMap] || fd.features[MFT_ToneMap] || fd.features[MFT_VertLit])
|
||||
return;
|
||||
|
||||
ShaderConnector* connectComp = dynamic_cast<ShaderConnector*>(componentList[C_CONNECTOR]);
|
||||
|
||||
MultiLine* meta = new MultiLine;
|
||||
|
||||
// Now the wsPosition and wsView.
|
||||
Var* worldToTangent = getInWorldToTangent(componentList);
|
||||
Var* wsNormal = getInWorldNormal(componentList);
|
||||
Var* wsPosition = getInWsPosition(componentList);
|
||||
Var* wsView = getWsView(wsPosition, meta);
|
||||
|
||||
//Reflection Probe WIP
|
||||
U32 MAX_FORWARD_PROBES = 4;
|
||||
|
||||
Var* numProbes = (Var*)LangElement::find("inNumProbes");
|
||||
Var* cubeMips = (Var*)LangElement::find("cubeMips");
|
||||
Var* skylightCubemapIdx = (Var*)LangElement::find("inSkylightCubemapIdx");
|
||||
|
|
@ -146,21 +133,10 @@ void DebugVizHLSL::processPix(Vector<ShaderComponent*>& componentList,
|
|||
Var* worldToObjArray = (Var*)LangElement::find("inWorldToObjArray");
|
||||
|
||||
Var* BRDFTexture = (Var*)LangElement::find("BRDFTexture");
|
||||
Var* BRDFTextureTex = (Var*)LangElement::find("texture_BRDFTexture");
|
||||
|
||||
Var* specularCubemapAR = (Var*)LangElement::find("SpecularCubemapAR");
|
||||
Var* specularCubemapARTex = (Var*)LangElement::find("texture_SpecularCubemapAR");
|
||||
|
||||
Var* irradianceCubemapAR = (Var*)LangElement::find("IrradianceCubemapAR");
|
||||
Var* irradianceCubemapARTex = (Var*)LangElement::find("texture_IrradianceCubemapAR");
|
||||
|
||||
Var* matinfo = (Var*)LangElement::find("ORMConfig");
|
||||
Var* metalness = (Var*)LangElement::find("metalness");
|
||||
Var* roughness = (Var*)LangElement::find("roughness");
|
||||
|
||||
Var* wsEyePos = (Var*)LangElement::find("eyePosWorld");
|
||||
|
||||
Var* ibl = (Var*)LangElement::find("ibl");
|
||||
|
||||
//Reflection vec
|
||||
Var* showAttenVar = new Var("showAttenVar", "int");
|
||||
|
|
|
|||
|
|
@ -2217,16 +2217,10 @@ void RTLightingFeatHLSL::processPix( Vector<ShaderComponent*> &componentList,
|
|||
if ( fd.features[MFT_LightMap] || fd.features[MFT_ToneMap] || fd.features[MFT_VertLit] )
|
||||
return;
|
||||
|
||||
ShaderConnector *connectComp = dynamic_cast<ShaderConnector *>( componentList[C_CONNECTOR] );
|
||||
//ShaderConnector *connectComp = dynamic_cast<ShaderConnector *>( componentList[C_CONNECTOR] );
|
||||
|
||||
MultiLine *meta = new MultiLine;
|
||||
|
||||
// Now the wsPosition and wsView.
|
||||
Var *wsPosition = getInWsPosition( componentList );
|
||||
Var* worldToTangent = getInWorldToTangent(componentList);
|
||||
Var* wsNormal = getInWorldNormal(componentList);
|
||||
Var *wsView = getWsView( wsPosition, meta );
|
||||
|
||||
|
||||
// Look for a light mask generated from a previous
|
||||
// feature (this is done for BL terrain lightmaps).
|
||||
LangElement *lightMask = LangElement::find( "lightMask" );
|
||||
|
|
@ -2280,10 +2274,7 @@ void RTLightingFeatHLSL::processPix( Vector<ShaderComponent*> &componentList,
|
|||
{
|
||||
Con::errorf("ShaderGen::RTLightingFeatHLSL() - failed to generate surface!");
|
||||
return;
|
||||
}
|
||||
Var *roughness = (Var*)LangElement::find("roughness");
|
||||
|
||||
Var *metalness = (Var*)LangElement::find("metalness");
|
||||
}
|
||||
|
||||
Var *curColor = (Var*)LangElement::find(getOutputTargetVarName(ShaderFeature::DefaultTarget));
|
||||
|
||||
|
|
@ -3035,16 +3026,10 @@ void ReflectionProbeFeatHLSL::processPix(Vector<ShaderComponent*> &componentList
|
|||
if (fd.features[MFT_LightMap] || fd.features[MFT_ToneMap] || fd.features[MFT_VertLit])
|
||||
return;
|
||||
|
||||
ShaderConnector *connectComp = dynamic_cast<ShaderConnector *>(componentList[C_CONNECTOR]);
|
||||
//ShaderConnector *connectComp = dynamic_cast<ShaderConnector *>(componentList[C_CONNECTOR]);
|
||||
|
||||
MultiLine *meta = new MultiLine;
|
||||
|
||||
// Now the wsPosition and wsView.
|
||||
Var* wsPosition = getInWsPosition(componentList);
|
||||
Var* worldToTangent = getInWorldToTangent(componentList);
|
||||
Var *wsNormal = getInWorldNormal(componentList);
|
||||
Var *wsView = getWsView(wsPosition, meta);
|
||||
|
||||
|
||||
//Reflection Probe WIP
|
||||
U32 MAX_FORWARD_PROBES = 4;
|
||||
|
||||
|
|
|
|||
|
|
@ -130,8 +130,8 @@ public:
|
|||
//**************************************************************************
|
||||
struct Resources
|
||||
{
|
||||
U32 numTex;
|
||||
U32 numTexReg;
|
||||
U32 numTex = 0;
|
||||
U32 numTexReg = 0;
|
||||
|
||||
Resources()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue