• Advertisement
Sign in to follow this  

Shadow and the render position - a small query

This topic is 2688 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hope i'll get this straight.

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 from
x=currentcellcenter.x-CELL_SIZE/2;
y=currentcellcenter.y+50;
z=currentcellcenter.z-CELL_SIZE/2;

//targetted to
x1=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]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement