My engine divides a 512x512 map into a cells of size 16x16 - and renders by first frustum culling / occlusion culling the visible cells.
I'm almost done with everything inside, now implemented variance SM and thinking how do i setup the sun position for shadowmap to become real.
As for test approach i am rendering to shadowmap texture from a position:
//pseudocode//render the view fromx=currentcellcenter.x-CELL_SIZE/2;y=currentcellcenter.y+50;z=currentcellcenter.z-CELL_SIZE/2;//targetted tox1=currentcellcenter.x;y1=0;z1=currentcellcenter.z;
It is obvious that when i cross to another cell my shadow is being rendered with a position of another cell what generates a bad effect causing shadow to 'jump' between cells when i cross from one to another.
Now the question - what are the approaches i could take?
Of course rendering from higher positions make the shadowmap look ultra-ugly.
What can i do with that implementation to stop making the shadows to jump over the cells and see the shadow in at least a distance of 3cells in front.
Or are there any well known tips for setting the position of a shadowmap to render? How to approach that ?
Much appreciated for any suggestion here.
Best regards!
[Edited by - razor1911 on October 12, 2010 5:43:32 PM]