set default fog curve to 1.0
This commit is contained in:
parent
c12619a8d6
commit
bbfbb28349
@ -115,7 +115,7 @@ bool WorldRenderer::drawChunk(
|
||||
void WorldRenderer::drawChunks(Chunks* chunks, Camera* camera, Shader* shader) {
|
||||
auto assets = engine->getAssets();
|
||||
auto atlas = assets->get<Atlas>("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<float>(CHUNK_W) - 0.5f;
|
||||
float pz = camera->position.z / static_cast<float>(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();
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user