|
|
|
@ -162,7 +162,9 @@ CDecal::CDecal()
|
|
|
|
|
{
|
|
|
|
|
DecalAttenuationVertexProgram = new CVertexProgramDecalAttenuation();
|
|
|
|
|
}
|
|
|
|
|
_ShadowMap = new CShadowMap(&(((CSceneUser *) Scene)->getScene().getRenderTrav().getShadowMapManager()));
|
|
|
|
|
|
|
|
|
|
// initialized in render() as depends on scene
|
|
|
|
|
_ShadowMap = NULL;
|
|
|
|
|
_Material.initUnlit();
|
|
|
|
|
_Diffuse = CRGBA::White;
|
|
|
|
|
_Emissive = CRGBA::Black;
|
|
|
|
@ -251,7 +253,11 @@ CRGBA CDecal::getDiffuse() const
|
|
|
|
|
// ****************************************************************************
|
|
|
|
|
CDecal::~CDecal()
|
|
|
|
|
{
|
|
|
|
|
if (_ShadowMap)
|
|
|
|
|
{
|
|
|
|
|
delete _ShadowMap;
|
|
|
|
|
_ShadowMap = NULL;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ****************************************************************************
|
|
|
|
@ -527,7 +533,12 @@ void CDecal::render(NL3D::UDriver &/* drv */,
|
|
|
|
|
//
|
|
|
|
|
float tileNear = Landscape->getTileNear();
|
|
|
|
|
//
|
|
|
|
|
if (!_ShadowMap)
|
|
|
|
|
{
|
|
|
|
|
_ShadowMap = new CShadowMap(&(((CSceneUser *) Scene)->getScene().getRenderTrav().getShadowMapManager()));
|
|
|
|
|
nlassert(_ShadowMap);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_ShadowMap->LocalClipPlanes.resize(4);
|
|
|
|
|
CVector corners[4] =
|
|
|
|
|
{
|
|
|
|
|