Sign in to follow this  

Spotlight effect/Masking Problems

This topic is 2848 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

Hello, I have been trying to get this to work for a while and I'm not having much luck so I thought I would try here. Basically I have a spotlight effect working in my program...to do this I create a large quad that covers the entire viewing area that is all black and then a smaller quad that is black and transparent in the middle. Using the depth buffer I am able to combine the two and get a nice lighting effect. See figure 1: Photobucket I would like to have others (lights) on the screen also. As you can see from figure 2 this works...sort of... Photobucket The problem is these lights move, and when they cross paths...ugh...I can see the outline of the entire smaller quad of the other lights... =/ Photobucket bad3 Here you can see the entire thing! bad2 Is there anyway I can prevent this? I guess what I've been thinking is to try and have the depth buffer only contain the transparent part...and not have the opaque part drawn on the screen. But I'm not sure this is possible or how to do it. Thank you for reading. [Edited by - bluelobster on February 26, 2010 11:53:53 AM]

Share this post


Link to post
Share on other sites

This topic is 2848 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.

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