Two sided lighting with stock Blinn shader
In my MPxGeometryOverride implementation I am rendering a custom render item (of type MRenderItem::NonMaterialSceneItem) using a stock MShaderManager::k3dBlinnShader. While the front side of my triangles are nicely lit, the backsides are all black. And that's independent of the setting for the 'Two Sided Lighting' option. To verify this (mis)behavior I created a simple Polygon Plane. With the 'Two Sided Lighting' option switched off, both the polygon plane and my render item (which is also a plane) behave identical (lighting-wise). With that option switched on, my custom render item behaves exactly like before whereas the polygon plane now has its backfaces properly lit as well.
Is there a way to make two sided lighting work in my setup? I am probably missing something really obvious here... 🙂
Thanks for any help,
Sascha
Note: This should be easy to reproduce by taking the devkit footPrintNode_GeometryOverride example and by:
- replacing the MShaderManager::k3dSolidShader with a MShaderManager::k3dBlinnShader (incl. switching from 'solidColor' to 'diffuseColor')
- switching from MRenderItem::DecorationItem to MRenderItem::NonMaterialSceneItem