Stencil Functions

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
McZonk
Posts: 35
Joined: Thu Jul 14, 2005 10:42 pm
Location: Germany
Contact:

Stencil Functions

Post by McZonk »

At the moment the sceGuStencil..... functions are undocumented. Is it because the behavior is unknown? If not could anyone send me the docu. Perhaps the constants are known?
Otherwise I would try to use the stencil functions like the funtions in OpenGL. If a find find something, I will publish it here.
jsgf
Posts: 254
Joined: Tue Jul 12, 2005 11:02 am
Contact:

Re: Stencil Functions

Post by jsgf »

McZonk wrote:At the moment the sceGuStencil..... functions are undocumented. Is it because the behavior is unknown? If not could anyone send me the docu. Perhaps the constants are known?
Otherwise I would try to use the stencil functions like the funtions in OpenGL. If a find find something, I will publish it here.
I would guess the stencil operations are pretty similar to OpenGL; there should be at least KEEP, REPLACE, ZERO, INVERT, INCR, DECR operations, so there aren't very many combinations to test for. It should be possible to write a program which can test for this.

The stencil functions are the same as for depth and alpha testing, so I'd assume they're the same values.

I bet "GU_UNKNOWN_3" is actually GU_STENCIL_TEST.
chp
Posts: 313
Joined: Wed Jun 23, 2004 7:16 am

Post by chp »

Yes, the GE is very much OpenGL-inspired. I have verified and written a sample for how logical color-ops work now, and I copied the different ops straight from gl.h. They've made it way too easy. :)

I'll get on stencil-operations in a little while, there are a few other fields I'm looking into at the moment. Feel free to help out though. :)
GE Dominator
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

chp wrote:Yes, the GE is very much OpenGL-inspired. I have verified and written a sample for how logical color-ops work now, and I copied the different ops straight from gl.h. They've made it way too easy. :)
That was the point with the PSP - they went out of their way, apparently, to make developing for it easy and relatively low-cost. Clever move.
McZonk
Posts: 35
Joined: Thu Jul 14, 2005 10:42 pm
Location: Germany
Contact:

Post by McZonk »

chp wrote:I'll get on stencil-operations in a little while, there are a few other fields I'm looking into at the moment. Feel free to help out though. :)
I'm on trying around with stencil buffer, I wrote an easy programm to check sample values via loops as parameters to stencil functions.
I hope I can cast realtime shadows over the weekend. Contact me, if you are interesstend in sources.
McZonk
Posts: 35
Joined: Thu Jul 14, 2005 10:42 pm
Location: Germany
Contact:

Post by McZonk »

I got the first simple example with the stencil buffer. Just an easy reflection in a mirror. If I got the shadows working too, I will release source. Perhaps some of you guys can add it as an example in the pspsdk.

http://www.pspupdates.com/2005/07/3d-re ... r-psp.html
chp
Posts: 313
Joined: Wed Jun 23, 2004 7:16 am

Post by chp »

McZonk wrote:I got the first simple example with the stencil buffer. Just an easy reflection in a mirror. If I got the shadows working too, I will release source. Perhaps some of you guys can add it as an example in the pspsdk.

http://www.pspupdates.com/2005/07/3d-re ... r-psp.html
Nice! Yes, source would be nice... Both for adding as a sample, and to reduce the amount of unknown stuff in pspgu.h. I'm all ears. :)
GE Dominator
Post Reply