Skip to main content
gamedev.net
🔒 Locked

Shadow volume visible????

Started by SoaringTortoise 3 replies 850+ views
Original Post
SoaringTortoise
SoaringTortoise
Hmmm, I've just put in a shadow volume function, but it draws the actual shadow volume as well as the shadow. What's the right render-state to stop this happening? (I tried setting the ambient material to 0 alpha, but then nothing gets drawn)
Always prey on the weak, the timid and the stupid. Otherwise you'll just get your butt kicked
For a tortoise, this is extremely hard to do, but when you get it right... the expression on their faces ...
tomek_zielinski
tomek_zielinski

to stop rendering shadow volume just disable backbuffer writes
glColorMask(0,0,0,0)
or
device->SetRenderState( D3DRS_COLOWRITEENABLE, 0 );



BTW: when using shadow volumes don't use TnL lighting(ambient material's etc - why do you need it?)
www.tmreality.com
SoaringTortoise
SoaringTortoise
Ahh, thanks.

I'm using TL basically because (as a low-cost shadow option), I'm looking at using a static cylinder to be the shadow volume (saves the processing time needed to build the volume). Seemed like a quick and dirty way to do it instead of creating the cylinder in code... will probably end up doing it that way eventually, but this is for a quick test kind of thing - hoping it'll be faster than using a shadowblob decal.
Always prey on the weak, the timid and the stupid. Otherwise you'll just get your butt kicked
For a tortoise, this is extremely hard to do, but when you get it right... the expression on their faces ...
tomek_zielinski
tomek_zielinski
hey thanx! this cylinder seems to be a good solution for me, eve though you didn't know it while replaying:) I didn't realized that I could do blow shadow this way!

www.tmreality.com
SoaringTortoise
SoaringTortoise
No worries. Just got a bit of a shock though, forgot that the colorwriteenable isn't a boolean.... set it to 1 and everything went PINK! Total freak-out, but it has given me a neat idea for some special effects.
Always prey on the weak, the timid and the stupid. Otherwise you'll just get your butt kicked
For a tortoise, this is extremely hard to do, but when you get it right... the expression on their faces ...

Topic Locked

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

Sign in to reply to this topic.