Remove maximum number of lights setting
It is redundant, 8 is an optimal number.
This commit is contained in:
parent
a902a92d34
commit
563238fd92
4 changed files with 3 additions and 7 deletions
|
@ -50,7 +50,7 @@ const int FEATURE_DANGLYMESH = 0x40000;
|
|||
|
||||
const int NUM_CUBE_FACES = 6;
|
||||
const int MAX_BONES = 128;
|
||||
const int MAX_LIGHTS = 16;
|
||||
const int MAX_LIGHTS = 8;
|
||||
const int MAX_PARTICLES = 32;
|
||||
const int MAX_CHARS = 128;
|
||||
const int MAX_GRASS_CLUSTERS = 256;
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace graphics {
|
|||
|
||||
constexpr int kNumCubeFaces = 6;
|
||||
constexpr int kMaxBones = 128;
|
||||
constexpr int kMaxLights = 16;
|
||||
constexpr int kMaxLights = 8;
|
||||
constexpr int kMaxParticles = 32;
|
||||
constexpr int kMaxCharacters = 128;
|
||||
constexpr int kMaxGrassClusters = 256;
|
||||
|
@ -84,7 +84,6 @@ struct GraphicsOptions {
|
|||
int width { 0 };
|
||||
int height { 0 };
|
||||
bool fullscreen { false };
|
||||
int numLights { 8 };
|
||||
int shadowResolution { 0 };
|
||||
};
|
||||
|
||||
|
|
|
@ -40,7 +40,6 @@ namespace reone {
|
|||
|
||||
static const char kConfigFilename[] = "reone.cfg";
|
||||
|
||||
static constexpr int kDefaultNumLights = 8;
|
||||
static constexpr int kDefaultShadowResolution = 2;
|
||||
static constexpr int kDefaultMusicVolume = 85;
|
||||
static constexpr int kDefaultVoiceVolume = 85;
|
||||
|
@ -74,7 +73,6 @@ void Program::initOptions() {
|
|||
("height", po::value<int>()->default_value(600), "window height")
|
||||
("fullscreen", po::value<bool>()->default_value(false), "enable fullscreen")
|
||||
("pbr", po::value<bool>()->default_value(false), "enable enhanced graphics mode")
|
||||
("numlights", po::value<int>()->default_value(kDefaultNumLights), "maximum number of lights")
|
||||
("shadowres", po::value<int>()->default_value(kDefaultShadowResolution), "shadow map resolution")
|
||||
("musicvol", po::value<int>()->default_value(kDefaultMusicVolume), "music volume in percents")
|
||||
("voicevol", po::value<int>()->default_value(kDefaultVoiceVolume), "voice volume in percents")
|
||||
|
@ -107,7 +105,6 @@ void Program::loadOptions() {
|
|||
_options.graphics.width = vars["width"].as<int>();
|
||||
_options.graphics.height = vars["height"].as<int>();
|
||||
_options.graphics.fullscreen = vars["fullscreen"].as<bool>();
|
||||
_options.graphics.numLights = vars["numlights"].as<int>();
|
||||
_options.graphics.shadowResolution = vars["shadowres"].as<int>();
|
||||
_options.audio.musicVolume = vars["musicvol"].as<int>();
|
||||
_options.audio.voiceVolume = vars["voicevol"].as<int>();
|
||||
|
|
|
@ -255,7 +255,7 @@ void ModelSceneNode::updateLighting() {
|
|||
if (!_lightingDirty) return;
|
||||
|
||||
_lightsAffectedBy.clear();
|
||||
_sceneGraph->getLightsAt(*this, _lightsAffectedBy, _sceneGraph->options().numLights, bind(&ModelSceneNode::isAffectableByLight, this, _1));
|
||||
_sceneGraph->getLightsAt(*this, _lightsAffectedBy, kMaxLights, bind(&ModelSceneNode::isAffectableByLight, this, _1));
|
||||
_lightingDirty = false;
|
||||
|
||||
for (auto &attached : _attachedModels) {
|
||||
|
|
Loading…
Reference in a new issue