mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
improve shadows
This commit is contained in:
parent
44f7051a94
commit
ed5efd9c3a
5 changed files with 68 additions and 65 deletions
|
|
@ -203,21 +203,16 @@ void BlocksRenderer::blockXSprite(
|
|||
const float w = size.x / 1.41f;
|
||||
const glm::vec4 tint (0.8f);
|
||||
|
||||
glm::vec3 n;
|
||||
float bias = 0.05f;
|
||||
glm::vec3 n(0.0f, 1.0f, 0.0f);
|
||||
|
||||
n = glm::vec3(-0.7f, 0, -0.7f);
|
||||
face(glm::vec3(x + xs, y, z + zs) + n * bias, w, size.y, 0, {-1, 0, 1}, {0, 1, 0}, n,
|
||||
face({x + xs, y, z + zs}, w, size.y, 0, {-1, 0, 1}, {0, 1, 0}, n,
|
||||
texface1, lights2, tint);
|
||||
n = glm::vec3(-0.7f, 0, 0.7f);
|
||||
face(glm::vec3(x + xs, y, z + zs) + n * bias, w, size.y, 0, {1, 0, 1}, {0, 1, 0}, n,
|
||||
face({x + xs, y, z + zs}, w, size.y, 0, {1, 0, 1}, {0, 1, 0}, n,
|
||||
texface1, lights1, tint);
|
||||
|
||||
n = glm::vec3(0.7f, 0, -0.7f);
|
||||
face(glm::vec3(x + xs, y, z + zs) + n * bias, w, size.y, 0, {-1, 0, -1}, {0, 1, 0}, n,
|
||||
face({x + xs, y, z + zs}, w, size.y, 0, {-1, 0, -1}, {0, 1, 0}, n,
|
||||
texface2, lights2, tint);
|
||||
n = glm::vec3(0.7f, 0, 0.7f);
|
||||
face(glm::vec3(x + xs, y, z + zs) + n * bias, w, size.y, 0, {1, 0, -1}, {0, 1, 0}, n,
|
||||
face({x + xs, y, z + zs}, w, size.y, 0, {1, 0, -1}, {0, 1, 0}, n,
|
||||
texface2, lights1, tint);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue