Bug or Feature?

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
a_programmer
Gnoblar
Posts: 7
Joined: Sun Nov 24, 2019 6:34 pm

Bug or Feature?

Post by a_programmer »

OgreScriptTranslator.cpp

case ID_COLOUR_WRITE:
...
bool val = false;
if(getBoolean(prop->values.front(), &val))
{
blendblock.mBlendChannelMask = val ? HlmsBlendblock::BlendChannelAll : 0;
}
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5292
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: Bug or Feature?

Post by dark_sylinc »

Hi!

The traditional material scripts from Ogre 1.x asked for a true/false, hence this is intentional. And we also considered this is the most common use case thus the semantic made sense (turn colour writes on/off).

If you want to specify a per-channel mask you can use either JSON materials or modify the mask from C++, or submit a PR with a new keyword alongside colour_write that would let you specify a mask rather than a true/false option (e.g. colour_write_mask).
a_programmer
Gnoblar
Posts: 7
Joined: Sun Nov 24, 2019 6:34 pm

Re: Bug or Feature?

Post by a_programmer »

Thanks for your answer. I have found a solution to my problem.
Post Reply