Sign in to follow this  
razor1911

Shadow and the render position - a small query

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this