mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 15:01:49 +00:00
small lights update
This commit is contained in:
parent
5d7c4d1e38
commit
9c3052ecd0
1 changed files with 2 additions and 2 deletions
|
|
@ -128,7 +128,7 @@ void BlocksRenderer::face(const vec3& coord,
|
||||||
float s = 0.5f;
|
float s = 0.5f;
|
||||||
if (lights) {
|
if (lights) {
|
||||||
float d = glm::dot(Z, SUN_VECTOR);
|
float d = glm::dot(Z, SUN_VECTOR);
|
||||||
d = 0.7f + d * 0.3f;
|
d = 0.8f + d * 0.2f;
|
||||||
|
|
||||||
vec4 tint(d);
|
vec4 tint(d);
|
||||||
vertex(coord + (-X - Y + Z) * s, region.u1, region.v1, tint, X, Y, Z);
|
vertex(coord + (-X - Y + Z) * s, region.u1, region.v1, tint, X, Y, Z);
|
||||||
|
|
@ -164,7 +164,7 @@ void BlocksRenderer::tetragonicFace(const vec3& coord, const vec3& p1,
|
||||||
vec3 normal = glm::normalize(dir);
|
vec3 normal = glm::normalize(dir);
|
||||||
|
|
||||||
float d = glm::dot(normal, SUN_VECTOR);
|
float d = glm::dot(normal, SUN_VECTOR);
|
||||||
d = 0.7f + d * 0.3f;
|
d = 0.8f + d * 0.2f;
|
||||||
tint *= d;
|
tint *= d;
|
||||||
tint *= pickLight(coord);
|
tint *= pickLight(coord);
|
||||||
// debug normal
|
// debug normal
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue