TGEA 1.7.1 Ground Cover billboards overbrite and transparent
by Jaimi McEntire · in Torque Game Engine Advanced · 08/24/2008 (7:29 pm) · 1 replies
I'm not sure what sequence of events causes this, but when I added a groundcover to a new mission, the billboards were all super brite and alpha blended (it looked almost like an additive blend). In addition, they didn't fade out like they were supposed to, just went on until they hit the maximum distance (and looked really nasty). I didn't use any shapes, just billboards, so I don't know how they were affected.
Strange thing was, it looked right after I added an FxFoliageReplicator to the scene (but only in the editor, and only when ShowPlacementArea was checked and when the purple band was also being rendered!).
So, I took the initialization code out of fxFoliageReplicator::renderPlacementArea, and put it at the top of GroundCoverCell::initRender:
This has solved the problems, but I'm not sure why. The colors looked right in the VB's, but I can't debug into the shaders to see what the actual problem was, if any. I did update to the latest nVidia driver (the one with Physx included in it), not sure if that has anything to do with it.
Strange thing was, it looked right after I added an FxFoliageReplicator to the scene (but only in the editor, and only when ShowPlacementArea was checked and when the purple band was also being rendered!).
So, I took the initialization code out of fxFoliageReplicator::renderPlacementArea, and put it at the top of GroundCoverCell::initRender:
PROFILE_SCOPE(GroundCoverCell_initRender); // Added GFX->setTextureStageColorOp(0, GFXTOPDisable); GFX->setTextureStageColorOp(1, GFXTOPDisable); GFX->setAlphaBlendEnable( true ); GFX->setAlphaTestEnable( true ); GFX->setSrcBlend(GFXBlendSrcAlpha); GFX->setDestBlend(GFXBlendInvSrcAlpha); GFX->setTextureStageAddressModeU( 0, GFXAddressClamp ); GFX->setTextureStageAddressModeV( 0, GFXAddressClamp ); GFX->setTextureStageAddressModeU( 1, GFXAddressClamp ); GFX->setTextureStageAddressModeV( 1, GFXAddressClamp ); // Added
This has solved the problems, but I'm not sure why. The colors looked right in the VB's, but I can't debug into the shaders to see what the actual problem was, if any. I did update to the latest nVidia driver (the one with Physx included in it), not sure if that has anything to do with it.
Associate Tom Spilman
Sickhead Games