[2.2] Two Sided Lighting in .material ignored

Discussion area about developing with Ogre2 branches (2.1, 2.2 and beyond)
Post Reply
Posts: 3
Joined: Wed May 15, 2019 11:41 am

[2.2] Two Sided Lighting in .material ignored

Post by floofykh »


I've been upgrading our Ogre from 2.1 to 2.2.4 and have one final issue I'm aware of regarding normals. We have "two_sided" set to true in our .material file, but as far as I can see it's being ignored. I noticed in OgreHlmsJsonPbs.cpp it handles "two_sided" by calling setTwoSidedLighting on the pbsDatablock. I couldn't find anywhere the equivalent operation being done for non-json material files.
If I add handling of "two_sided" to the HlmsPbsDatablock constructor using params, and call setTwoSidedLightning accordingly, lighting seems to behave how I'd expect. Is this a bug or is it intentional?

User avatar
OGRE Team Member
OGRE Team Member
Posts: 4572
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 962

Re: [2.2] Two Sided Lighting in .material ignored

Post by dark_sylinc »


Certain more advanced features are only implemented by JSON materials.
If you feel two_sided should be handled by the basic syntax materials, feel free to submit a Pull Request.


Post Reply