mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
add Lightmap::extractNormalized
This commit is contained in:
parent
4417eb7685
commit
54d1398d1b
4 changed files with 16 additions and 4 deletions
|
|
@ -452,10 +452,7 @@ glm::vec4 BlocksRenderer::pickLight(int x, int y, int z) const {
|
|||
if (isOpenForLight(x, y, z)) {
|
||||
light_t light = voxelsBuffer->pickLight(chunk->x * CHUNK_W + x, y,
|
||||
chunk->z * CHUNK_D + z);
|
||||
return glm::vec4(Lightmap::extract(light, 0),
|
||||
Lightmap::extract(light, 1),
|
||||
Lightmap::extract(light, 2),
|
||||
Lightmap::extract(light, 3)) / 15.0f;
|
||||
return Lightmap::extractNormalized(light);
|
||||
} else {
|
||||
return glm::vec4(0.0f);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue