diff --git a/TODO b/TODO index f8dad19..4d03b12 100644 --- a/TODO +++ b/TODO @@ -1,10 +1,9 @@ Technology Preview 2 : - Fix the fog impression when cloud layer overlaps with ground range. +- Remove color gradations (replace with automatic boolean and simple colors). - Replace zone ranges with curves (with curve input and curve dialog). - Interface for textures thickness, slope_range and thickness_transparency (and correct slider ranges). - Render tab previews should not rerender when changing render options. -- Compute shadows only once for all textures at a same location. - => Add an intermediary light status (two pass lighting). - Add layer sorting/naming. - Disable specular lighting in explorer (and everything camera dependent). - Add logarithmic sliders for some float values. diff --git a/gui_qt/baseexplorerchunk.cpp b/gui_qt/baseexplorerchunk.cpp index 02dbc3d..6635e10 100644 --- a/gui_qt/baseexplorerchunk.cpp +++ b/gui_qt/baseexplorerchunk.cpp @@ -70,7 +70,7 @@ bool BaseExplorerChunk::maintain() void BaseExplorerChunk::updatePriority(CameraDefinition* camera) { - if (_reset_needed || (_texture_max_size > 0 && _texture_current_size == 0)) + if (_reset_needed || (_texture_max_size > 1 && _texture_current_size <= 1)) { priority = 1000.0; } diff --git a/gui_qt/formsky.cpp b/gui_qt/formsky.cpp index b7c5fac..9148641 100644 --- a/gui_qt/formsky.cpp +++ b/gui_qt/formsky.cpp @@ -27,6 +27,7 @@ public: protected: QColor getColor(double x, double y) { + y -= 100.0 * scaling; if (y > 0.0) { return QColor(0, 0, 0); @@ -66,6 +67,7 @@ public: protected: QColor getColor(double x, double y) { + y -= 100.0 * scaling; if (y > 0.0) { return QColor(0, 0, 0); diff --git a/i18n/paysages_fr.ts b/i18n/paysages_fr.ts index 44bb748..9c8ebea 100644 --- a/i18n/paysages_fr.ts +++ b/i18n/paysages_fr.ts @@ -555,57 +555,57 @@ Maintenir Ctrl : Plus rapide FormSky - + West preview Aperçu de l'ouest - + East preview Aperçu de l'est - + Day time Heure du jour - + Sun color Couleur du soleil - + Sun radius Diamètre apparent du soleil - + Sun halo radius - + Sun halo profile - + Zenith color Couleur du ciel au zénith - + Haze color Couleur de la brume - + Haze height Hauteur apparente de la brume - + Haze smoothing Facteur de lissage de la brume diff --git a/lib_paysages/textures.c b/lib_paysages/textures.c index 4a7522b..9fd4cfb 100644 --- a/lib_paysages/textures.c +++ b/lib_paysages/textures.c @@ -336,17 +336,17 @@ double texturesGetLayerCoverage(TextureLayerDefinition* definition, Renderer* re return zoneGetValue(definition->zone, base.location, base.normal); } -static inline Color _getLayerColor(Renderer* renderer, TextureResult result) +static inline Color _getLayerColor(Renderer* renderer, TextureResult result, LightStatus* light) { - LightStatus light; - - renderer->getLightStatus(renderer, &light, result.location); - return renderer->applyLightStatus(renderer, &light, result.location, result.normal, result.definition->material); + return renderer->applyLightStatus(renderer, light, result.location, result.normal, result.definition->material); } Color texturesGetLayerColor(TextureLayerDefinition* definition, Renderer* renderer, Vector3 location, double detail) { - return _getLayerColor(renderer, _getLayerResult(definition, renderer, location.x, location.z, detail)); + LightStatus light; + TextureResult result = _getLayerResult(definition, renderer, location.x, location.z, detail); + renderer->getLightStatus(renderer, &light, result.location); + return _getLayerColor(renderer, result, &light); } Color texturesGetColor(TexturesDefinition* definition, Renderer* renderer, double x, double z, double detail) @@ -356,8 +356,6 @@ Color texturesGetColor(TexturesDefinition* definition, Renderer* renderer, doubl double thickness, last_height; int i, start; - /* TODO Optimize : each layer computes the same shadows */ - detail *= 0.1; results[0] = _getTerrainResult(renderer, x, z, detail); @@ -403,9 +401,11 @@ Color texturesGetColor(TexturesDefinition* definition, Renderer* renderer, doubl } /* Apply colors and alphas */ + LightStatus light; + renderer->getLightStatus(renderer, &light, results[start].location); if (results[start].definition) { - result = _getLayerColor(renderer, results[start]); + result = _getLayerColor(renderer, results[start], &light); } else { @@ -417,7 +417,7 @@ Color texturesGetColor(TexturesDefinition* definition, Renderer* renderer, doubl { if (results[i].definition) { - color = _getLayerColor(renderer, results[i]); + color = _getLayerColor(renderer, results[i], &light); color.a = results[i].thickness; } else