right, i'm running in DX11 not opengl, havent tested that yet
For those that want to know how to adjust the normal offset bias from an editor or something similar, i am using this at the moment, also works for adjusting pssmlambda on the fly too:
Code: Select all
SkyString ShadowNode = chooseShadowNode(currentQuality, currentFilter);
Ogre::CompositorShadowNodeDef* node = scene.renderMgr->getCompositorManager()->getShadowNodeDefinitionNonConst(ShadowNode);// findShadowNode(ShadowNode)->getDefinition();
size_t numShadowDefinitions = node->getNumShadowTextureDefinitions();
for (size_t i = 0; i < numShadowDefinitions; i++) {
Ogre::ShadowTextureDefinition* texture = node->getShadowTextureDefinitionNonConst(i);
texture->normalOffsetBias = value;
} scene.renderMgr->getWorkspace()->generateWorkspace();
Edit: Yes, looks fine in GL, could it be a -1 to 1 vs 0 to 1 or a row column(dx vs gl) thing of a matrix.
Edit2: Replaced the cxnstant bias setter
Edit3: Removed the code for the constant bias as you have to do it on the shadow camera, however there is no way that i can see of accessing the shadow camera data from the compositionShadownode