diff --git a/src/graphics/render/WorldRenderer.cpp b/src/graphics/render/WorldRenderer.cpp index 6c3f5e04..4f2899f7 100644 --- a/src/graphics/render/WorldRenderer.cpp +++ b/src/graphics/render/WorldRenderer.cpp @@ -115,7 +115,7 @@ bool WorldRenderer::drawChunk( void WorldRenderer::drawChunks(Chunks* chunks, Camera* camera, Shader* shader) { auto assets = engine->getAssets(); auto atlas = assets->get("blocks"); - + atlas->getTexture()->bind(); renderer->update(); @@ -126,8 +126,8 @@ void WorldRenderer::drawChunks(Chunks* chunks, Camera* camera, Shader* shader) { if (chunks->chunks[i] == nullptr) continue; indices.emplace_back(i); } - float px = camera->position.x / (float)CHUNK_W - 0.5f; - float pz = camera->position.z / (float)CHUNK_D - 0.5f; + float px = camera->position.x / static_cast(CHUNK_W) - 0.5f; + float pz = camera->position.z / static_cast(CHUNK_D) - 0.5f; std::sort(indices.begin(), indices.end(), [chunks, px, pz](auto i, auto j) { const auto a = chunks->chunks[i].get(); const auto b = chunks->chunks[j].get(); diff --git a/src/settings.hpp b/src/settings.hpp index ccc3f906..58fb2c07 100644 --- a/src/settings.hpp +++ b/src/settings.hpp @@ -57,7 +57,7 @@ struct CameraSettings { struct GraphicsSettings { /// @brief Fog opacity is calculated as `pow(depth*k, fogCurve)` where k depends on chunksLoadDistance. /// 1.0 is linear, 2.0 is quadratic - NumberSetting fogCurve {1.6f, 1.0f, 6.0f}; + NumberSetting fogCurve {1.0f, 1.0f, 6.0f}; /// @brief Lighting gamma NumberSetting gamma {1.0f, 0.4f, 1.0f}; /// @brief Enable blocks backlight to prevent complete darkness