Hello.
Is it possible to increase or decrease the value in the stencil only if the pixel is not affected by the stencil function in love.graphics.stencil?
[Closed] Change stencil when depth test fails
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
[Closed] Change stencil when depth test fails
Last edited by siberian on Mon Jan 02, 2023 3:07 pm, edited 1 time in total.
-
- Party member
- Posts: 548
- Joined: Wed Oct 05, 2016 11:53 am
Re: Change stencil when depth test fails
As far as I know, the stencil function can only alter the values of pixels it touches, as per the StencilAction page on the wiki (except maybe Invert? Never used it). As such, depending on if you want to limit your rendering to things the stencil touches, or to limit to things the stencil is not touching, you'll have to consider different CompareModes in love.graphics.setStencilTest. All depends on your stencil setup, of course.
- slime
- Solid Snayke
- Posts: 3161
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Change stencil when depth test fails
love doesn't support that right now. What sort of thing would you use it for?
- slime
- Solid Snayke
- Posts: 3161
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: [Closed] Change stencil when depth test fails
I think pretty much all 3D games these days use shadow mapping (which love does expose functionality for) instead of shadow volumes.
That's not to say stencil actions when the depth test fails definitely won't be exposed in the future, just that their practical use is pretty limited - shadow volumes via depth-fail stenciling was the main thing which used that feature but its downsides compared to shadow mapping mean people generally choose the latter instead.
That's not to say stencil actions when the depth test fails definitely won't be exposed in the future, just that their practical use is pretty limited - shadow volumes via depth-fail stenciling was the main thing which used that feature but its downsides compared to shadow mapping mean people generally choose the latter instead.
Re: [Closed] Change stencil when depth test fails
I haven't made friends with the shadow maps yet . So far I have only had problems with them.
But I think I'll learn someday.
Thank you.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], rabbitboots and 3 guests