Masking with stencil in compositor

Problems building or running the engine, queries about how to use features etc.
Post Reply
xrgo
OGRE Expert User
OGRE Expert User
Posts: 1148
Joined: Sat Jul 06, 2013 10:59 pm
Location: Chile
x 168

Masking with stencil in compositor

Post by xrgo »

Hello!!
I want to mask the sky (ie: sky white everything else black) and use it as input for a compositor post process effect (godrays), I used to do this with mrt, but I think it might be cheaper/convenient/possible using the stencil buffer. But I have no idea how to use the stencil feature at all (and couldn't find sample code in the forums) please help =)
Ogre 2.1

Thanks!! :D
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5299
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1280
Contact:

Re: Masking with stencil in compositor

Post by dark_sylinc »

There is a stencil test sample in the v2.1-pso branch. I don't know if it will work in the regular 2.1 branch (I can't remember if some stencil bug was fixed or if I just created the test to check everything was working correctly)
xrgo
OGRE Expert User
OGRE Expert User
Posts: 1148
Joined: Sat Jul 06, 2013 10:59 pm
Location: Chile
x 168

Re: Masking with stencil in compositor

Post by xrgo »

thank you! i'll try that!
Post Reply