GUI shadow casting


09-09-2007 11:20:18

Hi, have you noticed before that GUI material doesn't have shadow casting turned off? I have a simple scene with light and shadows and my GUI is casting shadow on a plane which is a shadow receiver. Is there a possibility to disable it somehow?


09-09-2007 19:53:40

I actually noticed this when I ported it to my personal project as well.

I thought calling mRenderSystem->setLightingEnabled(false); before rendering each batch would fix the problem, but I need to look into how to stop polygon's from casting shadows.


09-09-2007 20:19:08

I can't test this at the moment, but I think this may work. Before the VertexBuffer class starts rendering, I call

bool shadowsEnabled = mGUIManager->getViewport()->getShadowsEnabled()

And after rendering, I call


If this doesn't do the trick, maybe I can set the SceneManager's ShadowTechnique to SHADOWTYPE_NONE and restoring it's technique after rendering. I hope that the viewport method works correctly :wink:


15-09-2007 13:22:55

Sorry I haven't written till now.

Well, I don't know how to retrieve only the GUI viewport, because there is no getViewport() function in the GUI class..


16-09-2007 00:04:45

np. I believe shadows are fixed in SVN, at least I haven't seen any in the demo app, even when the robot casts a shadow. If you still see shadows in next release let me know and I'll look into it. And in SVN there is a getViewport function. :P