Page 1 of 1
Using depth shadows screws up layers
Posted: Thu Aug 06, 2015 10:36 am
So I've been working around to get PSSM Shadows to work in 1.8.1 and I got them working. Now the problem is that when enabling them, the layers get screwed up.
Re: Using depth shadows screws up layers
Posted: Thu Aug 06, 2015 2:36 pm
By layers, you mean terrain texture layers?
The built-in Ogre terrain material has a limit
on the number of layers supported. This limit comes from the maximum number of texturing units you can use in a single render pass. Ogre currently hardcodes this limit as 16 texture units (some GPUs support more, but not all do).
If you do enable (PSSM) shadows, extra texturing units are required to sample the shadow maps, thus you don't get as many layers available. You also need texture units for normal maps.
There are ways around this limit, such as rendering the terrain in multiple passes. Which I've done in the past, as you can see here
. It's a bit complicated though.