Problem with rendering depth map to texture
Posted: Fri Jul 26, 2019 1:38 am
Hey there. I'm pretty sure this has been covered somewhere on this forum but I just can't find it.
So the problem is - I'm trying to make shadow maps. And I got it working but there is one problem - it looks like shadow maps are lagging. Depth map rendering is lagging to be exact. The current scenario looks like this:
Now before you tell my anything, yes I do realize this will actually render depth map a frame late than necesssary, but no matter what I change it still lags.
I tried to render each node manually but something doesn't work this way. I tried the next scenario:
but it just doesn't render anything at all.
How can I render depth map after everything is updated but before anything is rendered? Or do I just have to change irrlicht itself?
So the problem is - I'm trying to make shadow maps. And I got it working but there is one problem - it looks like shadow maps are lagging. Depth map rendering is lagging to be exact. The current scenario looks like this:
Code: Select all
render depth map by rendering each necessary node's render() method
render everything else by calling drawAll()
I tried to render each node manually but something doesn't work this way. I tried the next scenario:
Code: Select all
call camera's OnRegisterSceneNode(), then render()
In a loop: call each node's OnAnimate(), then OnRegisterSceneNode() then render()
How can I render depth map after everything is updated but before anything is rendered? Or do I just have to change irrlicht itself?