The “shadow pass” is always/only done in the middle ground channel… which is where any/all object drawing is supposed to take place. If you’re drawing objects in any other channels, and those objects are supposed to be part of the “primary” frame buffer output, then all bets are off as to whether or not those objects are going to participate and/or produce the expected results.
You cannot just call some draw method at any point, at any time within the pipeline’s channel chain, and then expect it to work or produce the correct results…There are very specific things that happen at very specific times within the pipeline…and they’re done for very specific reasons.
Having said that…if you want your own objects to cast and/or receive shadows, and your objects are not part of Rhino’s object database, then you must draw your object(s) from within the “middleground” channel. That means you must implement the “DrawObject()” conduit channel from within your own conduit (i.e.
CSupportChannels::SC_DRAWOBJECT) and draw your object(s) there … Doing it within the
PostDrawObjects() channel is just simply not going to work…and the actual name of the channel should be enough to understand why… “Post … Draw … Objects” … That means that channel gets executed AFTER all the objects have been drawn…in which case, if you’re drawing any kind of shaded mesh in that channel, how could it possibly participate in any kind of shadow casting or receiving phase, since everything has already been drawn?
Hope this is helps clear things up… If you are drawing your objects via the
CSupportChannels::SC_DRAWOBJECT channel and things aren’t working as expected, then there’s a bug somewhere…and I’ll need a conduit example that I can compile and debug with.
Let me know if you have any questions or issues on this behavior…I’ll be glad to help.