mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
adds alphatest shadows for translucent objects
leverage the fact shadergen spits out a modified material per pass, in this instance the shadow pass, to basically flip the translucent aspect off if you've got both translucency and alphatesting flipped on.
This commit is contained in:
parent
9c381caea2
commit
ff4b025c2c
5 changed files with 7 additions and 3 deletions
|
|
@ -280,7 +280,7 @@ void TSMesh::innerRender( TSMaterialList *materials, const TSRenderState &rdata,
|
|||
ri->primBuffIndex = mPrimBufferOffset + i;
|
||||
|
||||
// Translucent materials need the translucent type.
|
||||
if ( matInst->getMaterial()->isTranslucent() )
|
||||
if ( matInst->getMaterial()->isTranslucent() && (!(matInst->getMaterial()->isAlphatest() && state->isShadowPass())))
|
||||
{
|
||||
ri->type = RenderPassManager::RIT_Translucent;
|
||||
ri->translucentSort = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue