mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-20 11:55:33 +00:00
Goes and replaces the references/names that use Prepass to be Deferred, since we're actually using deferred.
This commit is contained in:
parent
b052a1f970
commit
af8fbf0e3a
122 changed files with 641 additions and 641 deletions
|
|
@ -163,7 +163,7 @@ void GBufferConditionerGLSL::processPix( Vector<ShaderComponent*> &componentLis
|
|||
|
||||
LangElement *outputDecl = new DecOp( unconditionedOut );
|
||||
|
||||
// If we're doing prepass blending then we need
|
||||
// If we're doing deferred blending then we need
|
||||
// to steal away the alpha channel before the
|
||||
// conditioner stomps on it.
|
||||
Var *alphaVal = NULL;
|
||||
|
|
@ -174,7 +174,7 @@ void GBufferConditionerGLSL::processPix( Vector<ShaderComponent*> &componentLis
|
|||
}
|
||||
|
||||
// If using interlaced normals, invert the normal
|
||||
if(fd.features[MFT_InterlacedPrePass])
|
||||
if(fd.features[MFT_InterlacedDeferred])
|
||||
{
|
||||
// NOTE: Its safe to not call ShaderFeatureGLSL::addOutVpos() in the vertex
|
||||
// shader as for SM 3.0 nothing is needed there.
|
||||
|
|
@ -190,7 +190,7 @@ void GBufferConditionerGLSL::processPix( Vector<ShaderComponent*> &componentLis
|
|||
meta->addStatement( new GenOp(" @ = @;", outputDecl, new GenOp( "float4(normalize(@), @)", gbNormal, depth ) ) );
|
||||
meta->addStatement( assignOutput( unconditionedOut ) );
|
||||
|
||||
// If we have an alpha var then we're doing prepass lerp blending.
|
||||
// If we have an alpha var then we're doing deferred lerp blending.
|
||||
if ( alphaVal )
|
||||
{
|
||||
Var *outColor = (Var*)LangElement::find( getOutputTargetVarName( DefaultTarget ) );
|
||||
|
|
@ -227,10 +227,10 @@ Var* GBufferConditionerGLSL::printMethodHeader( MethodType methodType, const Str
|
|||
methodVar->setType("float4");
|
||||
DecOp *methodDecl = new DecOp(methodVar);
|
||||
|
||||
Var *prepassSampler = new Var;
|
||||
prepassSampler->setName("prepassSamplerVar");
|
||||
prepassSampler->setType("sampler2D");
|
||||
DecOp *prepassSamplerDecl = new DecOp(prepassSampler);
|
||||
Var *deferredSampler = new Var;
|
||||
deferredSampler->setName("deferredSamplerVar");
|
||||
deferredSampler->setType("sampler2D");
|
||||
DecOp *deferredSamplerDecl = new DecOp(deferredSampler);
|
||||
|
||||
Var *screenUV = new Var;
|
||||
screenUV->setName("screenUVVar");
|
||||
|
|
@ -242,7 +242,7 @@ Var* GBufferConditionerGLSL::printMethodHeader( MethodType methodType, const Str
|
|||
bufferSample->setType("float4");
|
||||
DecOp *bufferSampleDecl = new DecOp(bufferSample);
|
||||
|
||||
meta->addStatement( new GenOp( "@(@, @)\r\n", methodDecl, prepassSamplerDecl, screenUVDecl ) );
|
||||
meta->addStatement( new GenOp( "@(@, @)\r\n", methodDecl, deferredSamplerDecl, screenUVDecl ) );
|
||||
|
||||
meta->addStatement( new GenOp( "{\r\n" ) );
|
||||
|
||||
|
|
@ -250,14 +250,14 @@ Var* GBufferConditionerGLSL::printMethodHeader( MethodType methodType, const Str
|
|||
|
||||
#ifdef TORQUE_OS_XENON
|
||||
meta->addStatement( new GenOp( " @;\r\n", bufferSampleDecl ) );
|
||||
meta->addStatement( new GenOp( " asm { tfetch2D @, @, @, MagFilter = point, MinFilter = point, MipFilter = point };\r\n", bufferSample, screenUV, prepassSampler ) );
|
||||
meta->addStatement( new GenOp( " asm { tfetch2D @, @, @, MagFilter = point, MinFilter = point, MipFilter = point };\r\n", bufferSample, screenUV, deferredSampler ) );
|
||||
#else
|
||||
// The gbuffer has no mipmaps, so use tex2dlod when
|
||||
// possible so that the shader compiler can optimize.
|
||||
meta->addStatement( new GenOp( " #if TORQUE_SM >= 30\r\n" ) );
|
||||
meta->addStatement( new GenOp( " @ = tex2Dlod(@, float4(@,0,0));\r\n", bufferSampleDecl, prepassSampler, screenUV ) );
|
||||
meta->addStatement( new GenOp( " @ = tex2Dlod(@, float4(@,0,0));\r\n", bufferSampleDecl, deferredSampler, screenUV ) );
|
||||
meta->addStatement( new GenOp( " #else\r\n" ) );
|
||||
meta->addStatement( new GenOp( " @ = tex2D(@, @);\r\n", bufferSampleDecl, prepassSampler, screenUV ) );
|
||||
meta->addStatement( new GenOp( " @ = tex2D(@, @);\r\n", bufferSampleDecl, deferredSampler, screenUV ) );
|
||||
meta->addStatement( new GenOp( " #endif\r\n\r\n" ) );
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue