Skip to main content
gamedev.net
🔒 Locked

shadow problem

Started by niazware 0 replies 450+ views
Original Post
niazware
niazware
hi friends I'm working on a strategy-type game (something like sims), I'm using d3d 9 for rendering my scene, for object shadows, I use pre-rendered shadow maps, shadows should be shown on top of my ground, but when I look at them from high distances, there are flickers, some kind of polygonal artifacts. One way is to move shadows upper, but what else can I do? what about BIAS? I've heard and read that bias (which I think is a render state) can solve these kind of problems, how can I use it? how can I solve this problem, of course right now I have more objects (like roads) which should be rendered on top of ground, so it can be more sophisticated. thanks in advance
qingrui
qingrui
DepthBias can help but it's not supported on older cards. It used to be ZBias in D3D8 IIRC, which is implemented differently by different card vendors.

The best way for shadow map i think is to use multi-texture. It's also ok to use multi-pass, with the same geometry at the exactly same position. Of course DepthFunc should be LessEqual.

For roads, if they can use the same geometry as terrain, they can use the that way too. But if the roads are using different triangles, you have to use bias for the best result. A small offset won't work well if the camera can move from the ground to very far away.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.