Compositor visibility masks

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Fedyakin
Halfling
Posts: 43
Joined: Thu Jul 14, 2005 6:48 pm

Compositor visibility masks

Post by Fedyakin »

I believe there is a bug in the way compositors handle visibility flags. When a compositor script doesn't explicitly set a visibility mask, it uses the mask from the previous operation. This chains back to the automatically created original scene compositor. CompositorChain::preViewportUpdate sets that compositors mask to the current viewport's mask. However, in CompositorChain::preTargetOperation() it applies the operation's mask to the scene manager. This means that when compositors are being used, any use of the scene manager visibility flags by client code is silently ignored.

I propose that compositors should never modify SceneManager visibility flags, only the Viewport visibility flags. The visibility tests already use the combined viewport and scene manager visibility flags. This change allows the scene manager flags to function when compositors are present, and not lose any existing compositor functionality.

I have a patch that implements this (and updates the compositor script documentation). Is this change acceptable, or is there a better way to fix the problem?
User avatar
razi
Greenskin
Posts: 130
Joined: Tue Oct 14, 2008 5:54 pm
Location: Slovakia
x 17

Re: Compositor visibility masks

Post by razi »

So I see this patch was ignored. I think this bug should be fixed, its basically just commenting out one line.
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: Compositor visibility masks

Post by masterfalcon »

Was the patch ever submitted to the patch tracker?
Fedyakin
Halfling
Posts: 43
Joined: Thu Jul 14, 2005 6:48 pm

Re: Compositor visibility masks

Post by Fedyakin »

I didn't submit a patch to the patch tracking system. The proposal slightly changes the behavior of compositors and I wasn't sure if that was acceptable. However, I created a ticket in mantis http://www.ogre3d.org/mantis/view.php?id=513. The ticket includes a patch implementing the proposed change.
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: Compositor visibility masks

Post by masterfalcon »

Ok, that's good. I'm sure it'll get checked out at some point. Don't worry.
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

Re: Compositor visibility masks

Post by Transporter »

Don't worry, I've waited about a month until my patches have been accepted.

At this point I have to say that the ogre team did a great job over the last weeks. There have been so many changes (look at changelog). Ogre seems to be a living project.
FlorianGeorge
Halfling
Posts: 86
Joined: Tue Sep 01, 2009 7:15 pm
Location: Cologne, Germany
x 4

Re: Compositor visibility masks

Post by FlorianGeorge »

As you are already digging into Compositors, could you maybe check whether this bug is fixable: http://www.ogre3d.org/forums/viewtopic.php?f=2&t=62811