forked from mirror/openmw-tes3mp
Switch to LispSM
This commit is contained in:
parent
76e8a0b768
commit
99f6a1b8e1
1 changed files with 14 additions and 7 deletions
|
@ -213,24 +213,31 @@ namespace MWRender
|
||||||
settings->setCastsShadowTraversalMask(Mask_Scene|Mask_Actor|Mask_Player);
|
settings->setCastsShadowTraversalMask(Mask_Scene|Mask_Actor|Mask_Player);
|
||||||
settings->setReceivesShadowTraversalMask(~0u);
|
settings->setReceivesShadowTraversalMask(~0u);
|
||||||
|
|
||||||
settings->setShadowMapProjectionHint(osgShadow::ShadowSettings::PERSPECTIVE_SHADOW_MAP);
|
//settings->setShadowMapProjectionHint(osgShadow::ShadowSettings::PERSPECTIVE_SHADOW_MAP);
|
||||||
settings->setBaseShadowTextureUnit(1);
|
//settings->setBaseShadowTextureUnit(1);
|
||||||
settings->setMinimumShadowMapNearFarRatio(0);
|
//settings->setMinimumShadowMapNearFarRatio(0);
|
||||||
settings->setNumShadowMapsPerLight(1);
|
//settings->setNumShadowMapsPerLight(1);
|
||||||
//settings->setShadowMapProjectionHint(osgShadow::ShadowSettings::ORTHOGRAPHIC_SHADOW_MAP);
|
//settings->setShadowMapProjectionHint(osgShadow::ShadowSettings::ORTHOGRAPHIC_SHADOW_MAP);
|
||||||
//settings->setMultipleShadowMapHint(osgShadow::ShadowSettings::PARALLEL_SPLIT); // ignored
|
//settings->setMultipleShadowMapHint(osgShadow::ShadowSettings::PARALLEL_SPLIT); // ignored
|
||||||
//settings->setComputeNearFarModeOverride(osg::CullSettings::COMPUTE_NEAR_FAR_USING_PRIMITIVES);
|
//settings->setComputeNearFarModeOverride(osg::CullSettings::COMPUTE_NEAR_FAR_USING_PRIMITIVES);
|
||||||
//settings->setDebugDraw(true);
|
//settings->setDebugDraw(true);
|
||||||
|
|
||||||
settings->setPerspectiveShadowMapCutOffAngle(0);
|
//settings->setPerspectiveShadowMapCutOffAngle(0);
|
||||||
settings->setShaderHint(osgShadow::ShadowSettings::PROVIDE_VERTEX_AND_FRAGMENT_SHADER);
|
//settings->setShaderHint(osgShadow::ShadowSettings::PROVIDE_VERTEX_AND_FRAGMENT_SHADER);
|
||||||
|
|
||||||
int mapres = 2048;
|
int mapres = 2048;
|
||||||
settings->setTextureSize(osg::Vec2s(mapres,mapres));
|
settings->setTextureSize(osg::Vec2s(mapres,mapres));
|
||||||
|
|
||||||
osgShadow::ShadowTechnique* tech = new osgShadow::ViewDependentShadowMap;
|
osgShadow::MinimalShadowMap* tech = new osgShadow::LightSpacePerspectiveShadowMapDB();
|
||||||
shadowedScene->setShadowTechnique(tech);
|
shadowedScene->setShadowTechnique(tech);
|
||||||
|
|
||||||
|
tech->setMaxFarPlane(0);
|
||||||
|
tech->setTextureSize(osg::Vec2s(mapres, mapres));
|
||||||
|
tech->setShadowTextureCoordIndex(1);
|
||||||
|
tech->setShadowTextureUnit(1);
|
||||||
|
tech->setBaseTextureCoordIndex(0);
|
||||||
|
tech->setBaseTextureUnit(0);
|
||||||
|
|
||||||
//mRootNode->addChild(sceneRoot);
|
//mRootNode->addChild(sceneRoot);
|
||||||
shadowedScene->addChild(sceneRoot);
|
shadowedScene->addChild(sceneRoot);
|
||||||
mRootNode->addChild(shadowedScene);
|
mRootNode->addChild(shadowedScene);
|
||||||
|
|
Loading…
Reference in a new issue