mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-10 07:51:35 +00:00
temp commit
This commit is contained in:
parent
e517e75d09
commit
81d30ff63a
8 changed files with 19 additions and 13 deletions
|
@ -229,9 +229,9 @@ void LocalMap::render(const float x, const float y,
|
||||||
vp->setVisibilityMask(RV_Map);
|
vp->setVisibilityMask(RV_Map);
|
||||||
|
|
||||||
// use fallback techniques without shadows and without mrt
|
// use fallback techniques without shadows and without mrt
|
||||||
vp->setMaterialScheme("simple");
|
//vp->setMaterialScheme("local_map");
|
||||||
|
|
||||||
rtt->update();
|
//rtt->update();
|
||||||
|
|
||||||
// create "fog of war" texture
|
// create "fog of war" texture
|
||||||
TexturePtr tex2 = TextureManager::getSingleton().createManual(
|
TexturePtr tex2 = TextureManager::getSingleton().createManual(
|
||||||
|
|
|
@ -76,9 +76,8 @@ RenderingManager::RenderingManager (OEngine::Render::OgreRenderer& _rend, const
|
||||||
// Load resources
|
// Load resources
|
||||||
ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
|
ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
|
||||||
|
|
||||||
// Due to the huge world size of MW, we'll want camera-relative rendering.
|
// causes light flicker in opengl when moving..
|
||||||
// This prevents precision artifacts when moving very far from the origin.
|
//mRendering.getScene()->setCameraRelativeRendering(true);
|
||||||
mRendering.getScene()->setCameraRelativeRendering(true);
|
|
||||||
|
|
||||||
// disable unsupported effects
|
// disable unsupported effects
|
||||||
const RenderSystemCapabilities* caps = Root::getSingleton().getRenderSystem()->getCapabilities();
|
const RenderSystemCapabilities* caps = Root::getSingleton().getRenderSystem()->getCapabilities();
|
||||||
|
@ -525,12 +524,14 @@ Shadows* RenderingManager::getShadows()
|
||||||
|
|
||||||
void RenderingManager::switchToInterior()
|
void RenderingManager::switchToInterior()
|
||||||
{
|
{
|
||||||
mRendering.getScene()->setCameraRelativeRendering(false);
|
// causes light flicker in opengl when moving..
|
||||||
|
//mRendering.getScene()->setCameraRelativeRendering(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderingManager::switchToExterior()
|
void RenderingManager::switchToExterior()
|
||||||
{
|
{
|
||||||
mRendering.getScene()->setCameraRelativeRendering(true);
|
// causes light flicker in opengl when moving..
|
||||||
|
//mRendering.getScene()->setCameraRelativeRendering(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ogre::Vector4 RenderingManager::boundingBoxToScreen(Ogre::AxisAlignedBox bounds)
|
Ogre::Vector4 RenderingManager::boundingBoxToScreen(Ogre::AxisAlignedBox bounds)
|
||||||
|
|
|
@ -53,7 +53,7 @@ void Shadows::recreate()
|
||||||
|
|
||||||
mSceneMgr->setShadowTextureSelfShadow(true);
|
mSceneMgr->setShadowTextureSelfShadow(true);
|
||||||
mSceneMgr->setShadowCasterRenderBackFaces(true);
|
mSceneMgr->setShadowCasterRenderBackFaces(true);
|
||||||
mSceneMgr->setShadowTextureCasterMaterial("depth_shadow_caster");
|
// mSceneMgr->setShadowTextureCasterMaterial("openmw_shadowcaster_default");
|
||||||
mSceneMgr->setShadowTexturePixelFormat(PF_FLOAT32_R);
|
mSceneMgr->setShadowTexturePixelFormat(PF_FLOAT32_R);
|
||||||
mSceneMgr->setShadowDirectionalLightExtrusionDistance(1000000);
|
mSceneMgr->setShadowDirectionalLightExtrusionDistance(1000000);
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ void Shadows::recreate()
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// --------------------------- Debug overlays to display the content of shadow maps -----------------------------------
|
// --------------------------- Debug overlays to display the content of shadow maps -----------------------------------
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
/*
|
|
||||||
OverlayManager& mgr = OverlayManager::getSingleton();
|
OverlayManager& mgr = OverlayManager::getSingleton();
|
||||||
Overlay* overlay;
|
Overlay* overlay;
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ void Shadows::recreate()
|
||||||
overlay->add2D(debugPanel);
|
overlay->add2D(debugPanel);
|
||||||
overlay->show();
|
overlay->show();
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PSSMShadowCameraSetup* Shadows::getPSSMSetup()
|
PSSMShadowCameraSetup* Shadows::getPSSMSetup()
|
||||||
|
|
|
@ -336,7 +336,7 @@ void Water::applyRTT()
|
||||||
vp->setBackgroundColour(ColourValue(0.8f, 0.9f, 1.0f));
|
vp->setBackgroundColour(ColourValue(0.8f, 0.9f, 1.0f));
|
||||||
vp->setShadowsEnabled(false);
|
vp->setShadowsEnabled(false);
|
||||||
// use fallback techniques without shadows and without mrt (currently not implemented for sky and terrain)
|
// use fallback techniques without shadows and without mrt (currently not implemented for sky and terrain)
|
||||||
vp->setMaterialScheme("simple");
|
//vp->setMaterialScheme("water_reflection");
|
||||||
rtt->addListener(this);
|
rtt->addListener(this);
|
||||||
rtt->setActive(true);
|
rtt->setActive(true);
|
||||||
|
|
||||||
|
|
|
@ -276,6 +276,8 @@ void NIFLoader::createMaterial(const String &name,
|
||||||
else
|
else
|
||||||
warn("Unhandled alpha setting for texture " + texName);
|
warn("Unhandled alpha setting for texture " + texName);
|
||||||
}
|
}
|
||||||
|
//else
|
||||||
|
//instance->getMaterial ()->setShadowCasterMaterial ("openmw_shadowcaster_noalpha");
|
||||||
|
|
||||||
// As of yet UNTESTED code from Chris:
|
// As of yet UNTESTED code from Chris:
|
||||||
/*pass->setTextureFiltering(Ogre::TFO_ANISOTROPIC);
|
/*pass->setTextureFiltering(Ogre::TFO_ANISOTROPIC);
|
||||||
|
|
2
extern/shiny
vendored
2
extern/shiny
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 88a192a67d7dff636be4540be4a8654ad33f106a
|
Subproject commit d25605ee3a2d67dc0b6367cd150cc6d0c6a3b661
|
|
@ -14,6 +14,9 @@ material openmw_objects_base
|
||||||
scene_blend default
|
scene_blend default
|
||||||
depth_write default
|
depth_write default
|
||||||
alpha_rejection default
|
alpha_rejection default
|
||||||
|
shadow_transparency true // use diffuse alpha as mask for shadow
|
||||||
|
|
||||||
|
shadow_caster_material openmw_shadowcaster
|
||||||
|
|
||||||
pass
|
pass
|
||||||
{
|
{
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
shInput(float3, normalPassthrough)
|
shInput(float3, normalPassthrough)
|
||||||
shInput(float3, objSpacePositionPassthrough)
|
shInput(float3, objSpacePositionPassthrough)
|
||||||
shUniform(float4 lightAmbient) @shAutoConstant(lightAmbient, ambient_light_colour)
|
shUniform(float4 lightAmbient) @shAutoConstant(lightAmbient, ambient_light_colour)
|
||||||
shUniform(float passIteration) @shAutoConstant(passIteration, pass_iteration_number)
|
//shUniform(float passIteration) @shAutoConstant(passIteration, pass_iteration_number)
|
||||||
shUniform(float4 materialAmbient) @shAutoConstant(materialAmbient, surface_ambient_colour)
|
shUniform(float4 materialAmbient) @shAutoConstant(materialAmbient, surface_ambient_colour)
|
||||||
shUniform(float4 materialDiffuse) @shAutoConstant(materialDiffuse, surface_diffuse_colour)
|
shUniform(float4 materialDiffuse) @shAutoConstant(materialDiffuse, surface_diffuse_colour)
|
||||||
shUniform(float4 materialEmissive) @shAutoConstant(materialEmissive, surface_emissive_colour)
|
shUniform(float4 materialEmissive) @shAutoConstant(materialEmissive, surface_emissive_colour)
|
||||||
|
|
Loading…
Reference in a new issue