[1.12.12] how many shadow passes per light?

Problems building or running the engine, queries about how to use features etc.
Post Reply
loath
Platinum Sponsor
Platinum Sponsor
Posts: 290
Joined: Tue Jan 17, 2012 5:18 am
x 67

[1.12.12] how many shadow passes per light?

Post by loath »

how many shadow passes should i expect per light in ogre 1.12.12? i assumed one but as i port my shaders from dx9 to dx11 no shadows are appearing and yet i'm seeing two shadow passes for a single light in renderdoc.

i have a custom shadow setup so this is probably my code but understanding what ogre *should* be doing may help me debug my issue.

thanks!
paroj
OGRE Team Member
OGRE Team Member
Posts: 1993
Joined: Sun Mar 30, 2014 2:51 pm
x 1073
Contact:

Re: [1.12.12] how many shadow passes per light?

Post by paroj »

unless you are using integrated shadows (single pass), you will get two passes:
1. lighting/ material pass
2. a shadow receiver pass for the texture shadows

this can grow to 3 for additive lighting setups, where an "ambient" pass is added.
also see https://ogrecave.github.io/ogre/api/lat ... ht-Masking

note that nowadays you almost always want the integrated variant.
loath
Platinum Sponsor
Platinum Sponsor
Posts: 290
Joined: Tue Jan 17, 2012 5:18 am
x 67

Re: [1.12.12] how many shadow passes per light?

Post by loath »

thanks paroj... very helpful.

i'm using additive integrated PSSM shadows with 3 splits. in the back of my mind i was thinking the shadow casting was done in a single pass with my custom shadow casters but from renderdoc it looks like each split texture has it's own pass. does this sound correct?

will take a look at the link for manual pass control and also debug further.

PS. it looks like depth shadows are broken in the shadow sample for dx 11 and probably dx 9 as well (unless the athena model is now just very dark but i don't see the self shadowing anymore) (in renderdoc, all the shadow textures are red which i assume is just a single channel representing blank aka "no shadow")
loath
Platinum Sponsor
Platinum Sponsor
Posts: 290
Joined: Tue Jan 17, 2012 5:18 am
x 67

Re: [1.12.12] how many shadow passes per light?

Post by loath »

ok turns out this is just the way shadows work and it makes sense:

SceneManager::_renderScene () calls
SceneManager::prepareShadowTechinques () which calls
SceneManager::_renderScene() once for each shadow texture render target configured per light.

so not explicit "passes" per-say but renderings of the scene.

now to figure out why the first shadow texture is always blank causing no shadows to appear in dx11 but worked fine on dx9 for me. possibly this is also what is breaking ogre's depth shadow sample. we have company in town but i'll post back if it's the same issue once i figure it out.
Post Reply