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.
Using depth shadows screws up layers
-
- Gnoblar
- Posts: 11
- Joined: Sun Feb 22, 2015 1:10 pm
- x 1
-
- OGRE Expert User
- Posts: 1119
- Joined: Sat Jan 01, 2011 7:57 pm
- x 216
Re: Using depth shadows screws up layers
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.
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.