OgreScriptTranslator.cpp
case ID_COLOUR_WRITE:
...
bool val = false;
if(getBoolean(prop->values.front(), &val))
{
blendblock.mBlendChannelMask = val ? HlmsBlendblock::BlendChannelAll : 0;
}
Bug or Feature?
- dark_sylinc
- OGRE Team Member
- Posts: 5296
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1278
- Contact:
Re: Bug or Feature?
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).
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).
-
- Gnoblar
- Posts: 7
- Joined: Sun Nov 24, 2019 6:34 pm
Re: Bug or Feature?
Thanks for your answer. I have found a solution to my problem.