Adjust graphics presets for SP
This commit is contained in:
parent
7f3722d90b
commit
9ccb34c2a1
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
<spacer height="4" width="10" />
|
<spacer height="4" width="10" />
|
||||||
|
|
||||||
<div layout="horizontal-row" width="100%" proportion="1">
|
<div layout="horizontal-row" width="50%" proportion="1">
|
||||||
<spacer width="70" height="10" />
|
<spacer width="70" height="10" />
|
||||||
|
|
||||||
<div layout="horizontal-row" proportion="1" height="fit">
|
<div layout="horizontal-row" proportion="1" height="fit">
|
||||||
@ -31,14 +31,6 @@
|
|||||||
<spacer width="10" height="10"/>
|
<spacer width="10" height="10"/>
|
||||||
<gauge id="shadows" min_value="0" max_value="2" proportion="1"/>
|
<gauge id="shadows" min_value="0" max_value="2" proportion="1"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<spacer height="4" width="10" />
|
|
||||||
|
|
||||||
<div layout="horizontal-row" proportion="1" height="fit">
|
|
||||||
<checkbox id="ibl"/>
|
|
||||||
<spacer width="10" height="10"/>
|
|
||||||
<label text="Image-based lighting" I18N="Video settings"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<spacer height="4" width="10" />
|
<spacer height="4" width="10" />
|
||||||
@ -75,9 +67,9 @@
|
|||||||
<spacer height="4" width="10" />
|
<spacer height="4" width="10" />
|
||||||
|
|
||||||
<div layout="horizontal-row" proportion="1" height="fit">
|
<div layout="horizontal-row" proportion="1" height="fit">
|
||||||
<checkbox id="global_illumination"/>
|
<checkbox id="dof"/>
|
||||||
<spacer width="10" height="10"/>
|
<spacer width="10" height="10"/>
|
||||||
<label text="Global illumination" I18N="Video settings"/>
|
<label text="Depth of field" I18N="Video settings"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -115,9 +107,9 @@
|
|||||||
<spacer height="4" width="10" />
|
<spacer height="4" width="10" />
|
||||||
|
|
||||||
<div layout="horizontal-row" proportion="1" height="fit">
|
<div layout="horizontal-row" proportion="1" height="fit">
|
||||||
<checkbox id="dof"/>
|
<checkbox id="ibl"/>
|
||||||
<spacer width="10" height="10"/>
|
<spacer width="10" height="10"/>
|
||||||
<label text="Depth of field" I18N="Video settings"/>
|
<label text="Image-based lighting" I18N="Video settings"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -125,9 +117,9 @@
|
|||||||
|
|
||||||
<div layout="horizontal-row" width="100%" proportion="1">
|
<div layout="horizontal-row" width="100%" proportion="1">
|
||||||
<div layout="horizontal-row" proportion="1" height="fit">
|
<div layout="horizontal-row" proportion="1" height="fit">
|
||||||
<checkbox id="weather_gfx"/>
|
<checkbox id="animated_characters"/>
|
||||||
<spacer width="10" height="10"/>
|
<spacer width="10" height="10"/>
|
||||||
<label text="Weather Effects" I18N="Video settings"/>
|
<label text="Animated Characters" I18N="Video settings"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<spacer height="4" width="10" />
|
<spacer height="4" width="10" />
|
||||||
@ -142,17 +134,9 @@
|
|||||||
<spacer height="20" width="10" />
|
<spacer height="20" width="10" />
|
||||||
|
|
||||||
<div layout="horizontal-row" width="100%" proportion="1">
|
<div layout="horizontal-row" width="100%" proportion="1">
|
||||||
<label text="Animated Scenery" I18N="Video settings" width="40%"/>
|
<label text="Particles Effects" I18N="Video settings" width="40%"/>
|
||||||
<spacer width="10" height="10"/>
|
<spacer width="10" height="10"/>
|
||||||
<gauge id="anim_gfx" min_value="0" max_value="2" width="50%" />
|
<gauge id="particles_effects" min_value="0" max_value="2" width="50%" />
|
||||||
</div>
|
|
||||||
|
|
||||||
<spacer height="4" width="10" />
|
|
||||||
|
|
||||||
<div layout="horizontal-row" width="100%" proportion="1">
|
|
||||||
<label text="Animated Characters" I18N="Video settings" width="40%"/>
|
|
||||||
<spacer width="10" height="10"/>
|
|
||||||
<gauge id="steering_animations" min_value="0" max_value="2" width="50%" />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<spacer height="4" width="10" />
|
<spacer height="4" width="10" />
|
||||||
@ -160,7 +144,7 @@
|
|||||||
<div layout="horizontal-row" width="100%" proportion="1">
|
<div layout="horizontal-row" width="100%" proportion="1">
|
||||||
<label text="Rendered image quality" I18N="Video settings" width="40%"/>
|
<label text="Rendered image quality" I18N="Video settings" width="40%"/>
|
||||||
<spacer width="10" height="10"/>
|
<spacer width="10" height="10"/>
|
||||||
<gauge id="image_quality" min_value="0" max_value="3" width="50%" />
|
<gauge id="image_quality" min_value="0" max_value="2" width="50%" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<spacer height="4" width="10" />
|
<spacer height="4" width="10" />
|
||||||
|
@ -73,9 +73,6 @@ ThreeDAnimation::~ThreeDAnimation()
|
|||||||
*/
|
*/
|
||||||
void ThreeDAnimation::update(float dt)
|
void ThreeDAnimation::update(float dt)
|
||||||
{
|
{
|
||||||
//if (UserConfigParams::m_graphical_effects > 1 ||
|
|
||||||
// (UserConfigParams::m_graphical_effects > 0 && m_important_animation))
|
|
||||||
{
|
|
||||||
Vec3 xyz = m_object->getPosition();
|
Vec3 xyz = m_object->getPosition();
|
||||||
Vec3 scale = m_object->getScale();
|
Vec3 scale = m_object->getScale();
|
||||||
|
|
||||||
@ -111,5 +108,4 @@ void ThreeDAnimation::update(float dt)
|
|||||||
{
|
{
|
||||||
m_object->move(xyz.toIrrVector(), hpr, scale.toIrrVector(), true, false);
|
m_object->move(xyz.toIrrVector(), hpr, scale.toIrrVector(), true, false);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} // update
|
} // update
|
||||||
|
@ -784,9 +784,9 @@ namespace UserConfigParams
|
|||||||
#define FBO_DEFAULT true
|
#define FBO_DEFAULT true
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PARAM_PREFIX IntUserConfigParam m_graphical_effects
|
PARAM_PREFIX IntUserConfigParam m_particles_effects
|
||||||
PARAM_DEFAULT( IntUserConfigParam(2, "animate_graphics",
|
PARAM_DEFAULT( IntUserConfigParam(2, "particles-effecs",
|
||||||
&m_graphics_quality, "Scenery animations: 0 disabled, 1 only important, 2 enabled") );
|
&m_graphics_quality, "Particles effects: 0 disabled, 1 only important, 2 enabled") );
|
||||||
|
|
||||||
// This saves the actual user preference.
|
// This saves the actual user preference.
|
||||||
PARAM_PREFIX IntUserConfigParam m_xmas_mode
|
PARAM_PREFIX IntUserConfigParam m_xmas_mode
|
||||||
@ -798,14 +798,10 @@ namespace UserConfigParams
|
|||||||
PARAM_DEFAULT(IntUserConfigParam(0, "easter-ear-mode",
|
PARAM_DEFAULT(IntUserConfigParam(0, "easter-ear-mode",
|
||||||
&m_graphics_quality, "Easter Bunny Ears: 0 use current date, 1 always on, 2 always off"));
|
&m_graphics_quality, "Easter Bunny Ears: 0 use current date, 1 always on, 2 always off"));
|
||||||
|
|
||||||
PARAM_PREFIX BoolUserConfigParam m_weather_effects
|
PARAM_PREFIX BoolUserConfigParam m_animated_characters
|
||||||
PARAM_DEFAULT( BoolUserConfigParam(true, "weather_gfx",
|
PARAM_DEFAULT( BoolUserConfigParam(true,
|
||||||
&m_graphics_quality, "Weather effects") );
|
"animated-characters", &m_graphics_quality,
|
||||||
PARAM_PREFIX IntUserConfigParam m_show_steering_animations
|
"Whether to display animated characters") );
|
||||||
PARAM_DEFAULT( IntUserConfigParam(ANIMS_PLAYERS_ONLY,
|
|
||||||
"steering_animations", &m_graphics_quality,
|
|
||||||
"Whether to display kart animations (0=disabled for all; "
|
|
||||||
"1=enabled for humans, disabled for AIs; 2=enabled for all") );
|
|
||||||
|
|
||||||
PARAM_PREFIX IntUserConfigParam m_geometry_level
|
PARAM_PREFIX IntUserConfigParam m_geometry_level
|
||||||
PARAM_DEFAULT( IntUserConfigParam(GEOLEVEL_0,
|
PARAM_DEFAULT( IntUserConfigParam(GEOLEVEL_0,
|
||||||
@ -817,17 +813,7 @@ namespace UserConfigParams
|
|||||||
PARAM_DEFAULT( IntUserConfigParam(4, "anisotropic",
|
PARAM_DEFAULT( IntUserConfigParam(4, "anisotropic",
|
||||||
&m_graphics_quality,
|
&m_graphics_quality,
|
||||||
"Quality of anisotropic filtering (usual values include 2-4-8-16; 0 to disable)") );
|
"Quality of anisotropic filtering (usual values include 2-4-8-16; 0 to disable)") );
|
||||||
PARAM_PREFIX BoolUserConfigParam m_trilinear
|
|
||||||
PARAM_DEFAULT( BoolUserConfigParam(true, "trilinear",
|
|
||||||
&m_graphics_quality,
|
|
||||||
"Whether trilinear filtering is allowed to be "
|
|
||||||
"used (true or false)") );
|
|
||||||
/*
|
|
||||||
PARAM_PREFIX IntUserConfigParam m_antialiasing
|
|
||||||
PARAM_DEFAULT( IntUserConfigParam(0,
|
|
||||||
"antialiasing", &m_graphics_quality,
|
|
||||||
"Whether antialiasing is enabled (0 = disabled, 1 = 2x, 2 = 4x, 3 = 8x") );
|
|
||||||
*/
|
|
||||||
PARAM_PREFIX BoolUserConfigParam m_vsync
|
PARAM_PREFIX BoolUserConfigParam m_vsync
|
||||||
PARAM_DEFAULT( BoolUserConfigParam(false, "vsync",
|
PARAM_DEFAULT( BoolUserConfigParam(false, "vsync",
|
||||||
&m_graphics_quality,
|
&m_graphics_quality,
|
||||||
|
@ -80,7 +80,7 @@ void CentralVideoSettings::init()
|
|||||||
}
|
}
|
||||||
#if !defined(USE_GLES2)
|
#if !defined(USE_GLES2)
|
||||||
m_glsl = (m_gl_major_version > 3 || (m_gl_major_version == 3 && m_gl_minor_version >= 1))
|
m_glsl = (m_gl_major_version > 3 || (m_gl_major_version == 3 && m_gl_minor_version >= 1))
|
||||||
&& !UserConfigParams::m_force_legacy_device;
|
&& !UserConfigParams::m_force_legacy_device && m_supports_sp;
|
||||||
#else
|
#else
|
||||||
m_glsl = m_gl_major_version >= 3 && !UserConfigParams::m_force_legacy_device;
|
m_glsl = m_gl_major_version >= 3 && !UserConfigParams::m_force_legacy_device;
|
||||||
#endif
|
#endif
|
||||||
@ -152,12 +152,10 @@ void CentralVideoSettings::init()
|
|||||||
Log::info("GLDriver", "ARB Shader Storage Buffer Object Present");
|
Log::info("GLDriver", "ARB Shader Storage Buffer Object Present");
|
||||||
}
|
}
|
||||||
if (!GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_EXT_TEXTURE_COMPRESSION_S3TC) &&
|
if (!GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_EXT_TEXTURE_COMPRESSION_S3TC) &&
|
||||||
hasGLExtension("GL_EXT_texture_compression_s3tc") &&
|
hasGLExtension("GL_EXT_texture_compression_s3tc"))
|
||||||
hasGLExtension("GL_ARB_texture_compression_rgtc"))
|
|
||||||
{
|
{
|
||||||
hasTextureCompression = true;
|
hasTextureCompression = true;
|
||||||
Log::info("GLDriver", "EXT Texture Compression S3TC Present");
|
Log::info("GLDriver", "EXT Texture Compression S3TC Present");
|
||||||
Log::info("GLDriver", "ARB Texture Compression RGTC Present");
|
|
||||||
}
|
}
|
||||||
if (!GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_UNIFORM_BUFFER_OBJECT) &&
|
if (!GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_UNIFORM_BUFFER_OBJECT) &&
|
||||||
hasGLExtension("GL_ARB_uniform_buffer_object")) {
|
hasGLExtension("GL_ARB_uniform_buffer_object")) {
|
||||||
@ -412,11 +410,6 @@ bool CentralVideoSettings::isEXTColorBufferFloatUsable() const
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool CentralVideoSettings::supportsShadows() const
|
|
||||||
{
|
|
||||||
return isARBExplicitAttribLocationUsable();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CentralVideoSettings::supportsGlobalIllumination() const
|
bool CentralVideoSettings::supportsGlobalIllumination() const
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -434,7 +427,7 @@ bool CentralVideoSettings::supportsTextureCompression() const
|
|||||||
|
|
||||||
bool CentralVideoSettings::isShadowEnabled() const
|
bool CentralVideoSettings::isShadowEnabled() const
|
||||||
{
|
{
|
||||||
return supportsShadows() && (UserConfigParams::m_shadows_resolution > 0);
|
return UserConfigParams::m_shadows_resolution > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CentralVideoSettings::isGlobalIlluminationEnabled() const
|
bool CentralVideoSettings::isGlobalIlluminationEnabled() const
|
||||||
|
@ -100,7 +100,6 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
// Are all required extensions available for feature support
|
// Are all required extensions available for feature support
|
||||||
bool supportsShadows() const;
|
|
||||||
bool supportsGlobalIllumination() const;
|
bool supportsGlobalIllumination() const;
|
||||||
bool supportsComputeShadersFiltering() const;
|
bool supportsComputeShadersFiltering() const;
|
||||||
bool supportsHardwareSkinning() const;
|
bool supportsHardwareSkinning() const;
|
||||||
|
@ -58,7 +58,7 @@ Explosion::Explosion(const Vec3& coord, const char* explosion_sound, const char
|
|||||||
ParticleKind* particles = pkm->getParticles(filename);
|
ParticleKind* particles = pkm->getParticles(filename);
|
||||||
m_emitter = NULL;
|
m_emitter = NULL;
|
||||||
|
|
||||||
if (UserConfigParams::m_graphical_effects > 1)
|
if (UserConfigParams::m_particles_effects > 1)
|
||||||
{
|
{
|
||||||
m_emitter = new ParticleEmitter(particles, coord, NULL);
|
m_emitter = new ParticleEmitter(particles, coord, NULL);
|
||||||
m_emitter->getNode()->setPreGenerating(false);
|
m_emitter->getNode()->setPreGenerating(false);
|
||||||
|
@ -482,7 +482,6 @@ void IrrDriver::initDevice()
|
|||||||
|
|
||||||
params.ForceLegacyDevice = true;
|
params.ForceLegacyDevice = true;
|
||||||
recreate_device = true;
|
recreate_device = true;
|
||||||
UserConfigParams::m_force_legacy_device = true;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -596,14 +595,6 @@ void IrrDriver::initDevice()
|
|||||||
Log::info("irr_driver", "GLSL supported.");
|
Log::info("irr_driver", "GLSL supported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if (!supportGeometryShader())
|
|
||||||
{
|
|
||||||
// these options require geometry shaders
|
|
||||||
UserConfigParams::m_shadows = 0;
|
|
||||||
UserConfigParams::m_gi = false;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
// m_glsl might be reset in rtt if an error occurs.
|
// m_glsl might be reset in rtt if an error occurs.
|
||||||
if (CVS->isGLSL())
|
if (CVS->isGLSL())
|
||||||
{
|
{
|
||||||
|
@ -1002,10 +1002,7 @@ void Material::setMaterialProperties(video::SMaterial *m, scene::IMeshBuffer* m
|
|||||||
UserConfigParams::m_anisotropic;
|
UserConfigParams::m_anisotropic;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (UserConfigParams::m_trilinear)
|
|
||||||
{
|
|
||||||
m->setFlag(video::EMF_TRILINEAR_FILTER, true);
|
m->setFlag(video::EMF_TRILINEAR_FILTER, true);
|
||||||
}
|
|
||||||
|
|
||||||
// UV clamping
|
// UV clamping
|
||||||
if ( (m_clamp_tex & UCLAMP) != 0)
|
if ( (m_clamp_tex & UCLAMP) != 0)
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include "graphics/material.hpp"
|
#include "graphics/material.hpp"
|
||||||
#include "graphics/render_info.hpp"
|
#include "graphics/render_info.hpp"
|
||||||
|
|
||||||
#include "../../lib/irrlicht/source/Irrlicht/CBoneSceneNode.h"
|
#include "../../../lib/irrlicht/source/Irrlicht/CBoneSceneNode.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
namespace SP
|
namespace SP
|
||||||
|
@ -190,7 +190,7 @@ void ModelViewWidget::update(float delta)
|
|||||||
|
|
||||||
m_rtt_main_node->setVisible(true);
|
m_rtt_main_node->setVisible(true);
|
||||||
#ifndef SERVER_ONLY
|
#ifndef SERVER_ONLY
|
||||||
if (UserConfigParams::m_show_steering_animations != 0)
|
if (UserConfigParams::m_animated_characters)
|
||||||
m_rtt_main_node->OnAnimate(os::Timer::getTime());
|
m_rtt_main_node->OnAnimate(os::Timer::getTime());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ PlayerKartWidget::PlayerKartWidget(KartSelectionScreen* parent,
|
|||||||
core::matrix4 model_location;
|
core::matrix4 model_location;
|
||||||
model_location.setScale(core::vector3df(scale, scale, scale));
|
model_location.setScale(core::vector3df(scale, scale, scale));
|
||||||
const bool has_win_anime =
|
const bool has_win_anime =
|
||||||
UserConfigParams::m_show_steering_animations != 0 &&
|
UserConfigParams::m_animated_characters &&
|
||||||
(((kart_model.getFrame(KartModel::AF_WIN_LOOP_START) > -1 ||
|
(((kart_model.getFrame(KartModel::AF_WIN_LOOP_START) > -1 ||
|
||||||
kart_model.getFrame(KartModel::AF_WIN_START) > -1) &&
|
kart_model.getFrame(KartModel::AF_WIN_START) > -1) &&
|
||||||
kart_model.getFrame(KartModel::AF_WIN_END) > -1) ||
|
kart_model.getFrame(KartModel::AF_WIN_END) > -1) ||
|
||||||
|
@ -153,7 +153,7 @@ void Attachment::set(AttachmentType type, float time,
|
|||||||
break;
|
break;
|
||||||
} // switch(type)
|
} // switch(type)
|
||||||
|
|
||||||
if (UserConfigParams::m_graphical_effects < 2)
|
if (UserConfigParams::m_particles_effects < 2)
|
||||||
{
|
{
|
||||||
m_node->setAnimationSpeed(0);
|
m_node->setAnimationSpeed(0);
|
||||||
m_node->setCurrentFrame(0);
|
m_node->setCurrentFrame(0);
|
||||||
@ -190,7 +190,7 @@ void Attachment::set(AttachmentType type, float time,
|
|||||||
|
|
||||||
m_time_left = m_time_left * speed_mult;
|
m_time_left = m_time_left * speed_mult;
|
||||||
|
|
||||||
if (UserConfigParams::m_graphical_effects > 1)
|
if (UserConfigParams::m_particles_effects > 1)
|
||||||
{
|
{
|
||||||
// .blend was created @25 (<10 real, slow computer), make it faster
|
// .blend was created @25 (<10 real, slow computer), make it faster
|
||||||
m_node->setAnimationSpeed(50);
|
m_node->setAnimationSpeed(50);
|
||||||
|
@ -74,7 +74,7 @@ LocalPlayerController::LocalPlayerController(AbstractKart *kart,
|
|||||||
// Attach Particle System
|
// Attach Particle System
|
||||||
Track *track = Track::getCurrentTrack();
|
Track *track = Track::getCurrentTrack();
|
||||||
#ifndef SERVER_ONLY
|
#ifndef SERVER_ONLY
|
||||||
if (UserConfigParams::m_weather_effects &&
|
if (UserConfigParams::m_particles_effects > 1 &&
|
||||||
track->getSkyParticles() != NULL)
|
track->getSkyParticles() != NULL)
|
||||||
{
|
{
|
||||||
track->getSkyParticles()->setBoxSizeXZ(150.0f, 150.0f);
|
track->getSkyParticles()->setBoxSizeXZ(150.0f, 150.0f);
|
||||||
|
@ -223,17 +223,8 @@ void Kart::init(RaceManager::KartType type)
|
|||||||
#ifdef SERVER_ONLY
|
#ifdef SERVER_ONLY
|
||||||
bool animations = false; // server never animates
|
bool animations = false; // server never animates
|
||||||
#else
|
#else
|
||||||
bool animations = true;
|
bool animations = UserConfigParams::m_animated_characters;
|
||||||
#endif
|
#endif
|
||||||
const int anims = UserConfigParams::m_show_steering_animations;
|
|
||||||
if (anims == ANIMS_NONE)
|
|
||||||
{
|
|
||||||
animations = false;
|
|
||||||
}
|
|
||||||
else if (anims == ANIMS_PLAYERS_ONLY && type != RaceManager::KT_PLAYER)
|
|
||||||
{
|
|
||||||
animations = false;
|
|
||||||
}
|
|
||||||
loadData(type, animations);
|
loadData(type, animations);
|
||||||
|
|
||||||
m_kart_gfx = new KartGFX(this, Track::getCurrentTrack()->getIsDuringDay());
|
m_kart_gfx = new KartGFX(this, Track::getCurrentTrack()->getIsDuringDay());
|
||||||
@ -1795,7 +1786,7 @@ void Kart::handleMaterialGFX(float dt)
|
|||||||
// something with the wheels, and the material has not the
|
// something with the wheels, and the material has not the
|
||||||
// below surface property set.
|
// below surface property set.
|
||||||
if (material && isOnGround() && !material->isBelowSurface() &&
|
if (material && isOnGround() && !material->isBelowSurface() &&
|
||||||
!getKartAnimation() && UserConfigParams::m_graphical_effects > 1)
|
!getKartAnimation() && UserConfigParams::m_particles_effects > 1)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Get the appropriate particle data depending on
|
// Get the appropriate particle data depending on
|
||||||
@ -1847,7 +1838,7 @@ void Kart::handleMaterialGFX(float dt)
|
|||||||
} // for i in all cameras for this kart
|
} // for i in all cameras for this kart
|
||||||
} // camera != final camera
|
} // camera != final camera
|
||||||
|
|
||||||
if (UserConfigParams::m_graphical_effects < 2)
|
if (UserConfigParams::m_particles_effects < 2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Use the middle of the contact points of the two rear wheels
|
// Use the middle of the contact points of the two rear wheels
|
||||||
@ -2130,7 +2121,7 @@ void Kart::crashed(const Material *m, const Vec3 &normal)
|
|||||||
{
|
{
|
||||||
#ifndef SERVER_ONLY
|
#ifndef SERVER_ONLY
|
||||||
std::string particles = m->getCrashResetParticles();
|
std::string particles = m->getCrashResetParticles();
|
||||||
if (particles.size() > 0 && UserConfigParams::m_graphical_effects > 0)
|
if (particles.size() > 0 && UserConfigParams::m_particles_effects > 0)
|
||||||
{
|
{
|
||||||
ParticleKind* kind =
|
ParticleKind* kind =
|
||||||
ParticleKindManager::get()->getParticles(particles);
|
ParticleKindManager::get()->getParticles(particles);
|
||||||
|
@ -164,10 +164,10 @@ void KartGFX::addEffect(KartGFXType type, const std::string &file_name,
|
|||||||
const Vec3 &position, bool important)
|
const Vec3 &position, bool important)
|
||||||
{
|
{
|
||||||
#ifndef SERVER_ONLY
|
#ifndef SERVER_ONLY
|
||||||
if (((UserConfigParams::m_graphical_effects < 2 || !CVS->isGLSL()) &&
|
if (((UserConfigParams::m_particles_effects < 2 || !CVS->isGLSL()) &&
|
||||||
(!important || m_kart->getType() == RaceManager::KT_AI ||
|
(!important || m_kart->getType() == RaceManager::KT_AI ||
|
||||||
m_kart->getType() == RaceManager::KT_SPARE_TIRE)) ||
|
m_kart->getType() == RaceManager::KT_SPARE_TIRE)) ||
|
||||||
UserConfigParams::m_graphical_effects < 1)
|
UserConfigParams::m_particles_effects < 1)
|
||||||
{
|
{
|
||||||
m_all_emitters.push_back(NULL);
|
m_all_emitters.push_back(NULL);
|
||||||
return;
|
return;
|
||||||
|
25
src/main.cpp
25
src/main.cpp
@ -803,16 +803,16 @@ int handleCmdLinePreliminary()
|
|||||||
UserConfigParams::m_dof = true;
|
UserConfigParams::m_dof = true;
|
||||||
else if (CommandLine::has("--disable-dof"))
|
else if (CommandLine::has("--disable-dof"))
|
||||||
UserConfigParams::m_dof = false;
|
UserConfigParams::m_dof = false;
|
||||||
// global illumination
|
// particles effects
|
||||||
if (CommandLine::has("--enable-gi"))
|
if (CommandLine::has("--enable-particles"))
|
||||||
UserConfigParams::m_gi = true;
|
UserConfigParams::m_particles_effects = 2;
|
||||||
else if (CommandLine::has("--disable-gi"))
|
else if (CommandLine::has("--disable-particles"))
|
||||||
UserConfigParams::m_gi = false;
|
UserConfigParams::m_particles_effects = 0;
|
||||||
// animated scenery
|
// animated characters
|
||||||
if (CommandLine::has("--enable-gfx"))
|
if (CommandLine::has("--enable-animated-characters"))
|
||||||
UserConfigParams::m_graphical_effects = 2;
|
UserConfigParams::m_animated_characters = true;
|
||||||
else if (CommandLine::has("--disable-gfx"))
|
else if (CommandLine::has("--disable-animated-characters"))
|
||||||
UserConfigParams::m_graphical_effects = 0;
|
UserConfigParams::m_animated_characters = false;
|
||||||
if (CommandLine::has("--enable-motion-blur"))
|
if (CommandLine::has("--enable-motion-blur"))
|
||||||
UserConfigParams::m_motionblur = true;
|
UserConfigParams::m_motionblur = true;
|
||||||
else if (CommandLine::has("--disable-motion-blur"))
|
else if (CommandLine::has("--disable-motion-blur"))
|
||||||
@ -841,11 +841,6 @@ int handleCmdLinePreliminary()
|
|||||||
UserConfigParams::m_high_definition_textures = 2 | 1;
|
UserConfigParams::m_high_definition_textures = 2 | 1;
|
||||||
else if (CommandLine::has("--disable-hd-textures"))
|
else if (CommandLine::has("--disable-hd-textures"))
|
||||||
UserConfigParams::m_high_definition_textures = 2;
|
UserConfigParams::m_high_definition_textures = 2;
|
||||||
if (CommandLine::has("--enable-trilinear"))
|
|
||||||
UserConfigParams::m_trilinear = true;
|
|
||||||
else if (CommandLine::has("--disable-trilinear"))
|
|
||||||
UserConfigParams::m_trilinear = false;
|
|
||||||
|
|
||||||
|
|
||||||
// Enable loading grand prix from local directory
|
// Enable loading grand prix from local directory
|
||||||
if(CommandLine::has("--add-gp-dir", &s))
|
if(CommandLine::has("--add-gp-dir", &s))
|
||||||
|
@ -227,7 +227,7 @@ void World::init()
|
|||||||
|
|
||||||
powerup_manager->updateWeightsForRace(race_manager->getNumberOfKarts());
|
powerup_manager->updateWeightsForRace(race_manager->getNumberOfKarts());
|
||||||
|
|
||||||
if (UserConfigParams::m_weather_effects)
|
if (UserConfigParams::m_particles_effects > 1)
|
||||||
{
|
{
|
||||||
Weather::getInstance<Weather>(); // create Weather instance
|
Weather::getInstance<Weather>(); // create Weather instance
|
||||||
}
|
}
|
||||||
@ -1003,7 +1003,7 @@ void World::update(float dt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PROFILER_PUSH_CPU_MARKER("World::update (weather)", 0x80, 0x7F, 0x00);
|
PROFILER_PUSH_CPU_MARKER("World::update (weather)", 0x80, 0x7F, 0x00);
|
||||||
if (UserConfigParams::m_graphical_effects > 1 && Weather::getInstance())
|
if (UserConfigParams::m_particles_effects > 1 && Weather::getInstance())
|
||||||
{
|
{
|
||||||
Weather::getInstance()->update(dt);
|
Weather::getInstance()->update(dt);
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
#include "states_screens/dialogs/custom_video_settings.hpp"
|
#include "states_screens/dialogs/custom_video_settings.hpp"
|
||||||
|
|
||||||
#include "config/stk_config.hpp"
|
|
||||||
#include "config/user_config.hpp"
|
#include "config/user_config.hpp"
|
||||||
#include "guiengine/widgets/check_box_widget.hpp"
|
#include "guiengine/widgets/check_box_widget.hpp"
|
||||||
#include "guiengine/widgets/spinner_widget.hpp"
|
#include "guiengine/widgets/spinner_widget.hpp"
|
||||||
@ -37,12 +36,8 @@ using namespace irr::gui;
|
|||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
CustomVideoSettingsDialog::CustomVideoSettingsDialog(const float w, const float h) :
|
CustomVideoSettingsDialog::CustomVideoSettingsDialog(const float w, const float h) :
|
||||||
ModalDialog(w, h), m_all_kart_animated(true)
|
ModalDialog(w, h)
|
||||||
{
|
{
|
||||||
#ifndef SERVER_ONLY
|
|
||||||
m_all_kart_animated = stk_config->m_max_skinning_bones > 512 ||
|
|
||||||
!CVS->supportsHardwareSkinning();
|
|
||||||
#endif
|
|
||||||
loadFromFile("custom_video_settings.stkgui");
|
loadFromFile("custom_video_settings.stkgui");
|
||||||
updateActivation();
|
updateActivation();
|
||||||
}
|
}
|
||||||
@ -58,26 +53,16 @@ CustomVideoSettingsDialog::~CustomVideoSettingsDialog()
|
|||||||
void CustomVideoSettingsDialog::beforeAddingWidgets()
|
void CustomVideoSettingsDialog::beforeAddingWidgets()
|
||||||
{
|
{
|
||||||
#ifndef SERVER_ONLY
|
#ifndef SERVER_ONLY
|
||||||
getWidget<CheckBoxWidget>("weather_gfx")->setState(UserConfigParams::m_weather_effects);
|
getWidget<CheckBoxWidget>("animated_characters")
|
||||||
|
->setState(UserConfigParams::m_animated_characters);
|
||||||
getWidget<CheckBoxWidget>("dof")->setState(UserConfigParams::m_dof);
|
getWidget<CheckBoxWidget>("dof")->setState(UserConfigParams::m_dof);
|
||||||
|
|
||||||
SpinnerWidget* anim_gfx = getWidget<SpinnerWidget>("anim_gfx");
|
SpinnerWidget* particles_effects = getWidget<SpinnerWidget>("particles_effects");
|
||||||
assert(anim_gfx != NULL);
|
assert(particles_effects != NULL);
|
||||||
anim_gfx->addLabel(_("Disabled"));
|
particles_effects->addLabel(_("Disabled"));
|
||||||
anim_gfx->addLabel(_("Important only"));
|
particles_effects->addLabel(_("Important only"));
|
||||||
anim_gfx->addLabel(_("Enabled"));
|
particles_effects->addLabel(_("Enabled"));
|
||||||
anim_gfx->setValue(UserConfigParams::m_graphical_effects);
|
particles_effects->setValue(UserConfigParams::m_particles_effects);
|
||||||
|
|
||||||
SpinnerWidget* kart_anim = getWidget<SpinnerWidget>("steering_animations");
|
|
||||||
kart_anim->addLabel(_("Disabled")); // 0
|
|
||||||
//I18N: animations setting (only karts with human players are animated)
|
|
||||||
kart_anim->addLabel(_("Human players only")); // 1
|
|
||||||
//I18N: animations setting (all karts are animated)
|
|
||||||
if (m_all_kart_animated)
|
|
||||||
kart_anim->addLabel(_("Enabled for all")); // 2
|
|
||||||
kart_anim->setValue(!m_all_kart_animated &&
|
|
||||||
UserConfigParams::m_show_steering_animations == 2 ?
|
|
||||||
1 : UserConfigParams::m_show_steering_animations);
|
|
||||||
|
|
||||||
SpinnerWidget* geometry_level = getWidget<SpinnerWidget>("geometry_detail");
|
SpinnerWidget* geometry_level = getWidget<SpinnerWidget>("geometry_detail");
|
||||||
//I18N: Geometry level disabled : lowest level, no details
|
//I18N: Geometry level disabled : lowest level, no details
|
||||||
@ -94,21 +79,17 @@ void CustomVideoSettingsDialog::beforeAddingWidgets()
|
|||||||
filtering->addLabel(_("Very Low"));
|
filtering->addLabel(_("Very Low"));
|
||||||
filtering->addLabel(_("Low"));
|
filtering->addLabel(_("Low"));
|
||||||
filtering->addLabel(_("High"));
|
filtering->addLabel(_("High"));
|
||||||
filtering->addLabel(_("Very High"));
|
|
||||||
filtering->setValue(OptionsScreenVideo::getImageQuality());
|
filtering->setValue(OptionsScreenVideo::getImageQuality());
|
||||||
|
|
||||||
SpinnerWidget* shadows = getWidget<SpinnerWidget>("shadows");
|
SpinnerWidget* shadows = getWidget<SpinnerWidget>("shadows");
|
||||||
shadows->addLabel(_("Disabled")); // 0
|
shadows->addLabel(_("Disabled")); // 0
|
||||||
shadows->addLabel(_("Low")); // 1
|
shadows->addLabel(_("Low")); // 1
|
||||||
shadows->addLabel(_("High")); // 2
|
shadows->addLabel(_("High")); // 2
|
||||||
if (CVS->supportsShadows())
|
|
||||||
shadows->setValue(UserConfigParams::m_shadows_resolution / 512);
|
shadows->setValue(UserConfigParams::m_shadows_resolution / 512);
|
||||||
else
|
|
||||||
shadows->setValue(0);
|
|
||||||
getWidget<CheckBoxWidget>("dynamiclight")->setState(UserConfigParams::m_dynamic_lights);
|
getWidget<CheckBoxWidget>("dynamiclight")->setState(UserConfigParams::m_dynamic_lights);
|
||||||
getWidget<CheckBoxWidget>("lightshaft")->setState(UserConfigParams::m_light_shaft);
|
getWidget<CheckBoxWidget>("lightshaft")->setState(UserConfigParams::m_light_shaft);
|
||||||
getWidget<CheckBoxWidget>("ibl")->setState(!UserConfigParams::m_degraded_IBL);
|
getWidget<CheckBoxWidget>("ibl")->setState(!UserConfigParams::m_degraded_IBL);
|
||||||
getWidget<CheckBoxWidget>("global_illumination")->setState(UserConfigParams::m_gi);
|
|
||||||
getWidget<CheckBoxWidget>("motionblur")->setState(UserConfigParams::m_motionblur);
|
getWidget<CheckBoxWidget>("motionblur")->setState(UserConfigParams::m_motionblur);
|
||||||
getWidget<CheckBoxWidget>("mlaa")->setState(UserConfigParams::m_mlaa);
|
getWidget<CheckBoxWidget>("mlaa")->setState(UserConfigParams::m_mlaa);
|
||||||
getWidget<CheckBoxWidget>("glow")->setState(UserConfigParams::m_glow);
|
getWidget<CheckBoxWidget>("glow")->setState(UserConfigParams::m_glow);
|
||||||
@ -124,12 +105,6 @@ void CustomVideoSettingsDialog::beforeAddingWidgets()
|
|||||||
cb_tex_cmp->setState(false);
|
cb_tex_cmp->setState(false);
|
||||||
cb_tex_cmp->setActive(false);
|
cb_tex_cmp->setActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CVS->supportsGlobalIllumination())
|
|
||||||
{
|
|
||||||
shadows->setActive(false);
|
|
||||||
getWidget<CheckBoxWidget>("global_illumination")->setActive(false);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,7 +124,7 @@ GUIEngine::EventPropagation CustomVideoSettingsDialog::processEvent(const std::s
|
|||||||
UserConfigParams::m_motionblur =
|
UserConfigParams::m_motionblur =
|
||||||
advanced_pipeline && getWidget<CheckBoxWidget>("motionblur")->getState();
|
advanced_pipeline && getWidget<CheckBoxWidget>("motionblur")->getState();
|
||||||
|
|
||||||
if (advanced_pipeline && CVS->supportsShadows())
|
if (advanced_pipeline)
|
||||||
{
|
{
|
||||||
UserConfigParams::m_shadows_resolution =
|
UserConfigParams::m_shadows_resolution =
|
||||||
getWidget<SpinnerWidget>("shadows")->getValue() * 512;
|
getWidget<SpinnerWidget>("shadows")->getValue() * 512;
|
||||||
@ -171,10 +146,6 @@ GUIEngine::EventPropagation CustomVideoSettingsDialog::processEvent(const std::s
|
|||||||
UserConfigParams::m_degraded_IBL =
|
UserConfigParams::m_degraded_IBL =
|
||||||
!advanced_pipeline || !getWidget<CheckBoxWidget>("ibl")->getState();
|
!advanced_pipeline || !getWidget<CheckBoxWidget>("ibl")->getState();
|
||||||
|
|
||||||
UserConfigParams::m_gi =
|
|
||||||
advanced_pipeline && CVS->supportsGlobalIllumination() &&
|
|
||||||
getWidget<CheckBoxWidget>("global_illumination")->getState();
|
|
||||||
|
|
||||||
UserConfigParams::m_glow =
|
UserConfigParams::m_glow =
|
||||||
advanced_pipeline && getWidget<CheckBoxWidget>("glow")->getState();
|
advanced_pipeline && getWidget<CheckBoxWidget>("glow")->getState();
|
||||||
|
|
||||||
@ -184,14 +155,11 @@ GUIEngine::EventPropagation CustomVideoSettingsDialog::processEvent(const std::s
|
|||||||
UserConfigParams::m_texture_compression =
|
UserConfigParams::m_texture_compression =
|
||||||
getWidget<CheckBoxWidget>("texture_compression")->getState();
|
getWidget<CheckBoxWidget>("texture_compression")->getState();
|
||||||
|
|
||||||
UserConfigParams::m_graphical_effects =
|
UserConfigParams::m_particles_effects =
|
||||||
getWidget<SpinnerWidget>("anim_gfx")->getValue();
|
getWidget<SpinnerWidget>("particles_effects")->getValue();
|
||||||
|
|
||||||
UserConfigParams::m_weather_effects =
|
UserConfigParams::m_animated_characters =
|
||||||
getWidget<CheckBoxWidget>("weather_gfx")->getState();
|
getWidget<CheckBoxWidget>("animated_characters")->getState();
|
||||||
|
|
||||||
UserConfigParams::m_show_steering_animations =
|
|
||||||
getWidget<SpinnerWidget>("steering_animations")->getValue();
|
|
||||||
|
|
||||||
const int val =
|
const int val =
|
||||||
getWidget<SpinnerWidget>("geometry_detail")->getValue();
|
getWidget<SpinnerWidget>("geometry_detail")->getValue();
|
||||||
@ -227,17 +195,8 @@ void CustomVideoSettingsDialog::updateActivation()
|
|||||||
getWidget<CheckBoxWidget>("ssao")->setActive(light);
|
getWidget<CheckBoxWidget>("ssao")->setActive(light);
|
||||||
getWidget<CheckBoxWidget>("lightshaft")->setActive(light);
|
getWidget<CheckBoxWidget>("lightshaft")->setActive(light);
|
||||||
getWidget<CheckBoxWidget>("ibl")->setActive(light);
|
getWidget<CheckBoxWidget>("ibl")->setActive(light);
|
||||||
getWidget<CheckBoxWidget>("global_illumination")->setActive(light);
|
|
||||||
getWidget<CheckBoxWidget>("glow")->setActive(light);
|
getWidget<CheckBoxWidget>("glow")->setActive(light);
|
||||||
getWidget<CheckBoxWidget>("bloom")->setActive(light);
|
getWidget<CheckBoxWidget>("bloom")->setActive(light);
|
||||||
getWidget<SpinnerWidget>("steering_animations")
|
|
||||||
->setMax(m_all_kart_animated ? 2 : 1);
|
|
||||||
|
|
||||||
if (!CVS->supportsShadows() && !CVS->supportsGlobalIllumination())
|
|
||||||
{
|
|
||||||
getWidget<SpinnerWidget>("shadows")->setActive(false);
|
|
||||||
getWidget<CheckBoxWidget>("global_illumination")->setActive(false);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
} // updateActivation
|
} // updateActivation
|
||||||
|
|
||||||
|
@ -27,8 +27,6 @@
|
|||||||
*/
|
*/
|
||||||
class CustomVideoSettingsDialog : public GUIEngine::ModalDialog
|
class CustomVideoSettingsDialog : public GUIEngine::ModalDialog
|
||||||
{
|
{
|
||||||
private:
|
|
||||||
bool m_all_kart_animated;
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Creates a modal dialog with given percentage of screen width and height
|
* Creates a modal dialog with given percentage of screen width and height
|
||||||
|
@ -886,7 +886,7 @@ void KartSelectionScreen::updateKartWidgetModel(int widget_id,
|
|||||||
model_location.setScale(core::vector3df(scale, scale, scale));
|
model_location.setScale(core::vector3df(scale, scale, scale));
|
||||||
w3->clearModels();
|
w3->clearModels();
|
||||||
const bool has_win_anime =
|
const bool has_win_anime =
|
||||||
UserConfigParams::m_show_steering_animations != 0 &&
|
UserConfigParams::m_animated_characters &&
|
||||||
(((kart_model.getFrame(KartModel::AF_WIN_LOOP_START) > -1 ||
|
(((kart_model.getFrame(KartModel::AF_WIN_LOOP_START) > -1 ||
|
||||||
kart_model.getFrame(KartModel::AF_WIN_START) > -1) &&
|
kart_model.getFrame(KartModel::AF_WIN_START) > -1) &&
|
||||||
kart_model.getFrame(KartModel::AF_WIN_END) > -1) ||
|
kart_model.getFrame(KartModel::AF_WIN_END) > -1) ||
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
#include "audio/sfx_manager.hpp"
|
#include "audio/sfx_manager.hpp"
|
||||||
#include "audio/sfx_base.hpp"
|
#include "audio/sfx_base.hpp"
|
||||||
#include "config/stk_config.hpp"
|
|
||||||
#include "config/user_config.hpp"
|
#include "config/user_config.hpp"
|
||||||
#include "graphics/central_settings.hpp"
|
#include "graphics/central_settings.hpp"
|
||||||
#include "graphics/irr_driver.hpp"
|
#include "graphics/irr_driver.hpp"
|
||||||
@ -52,61 +51,49 @@ void OptionsScreenVideo::initPresets()
|
|||||||
m_presets.push_back
|
m_presets.push_back
|
||||||
({
|
({
|
||||||
false /* light */, 0 /* shadow */, false /* bloom */, false /* motionblur */,
|
false /* light */, 0 /* shadow */, false /* bloom */, false /* motionblur */,
|
||||||
false /* lightshaft */, false /* glow */, false /* mlaa */, false /* ssao */, false /* weather */,
|
false /* lightshaft */, false /* glow */, false /* mlaa */, false /* ssao */,
|
||||||
1 /* animatedScenery */, 0 /* animatedCharacters */, 0 /* image_quality */,
|
false /* animatedCharacters */, 0 /* particles */, 0 /* image_quality */,
|
||||||
false /* depth of field */, false /* global illumination */, true /* degraded IBL */
|
false /* depth of field */, true /* degraded IBL */
|
||||||
});
|
});
|
||||||
|
|
||||||
m_presets.push_back
|
m_presets.push_back
|
||||||
({
|
({
|
||||||
false /* light */, 0 /* shadow */, false /* bloom */, false /* motionblur */,
|
false /* light */, 0 /* shadow */, false /* bloom */, false /* motionblur */,
|
||||||
false /* lightshaft */, false /* glow */, false /* mlaa */, false /* ssao */, false /* weather */,
|
false /* lightshaft */, false /* glow */, false /* mlaa */, false /* ssao */,
|
||||||
2 /* animatedScenery */, 1 /* animatedCharacters */, 1 /* image_quality */,
|
true /* animatedCharacters */, 0 /* particles */, 0 /* image_quality */,
|
||||||
false /* depth of field */, false /* global illumination */, true /* degraded IBL */
|
false /* depth of field */, true /* degraded IBL */
|
||||||
});
|
});
|
||||||
|
|
||||||
m_presets.push_back
|
m_presets.push_back
|
||||||
({
|
({
|
||||||
true /* light */, 0 /* shadow */, false /* bloom */, false /* motionblur */,
|
true /* light */, 0 /* shadow */, false /* bloom */, false /* motionblur */,
|
||||||
false /* lightshaft */, false /* glow */, false /* mlaa */, false /* ssao */, true /* weather */,
|
false /* lightshaft */, false /* glow */, false /* mlaa */, false /* ssao */,
|
||||||
2 /* animatedScenery */, 1 /* animatedCharacters */, 2 /* image_quality */,
|
true /* animatedCharacters */, 1 /* particles */, 1 /* image_quality */,
|
||||||
false /* depth of field */, false /* global illumination */, true /* degraded IBL */
|
false /* depth of field */, true /* degraded IBL */
|
||||||
});
|
});
|
||||||
|
|
||||||
m_presets.push_back
|
m_presets.push_back
|
||||||
({
|
({
|
||||||
true /* light */, 0 /* shadow */, false /* bloom */, true /* motionblur */,
|
true /* light */, 0 /* shadow */, false /* bloom */, true /* motionblur */,
|
||||||
true /* lightshaft */, true /* glow */, true /* mlaa */, false /* ssao */, true /* weather */,
|
true /* lightshaft */, true /* glow */, true /* mlaa */, false /* ssao */,
|
||||||
2 /* animatedScenery */, 1 /* animatedCharacters */, 2 /* image_quality */,
|
true /* animatedCharacters */, 1 /* particles */, 1 /* image_quality */,
|
||||||
false /* depth of field */, false /* global illumination */, false /* degraded IBL */
|
false /* depth of field */, false /* degraded IBL */
|
||||||
});
|
});
|
||||||
|
|
||||||
m_presets.push_back
|
m_presets.push_back
|
||||||
({
|
({
|
||||||
true /* light */, 512 /* shadow */, true /* bloom */, true /* motionblur */,
|
true /* light */, 512 /* shadow */, true /* bloom */, true /* motionblur */,
|
||||||
true /* lightshaft */, true /* glow */, true /* mlaa */, true /* ssao */, true /* weather */,
|
true /* lightshaft */, true /* glow */, true /* mlaa */, false /* ssao */,
|
||||||
2 /* animatedScenery */,
|
true /* animatedCharacters */, 2 /* particles */, 2 /* image_quality */,
|
||||||
#ifndef SERVER_ONLY
|
true /* depth of field */, false /* degraded IBL */
|
||||||
(stk_config->m_max_skinning_bones > 512 || !CVS->supportsHardwareSkinning() ? 2 : 1),
|
|
||||||
#else
|
|
||||||
2 /* animatedCharacters */,
|
|
||||||
#endif
|
|
||||||
3 /* image_quality */,
|
|
||||||
true /* depth of field */, false /* global illumination */, false /* degraded IBL */
|
|
||||||
});
|
});
|
||||||
|
|
||||||
m_presets.push_back
|
m_presets.push_back
|
||||||
({
|
({
|
||||||
true /* light */, 1024 /* shadow */, true /* bloom */, true /* motionblur */,
|
true /* light */, 1024 /* shadow */, true /* bloom */, true /* motionblur */,
|
||||||
true /* lightshaft */, true /* glow */, true /* mlaa */, true /* ssao */, true /* weather */,
|
true /* lightshaft */, true /* glow */, true /* mlaa */, true /* ssao */,
|
||||||
2 /* animatedScenery */,
|
true /* animatedCharacters */, 2 /* particles */, 2 /* image_quality */,
|
||||||
#ifndef SERVER_ONLY
|
true /* depth of field */, false /* degraded IBL */
|
||||||
(stk_config->m_max_skinning_bones > 512 || !CVS->supportsHardwareSkinning() ? 2 : 1),
|
|
||||||
#else
|
|
||||||
2 /* animatedCharacters */,
|
|
||||||
#endif
|
|
||||||
3 /* image_quality */,
|
|
||||||
true /* depth of field */, true /* global illumination */, false /* degraded IBL */
|
|
||||||
});
|
});
|
||||||
|
|
||||||
} // initPresets
|
} // initPresets
|
||||||
@ -142,27 +129,19 @@ struct Resolution
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
int OptionsScreenVideo::getImageQuality()
|
int OptionsScreenVideo::getImageQuality()
|
||||||
{
|
{
|
||||||
if (UserConfigParams::m_trilinear == false &&
|
if (UserConfigParams::m_anisotropic == 2 &&
|
||||||
UserConfigParams::m_anisotropic == 0 &&
|
|
||||||
(UserConfigParams::m_high_definition_textures & 0x01) == 0x00 &&
|
(UserConfigParams::m_high_definition_textures & 0x01) == 0x00 &&
|
||||||
UserConfigParams::m_hq_mipmap == false)
|
UserConfigParams::m_hq_mipmap == false)
|
||||||
return 0;
|
return 0;
|
||||||
if (UserConfigParams::m_trilinear == true &&
|
if (UserConfigParams::m_anisotropic == 4 &&
|
||||||
UserConfigParams::m_anisotropic == 2 &&
|
(UserConfigParams::m_high_definition_textures & 0x01) == 0x01 &&
|
||||||
(UserConfigParams::m_high_definition_textures & 0x01) == 0x00 &&
|
|
||||||
UserConfigParams::m_hq_mipmap == false)
|
UserConfigParams::m_hq_mipmap == false)
|
||||||
return 1;
|
return 1;
|
||||||
if (UserConfigParams::m_trilinear == true &&
|
if (UserConfigParams::m_anisotropic == 16 &&
|
||||||
UserConfigParams::m_anisotropic == 4 &&
|
|
||||||
(UserConfigParams::m_high_definition_textures & 0x01) == 0x01 &&
|
|
||||||
UserConfigParams::m_hq_mipmap == false)
|
|
||||||
return 2;
|
|
||||||
if (UserConfigParams::m_trilinear == true &&
|
|
||||||
UserConfigParams::m_anisotropic == 16 &&
|
|
||||||
(UserConfigParams::m_high_definition_textures & 0x01) == 0x01 &&
|
(UserConfigParams::m_high_definition_textures & 0x01) == 0x01 &&
|
||||||
UserConfigParams::m_hq_mipmap == true)
|
UserConfigParams::m_hq_mipmap == true)
|
||||||
return 3;
|
|
||||||
return 2;
|
return 2;
|
||||||
|
return 1;
|
||||||
} // getImageQuality
|
} // getImageQuality
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -171,25 +150,16 @@ void OptionsScreenVideo::setImageQuality(int quality)
|
|||||||
switch (quality)
|
switch (quality)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
UserConfigParams::m_trilinear = false;
|
|
||||||
UserConfigParams::m_anisotropic = 0;
|
|
||||||
UserConfigParams::m_high_definition_textures = 0x02;
|
|
||||||
UserConfigParams::m_hq_mipmap = false;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
UserConfigParams::m_trilinear = true;
|
|
||||||
UserConfigParams::m_anisotropic = 2;
|
UserConfigParams::m_anisotropic = 2;
|
||||||
UserConfigParams::m_high_definition_textures = 0x02;
|
UserConfigParams::m_high_definition_textures = 0x02;
|
||||||
UserConfigParams::m_hq_mipmap = false;
|
UserConfigParams::m_hq_mipmap = false;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 1:
|
||||||
UserConfigParams::m_trilinear = true;
|
|
||||||
UserConfigParams::m_anisotropic = 4;
|
UserConfigParams::m_anisotropic = 4;
|
||||||
UserConfigParams::m_high_definition_textures = 0x03;
|
UserConfigParams::m_high_definition_textures = 0x03;
|
||||||
UserConfigParams::m_hq_mipmap = false;
|
UserConfigParams::m_hq_mipmap = false;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 2:
|
||||||
UserConfigParams::m_trilinear = true;
|
|
||||||
UserConfigParams::m_anisotropic = 16;
|
UserConfigParams::m_anisotropic = 16;
|
||||||
UserConfigParams::m_high_definition_textures = 0x03;
|
UserConfigParams::m_high_definition_textures = 0x03;
|
||||||
UserConfigParams::m_hq_mipmap = true;
|
UserConfigParams::m_hq_mipmap = true;
|
||||||
@ -403,8 +373,8 @@ void OptionsScreenVideo::updateGfxSlider()
|
|||||||
bool found = false;
|
bool found = false;
|
||||||
for (unsigned int l = 0; l < m_presets.size(); l++)
|
for (unsigned int l = 0; l < m_presets.size(); l++)
|
||||||
{
|
{
|
||||||
if (m_presets[l].animatedCharacters == UserConfigParams::m_show_steering_animations &&
|
if (m_presets[l].animatedCharacters == UserConfigParams::m_animated_characters &&
|
||||||
m_presets[l].animatedScenery == UserConfigParams::m_graphical_effects &&
|
m_presets[l].particles == UserConfigParams::m_particles_effects &&
|
||||||
m_presets[l].image_quality == getImageQuality() &&
|
m_presets[l].image_quality == getImageQuality() &&
|
||||||
m_presets[l].bloom == UserConfigParams::m_bloom &&
|
m_presets[l].bloom == UserConfigParams::m_bloom &&
|
||||||
m_presets[l].glow == UserConfigParams::m_glow &&
|
m_presets[l].glow == UserConfigParams::m_glow &&
|
||||||
@ -412,12 +382,9 @@ void OptionsScreenVideo::updateGfxSlider()
|
|||||||
m_presets[l].lightshaft == UserConfigParams::m_light_shaft &&
|
m_presets[l].lightshaft == UserConfigParams::m_light_shaft &&
|
||||||
m_presets[l].mlaa == UserConfigParams::m_mlaa &&
|
m_presets[l].mlaa == UserConfigParams::m_mlaa &&
|
||||||
m_presets[l].motionblur == UserConfigParams::m_motionblur &&
|
m_presets[l].motionblur == UserConfigParams::m_motionblur &&
|
||||||
//m_presets[l].shaders == UserConfigParams::m_pixel_shaders
|
|
||||||
m_presets[l].shadows == UserConfigParams::m_shadows_resolution &&
|
m_presets[l].shadows == UserConfigParams::m_shadows_resolution &&
|
||||||
m_presets[l].ssao == UserConfigParams::m_ssao &&
|
m_presets[l].ssao == UserConfigParams::m_ssao &&
|
||||||
m_presets[l].weather == UserConfigParams::m_weather_effects &&
|
|
||||||
m_presets[l].dof == UserConfigParams::m_dof &&
|
m_presets[l].dof == UserConfigParams::m_dof &&
|
||||||
m_presets[l].global_illumination == UserConfigParams::m_gi &&
|
|
||||||
m_presets[l].degraded_ibl == UserConfigParams::m_degraded_IBL)
|
m_presets[l].degraded_ibl == UserConfigParams::m_degraded_IBL)
|
||||||
{
|
{
|
||||||
gfx->setValue(l + 1);
|
gfx->setValue(l + 1);
|
||||||
@ -451,13 +418,7 @@ void OptionsScreenVideo::updateTooltip()
|
|||||||
//I18N: in the graphical options tooltip;
|
//I18N: in the graphical options tooltip;
|
||||||
// indicates a graphical feature is disabled
|
// indicates a graphical feature is disabled
|
||||||
const core::stringw disabled = _LTR("Disabled");
|
const core::stringw disabled = _LTR("Disabled");
|
||||||
//I18N: if all kart animations are enabled
|
//I18N: if only important particles effects is enabled
|
||||||
const core::stringw all = _LTR("All");
|
|
||||||
//I18N: if some kart animations are enabled
|
|
||||||
const core::stringw me = _LTR("Me Only");
|
|
||||||
//I18N: if no kart animations are enabled
|
|
||||||
const core::stringw none = _LTR("None");
|
|
||||||
//I18N: if only important animated scenery is enabled
|
|
||||||
const core::stringw important_only = _LTR("Important only");
|
const core::stringw important_only = _LTR("Important only");
|
||||||
|
|
||||||
//I18N: in the graphical options tooltip;
|
//I18N: in the graphical options tooltip;
|
||||||
@ -469,27 +430,16 @@ void OptionsScreenVideo::updateTooltip()
|
|||||||
//I18N: in the graphical options tooltip;
|
//I18N: in the graphical options tooltip;
|
||||||
// indicates the rendered image quality is high
|
// indicates the rendered image quality is high
|
||||||
const core::stringw high = _LTR("High");
|
const core::stringw high = _LTR("High");
|
||||||
//I18N: in the graphical options tooltip;
|
|
||||||
// indicates the rendered image quality is very high
|
|
||||||
const core::stringw very_high = _LTR("Very High");
|
|
||||||
|
|
||||||
//I18N: in graphical options
|
//I18N: in graphical options
|
||||||
// tooltip = tooltip + L"\n" + _("Pixel shaders: %s",
|
tooltip = _("Particles Effects: %s",
|
||||||
// UserConfigParams::m_pixel_shaders ? enabled : disabled);
|
UserConfigParams::m_particles_effects == 2 ? enabled :
|
||||||
//I18N: in graphical options
|
UserConfigParams::m_particles_effects == 1 ? important_only :
|
||||||
tooltip = _("Animated Scenery: %s",
|
|
||||||
UserConfigParams::m_graphical_effects == 2 ? enabled :
|
|
||||||
UserConfigParams::m_graphical_effects == 1 ? important_only :
|
|
||||||
disabled);
|
disabled);
|
||||||
|
|
||||||
//I18N: in graphical options
|
//I18N: in graphical options
|
||||||
tooltip = tooltip + L"\n" + _("Weather Effects: %s",
|
|
||||||
UserConfigParams::m_weather_effects ? enabled : disabled);
|
|
||||||
//I18N: in graphical options
|
|
||||||
tooltip = tooltip + L"\n" + _("Animated Characters: %s",
|
tooltip = tooltip + L"\n" + _("Animated Characters: %s",
|
||||||
UserConfigParams::m_show_steering_animations == 2
|
UserConfigParams::m_animated_characters ? enabled : disabled);
|
||||||
? all
|
|
||||||
: (UserConfigParams::m_show_steering_animations == 1 ? me : none));
|
|
||||||
//I18N: in graphical options
|
//I18N: in graphical options
|
||||||
tooltip = tooltip + L"\n" + _("Dynamic lights: %s",
|
tooltip = tooltip + L"\n" + _("Dynamic lights: %s",
|
||||||
UserConfigParams::m_dynamic_lights ? enabled : disabled);
|
UserConfigParams::m_dynamic_lights ? enabled : disabled);
|
||||||
@ -524,15 +474,10 @@ void OptionsScreenVideo::updateTooltip()
|
|||||||
tooltip = tooltip + L"\n" + _("Depth of field: %s",
|
tooltip = tooltip + L"\n" + _("Depth of field: %s",
|
||||||
UserConfigParams::m_dof ? enabled : disabled);
|
UserConfigParams::m_dof ? enabled : disabled);
|
||||||
|
|
||||||
//I18N: in graphical options
|
|
||||||
tooltip = tooltip + L"\n" + _("Global illumination: %s",
|
|
||||||
UserConfigParams::m_gi ? enabled : disabled);
|
|
||||||
|
|
||||||
//I18N: in graphical options
|
//I18N: in graphical options
|
||||||
int quality = getImageQuality();
|
int quality = getImageQuality();
|
||||||
tooltip = tooltip + L"\n" + _("Rendered image quality: %s",
|
tooltip = tooltip + L"\n" + _("Rendered image quality: %s",
|
||||||
quality == 0 ? very_low : quality == 1 ? low : quality == 2 ?
|
quality == 0 ? very_low : quality == 1 ? low : high);
|
||||||
high : very_high);
|
|
||||||
|
|
||||||
gfx->setTooltip(tooltip);
|
gfx->setTooltip(tooltip);
|
||||||
} // updateTooltip
|
} // updateTooltip
|
||||||
@ -599,8 +544,8 @@ void OptionsScreenVideo::eventCallback(Widget* widget, const std::string& name,
|
|||||||
|
|
||||||
const int level = gfx_level->getValue() - 1;
|
const int level = gfx_level->getValue() - 1;
|
||||||
|
|
||||||
UserConfigParams::m_show_steering_animations = m_presets[level].animatedCharacters;
|
UserConfigParams::m_animated_characters = m_presets[level].animatedCharacters;
|
||||||
UserConfigParams::m_graphical_effects = m_presets[level].animatedScenery;
|
UserConfigParams::m_particles_effects = m_presets[level].particles;
|
||||||
setImageQuality(m_presets[level].image_quality);
|
setImageQuality(m_presets[level].image_quality);
|
||||||
UserConfigParams::m_bloom = m_presets[level].bloom;
|
UserConfigParams::m_bloom = m_presets[level].bloom;
|
||||||
UserConfigParams::m_glow = m_presets[level].glow;
|
UserConfigParams::m_glow = m_presets[level].glow;
|
||||||
@ -608,12 +553,9 @@ void OptionsScreenVideo::eventCallback(Widget* widget, const std::string& name,
|
|||||||
UserConfigParams::m_light_shaft = m_presets[level].lightshaft;
|
UserConfigParams::m_light_shaft = m_presets[level].lightshaft;
|
||||||
UserConfigParams::m_mlaa = m_presets[level].mlaa;
|
UserConfigParams::m_mlaa = m_presets[level].mlaa;
|
||||||
UserConfigParams::m_motionblur = m_presets[level].motionblur;
|
UserConfigParams::m_motionblur = m_presets[level].motionblur;
|
||||||
//UserConfigParams::m_pixel_shaders = m_presets[level].shaders;
|
|
||||||
UserConfigParams::m_shadows_resolution = m_presets[level].shadows;
|
UserConfigParams::m_shadows_resolution = m_presets[level].shadows;
|
||||||
UserConfigParams::m_ssao = m_presets[level].ssao;
|
UserConfigParams::m_ssao = m_presets[level].ssao;
|
||||||
UserConfigParams::m_weather_effects = m_presets[level].weather;
|
|
||||||
UserConfigParams::m_dof = m_presets[level].dof;
|
UserConfigParams::m_dof = m_presets[level].dof;
|
||||||
UserConfigParams::m_gi = m_presets[level].global_illumination;
|
|
||||||
UserConfigParams::m_degraded_IBL = m_presets[level].degraded_ibl;
|
UserConfigParams::m_degraded_IBL = m_presets[level].degraded_ibl;
|
||||||
|
|
||||||
updateGfxSlider();
|
updateGfxSlider();
|
||||||
|
@ -35,13 +35,11 @@ struct GFXPreset
|
|||||||
bool glow;
|
bool glow;
|
||||||
bool mlaa;
|
bool mlaa;
|
||||||
bool ssao;
|
bool ssao;
|
||||||
bool weather;
|
bool animatedCharacters;
|
||||||
int animatedScenery;
|
int particles;
|
||||||
int animatedCharacters;
|
|
||||||
int image_quality;
|
int image_quality;
|
||||||
/** Depth of field */
|
/** Depth of field */
|
||||||
bool dof;
|
bool dof;
|
||||||
bool global_illumination;
|
|
||||||
bool degraded_ibl;
|
bool degraded_ibl;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ LODNode* ModelDefinitionLoader::instanciateAsLOD(const XMLNode* node, scene::ISc
|
|||||||
for (unsigned int m=0; m<group.size(); m++)
|
for (unsigned int m=0; m<group.size(); m++)
|
||||||
{
|
{
|
||||||
if (group[m].m_skeletal_animation &&
|
if (group[m].m_skeletal_animation &&
|
||||||
(UserConfigParams::m_graphical_effects > 1 ||
|
(UserConfigParams::m_animated_characters ||
|
||||||
World::getWorld()->getIdent() == IDENT_CUTSCENE))
|
World::getWorld()->getIdent() == IDENT_CUTSCENE))
|
||||||
{
|
{
|
||||||
scene::IAnimatedMesh* a_mesh = irr_driver->getAnimatedMesh(group[m].m_model_file);
|
scene::IAnimatedMesh* a_mesh = irr_driver->getAnimatedMesh(group[m].m_model_file);
|
||||||
|
@ -1602,7 +1602,7 @@ void Track::createWater(const XMLNode &node)
|
|||||||
*/
|
*/
|
||||||
scene::ISceneNode* scene_node = NULL;
|
scene::ISceneNode* scene_node = NULL;
|
||||||
/*
|
/*
|
||||||
if (UserConfigParams::m_graphical_effects > 1)
|
if (UserConfigParams::m_particles_effects > 1)
|
||||||
{
|
{
|
||||||
scene::IMesh *welded;
|
scene::IMesh *welded;
|
||||||
scene_node = irr_driver->addWaterNode(mesh, &welded,
|
scene_node = irr_driver->addWaterNode(mesh, &welded,
|
||||||
@ -2157,7 +2157,7 @@ void Track::loadObjects(const XMLNode* root, const std::string& path, ModelDefin
|
|||||||
}
|
}
|
||||||
else if (name == "particle-emitter")
|
else if (name == "particle-emitter")
|
||||||
{
|
{
|
||||||
if (UserConfigParams::m_graphical_effects > 1)
|
if (UserConfigParams::m_particles_effects > 1)
|
||||||
{
|
{
|
||||||
m_track_object_manager->add(*node, parent, model_def_loader, parent_library);
|
m_track_object_manager->add(*node, parent, model_def_loader, parent_library);
|
||||||
}
|
}
|
||||||
|
@ -416,7 +416,7 @@ TrackObjectPresentationMesh::TrackObjectPresentationMesh(
|
|||||||
m_is_in_skybox = true;
|
m_is_in_skybox = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool animated = skeletal_animation && (UserConfigParams::m_graphical_effects > 1 ||
|
bool animated = skeletal_animation && (UserConfigParams::m_animated_characters ||
|
||||||
World::getWorld()->getIdent() == IDENT_CUTSCENE);
|
World::getWorld()->getIdent() == IDENT_CUTSCENE);
|
||||||
bool displacing = false;
|
bool displacing = false;
|
||||||
xml_node.get("displacing", &displacing);
|
xml_node.get("displacing", &displacing);
|
||||||
@ -465,7 +465,7 @@ TrackObjectPresentationMesh::TrackObjectPresentationMesh(
|
|||||||
m_node = NULL;
|
m_node = NULL;
|
||||||
m_is_in_skybox = false;
|
m_is_in_skybox = false;
|
||||||
m_render_info = NULL;
|
m_render_info = NULL;
|
||||||
bool animated = (UserConfigParams::m_graphical_effects > 1 ||
|
bool animated = (UserConfigParams::m_particles_effects > 1 ||
|
||||||
World::getWorld()->getIdent() == IDENT_CUTSCENE);
|
World::getWorld()->getIdent() == IDENT_CUTSCENE);
|
||||||
|
|
||||||
m_model_file = model_file;
|
m_model_file = model_file;
|
||||||
@ -502,7 +502,7 @@ void TrackObjectPresentationMesh::init(const XMLNode* xml_node,
|
|||||||
if(xml_node)
|
if(xml_node)
|
||||||
xml_node->get("skeletal-animation", &skeletal_animation);
|
xml_node->get("skeletal-animation", &skeletal_animation);
|
||||||
|
|
||||||
bool animated = skeletal_animation && (UserConfigParams::m_graphical_effects > 1 ||
|
bool animated = skeletal_animation && (UserConfigParams::m_particles_effects > 1 ||
|
||||||
World::getWorld()->getIdent() == IDENT_CUTSCENE);
|
World::getWorld()->getIdent() == IDENT_CUTSCENE);
|
||||||
bool displacing = false;
|
bool displacing = false;
|
||||||
std::string interaction;
|
std::string interaction;
|
||||||
|
Loading…
Reference in New Issue
Block a user