Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Marigold Fleur

Member Since 19 Dec 2011
Offline Last Active Private

Posts I've Made

In Topic: Using precomputed stencil volumes and Carmack's Reverse for hole rendering

23 August 2014 - 08:51 PM

You should definitely be able to do that.. by first drawing all your visible geometry only to the depth-buffer, then drawing the subtracted object like a stencil volume, and then finally drawing all your visible geometry again to the color-buffer. Set stencil-testing for the visible pass to only allow geometry outside of the shadow volume (same as when using stencil-shadows with additive lighting passes).

 

Okay, I was hoping that was the case. Now for the tricky bit. I plan on having the players be able to lay down multiple holes that may intersect. The main reason I'm looking at Carmack's reverse over other solutions is because it doesn't seem to suffer from the same artefacting issues as depth-pass and exclusive-or. I trust I won't have any severe issues if I have multiple overlapping holes at different depths?


In Topic: Using precomputed stencil volumes and Carmack's Reverse for hole rendering

23 August 2014 - 08:32 PM

Are you aiming for CSG, perhaps something like the following?

ftp://ftp.sgi.com/opengl/contrib/blythe/advanced99/notes/node22.html

 

I had that open a while ago, but I think it's a bit more than what I need. All I really want to do is discard intersected pixels, while this goes so far as to compute all new faces. Plus I'm only handling subtraction and not an entire CSG set, which is something I'm already writing in the background for collision handling.


PARTNERS