FIX: alpha tested modulative shadows
Posted: Thu Jun 09, 2011 8:16 pm
Original Code: OgreSceneManager.cpp line 4921
New Code:
All I did was allow the original Pass texture units to be sent to the shader. Since these parameters are optimized out when not used I figured that it wouldn't hurt. Now "modulate" custom shadow shaders have access to their textures. Before this change, only the shadow map and (maybe) the spotlight texture was sent to the receiver.
Sure you could override EVERY material with custom integrated shaders, but this was a 1 line fix for hundreds of materials that just need a generic shadow technique.
Code: Select all
unsigned short keepTUCount;
// If additive, need lighting parameters & standard programs
if (isShadowTechniqueAdditive())
Code: Select all
unsigned short keepTUCount;
// If additive, need lighting parameters & standard programs
if (isShadowTechniqueAdditive() || !retPass->getVertexProgramName().empty())
Sure you could override EVERY material with custom integrated shaders, but this was a 1 line fix for hundreds of materials that just need a generic shadow technique.