Hi,
To be honest, when looking the code and based on the theory, to generate the shadow map, you need to render the scene from the light's point of view. Whatever if you use forward lighting or deffered.
In Horde3D, the following method is used for forward lighting:
Code:
void Renderer::drawLightGeometry( const string &shaderContext, const string &theClass,
bool noShadows, RenderingOrder::List order, int occSet )
this one for deffered lighting:
Code:
void Renderer::drawLightShapes( const string &shaderContext, bool noShadows, int occSet )
but in both of them, the following method is used to generate shadow map:
Code:
void Renderer::updateShadowMap();
which calls:
Code:
drawRenderables( _curLight->_shadowContext, "", false, &frustum, 0x0, RenderingOrder::None, -1 );
also, default "" class means all geometry, and no order.
I did a try by changing by updating the method:
Code:
void Renderer::updateShadowMap(const string &theClass, RenderingOrder::List order)
and in the pipeline :
Quote:
<DoDeferredLightLoop class="TheClass"/>
it works perfect. (in my case
)
What do you think?