update some blocks lighting params

This commit is contained in:
MihailRis 2025-01-26 19:35:13 +03:00
parent fc6629f4ca
commit 84f39dde39

View File

@ -9,7 +9,7 @@
#include "lighting/Lightmap.hpp" #include "lighting/Lightmap.hpp"
#include "frontend/ContentGfxCache.hpp" #include "frontend/ContentGfxCache.hpp"
const glm::vec3 BlocksRenderer::SUN_VECTOR (0.411934f, 0.863868f, -0.279161f); const glm::vec3 BlocksRenderer::SUN_VECTOR (0.2275f,0.9388f,-0.1005f);
BlocksRenderer::BlocksRenderer( BlocksRenderer::BlocksRenderer(
size_t capacity, size_t capacity,
@ -129,7 +129,7 @@ void BlocksRenderer::faceAO(
float s = 0.5f; float s = 0.5f;
if (lights) { if (lights) {
float d = glm::dot(glm::normalize(Z), SUN_VECTOR); float d = glm::dot(glm::normalize(Z), SUN_VECTOR);
d = 0.8f + d * 0.2f; d = 0.7f + d * 0.3f;
auto axisX = glm::normalize(X); auto axisX = glm::normalize(X);
auto axisY = glm::normalize(Y); auto axisY = glm::normalize(Y);
@ -167,7 +167,7 @@ void BlocksRenderer::face(
float s = 0.5f; float s = 0.5f;
if (lights) { if (lights) {
float d = glm::dot(glm::normalize(Z), SUN_VECTOR); float d = glm::dot(glm::normalize(Z), SUN_VECTOR);
d = 0.8f + d * 0.2f; d = 0.7f + d * 0.3f;
tint *= d; tint *= d;
} }
vertex(coord + (-X - Y + Z) * s, region.u1, region.v1, tint); vertex(coord + (-X - Y + Z) * s, region.u1, region.v1, tint);