Tutorial 2: Stencil Shadows and The Far Clipping Plane

Problems building or running the engine, queries about how to use features etc.
Post Reply
Posts: 23
Joined: Tue Jun 28, 2005 1:15 am
Location: S㯠Paulo, Brazil

Tutorial 2: Stencil Shadows and The Far Clipping Plane

Post by filipe »

According to tutorial 2:
Add a function call to setFarClipDistance and set it to be 500, watch what happens when you move from seeing the Ninja and not seeing the Ninja with stencil shadows turned on. Notice the slowup?
we could set a FarClipDistance of say 500, and at the same time use a stencil shadow technique.

I've set the distance and fired the app, but the far clipping didn't work. Far clipping works if a texture modulative shadow technique is used though.

I did not succeed in finding whether this is the default behavior or not. I've copypasted the said tutorial's code.

Where could I read about the reasoning behind implementing said behavior, provided that there is such a text and that I'm not missing something?
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 1603
Joined: Wed Oct 20, 2004 7:54 am
Location: Beijing, China
x 1

Post by genva »

You need to disable inifinite camera far plane when rendering stencil shadows, use SceneManager::setShadowUseInfiniteFarPlane(false). By default, Ogre will enable infinite far distance for stencil shadows if supported by hardware.
Post Reply