mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:23:52 +00:00
renamed setting, automatically disable MRT when unsupported
This commit is contained in:
parent
add4ebe445
commit
f49131e1b8
3 changed files with 8 additions and 2 deletions
|
@ -37,6 +37,12 @@ RenderingManager::RenderingManager (OEngine::Render::OgreRenderer& _rend, const
|
||||||
// Load resources
|
// Load resources
|
||||||
ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
|
ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
|
||||||
|
|
||||||
|
// disable MRT if it is unsupported
|
||||||
|
const RenderSystemCapabilities* caps = Root::getSingleton().getRenderSystem()->getCapabilities();
|
||||||
|
if (caps->getNumMultiRenderTargets() < 2
|
||||||
|
|| (!caps->isShaderProfileSupported("fp40") && !caps->isShaderProfileSupported("ps_3_0")))
|
||||||
|
Settings::Manager::setBool("multiple render targets", "Render", false);
|
||||||
|
|
||||||
if (Settings::Manager::getBool("multiple render targets", "Render"))
|
if (Settings::Manager::getBool("multiple render targets", "Render"))
|
||||||
{
|
{
|
||||||
CompositorManager::getSingleton().addCompositor(mRendering.getViewport(), "gbuffer");
|
CompositorManager::getSingleton().addCompositor(mRendering.getViewport(), "gbuffer");
|
||||||
|
|
|
@ -52,7 +52,7 @@ Water::Water (Ogre::Camera *camera, SkyManager* sky, const ESM::Cell* cell) :
|
||||||
// Create rendertarget for reflection
|
// Create rendertarget for reflection
|
||||||
int rttsize = Settings::Manager::getInt("rtt size", "Water");
|
int rttsize = Settings::Manager::getInt("rtt size", "Water");
|
||||||
|
|
||||||
if (Settings::Manager::getBool("reflection", "Water"))
|
if (Settings::Manager::getBool("shader", "Water") && Settings::Manager::getBool("multiple render targets", "Render"))
|
||||||
{
|
{
|
||||||
TexturePtr tex = TextureManager::getSingleton().createManual("WaterReflection",
|
TexturePtr tex = TextureManager::getSingleton().createManual("WaterReflection",
|
||||||
ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, TEX_TYPE_2D, rttsize, rttsize, 0, PF_R8G8B8, TU_RENDERTARGET);
|
ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, TEX_TYPE_2D, rttsize, rttsize, 0, PF_R8G8B8, TU_RENDERTARGET);
|
||||||
|
|
|
@ -44,7 +44,7 @@ num lights = 8
|
||||||
|
|
||||||
[Water]
|
[Water]
|
||||||
|
|
||||||
reflection = false
|
shader = false
|
||||||
|
|
||||||
rtt size = 256
|
rtt size = 256
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue