mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-28 15:55:39 +00:00
from @rextimmy new isbackground shader feature. used the same z=w trick we've done before to force things to render behind everything else. applied to fog
This commit is contained in:
parent
dda0cc9aa7
commit
454192ed02
8 changed files with 15 additions and 4 deletions
|
|
@ -1743,7 +1743,7 @@ void VertPositionGLSL::processVert( Vector<ShaderComponent*> &componentList,
|
|||
|
||||
meta->addStatement( new GenOp( " @ = tMul(@, vec4(@.xyz,1));\r\n",
|
||||
outPosition, modelview, inPosition ) );
|
||||
if (fd.materialFeatures[MFT_SkyBox])
|
||||
if (fd.materialFeatures[MFT_isBackground])
|
||||
{
|
||||
meta->addStatement(new GenOp(" @ = @.xyww;\r\n", outPosition, outPosition));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ void _initShaderGenGLSL( ShaderGen *shaderGen )
|
|||
FEATUREMGR->registerFeature( MFT_PBRConfigVars, new PBRConfigVarsGLSL );
|
||||
FEATUREMGR->registerFeature( MFT_MatInfoFlags, new MatInfoFlagsGLSL );
|
||||
FEATUREMGR->registerFeature( MFT_GlowMap, new GlowMapGLSL);
|
||||
FEATUREMGR->registerFeature( MFT_isBackground, new NamedFeatureGLSL("Background Object"));
|
||||
FEATUREMGR->registerFeature( MFT_SkyBox, new NamedFeatureGLSL( "skybox" ) );
|
||||
FEATUREMGR->registerFeature( MFT_HardwareSkinning, new HardwareSkinningFeatureGLSL );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1781,7 +1781,7 @@ void VertPositionHLSL::processVert( Vector<ShaderComponent*> &componentList,
|
|||
meta->addStatement( new GenOp( " @ = mul(@, float4(@.xyz,1));\r\n",
|
||||
outPosition, modelview, inPosition ) );
|
||||
|
||||
if (fd.materialFeatures[MFT_SkyBox])
|
||||
if (fd.materialFeatures[MFT_isBackground])
|
||||
{
|
||||
meta->addStatement(new GenOp(" @ = @.xyww;\r\n", outPosition, outPosition));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ void _initShaderGenHLSL( ShaderGen *shaderGen )
|
|||
FEATUREMGR->registerFeature( MFT_PBRConfigVars, new PBRConfigVarsHLSL);
|
||||
FEATUREMGR->registerFeature( MFT_MatInfoFlags, new MatInfoFlagsHLSL );
|
||||
FEATUREMGR->registerFeature( MFT_GlowMap, new GlowMapHLSL);
|
||||
FEATUREMGR->registerFeature( MFT_isBackground, new NamedFeatureHLSL("Background Object"));
|
||||
FEATUREMGR->registerFeature( MFT_SkyBox, new NamedFeatureHLSL( "skybox" ) );
|
||||
FEATUREMGR->registerFeature( MFT_HardwareSkinning, new HardwareSkinningFeatureHLSL );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue