add Lightmap::extractNormalized

This commit is contained in:
MihailRis 2025-12-20 23:26:50 +03:00
parent 4417eb7685
commit 54d1398d1b
4 changed files with 16 additions and 4 deletions

View file

@ -100,6 +100,10 @@ bool Chunks::isObstacleBlock(int32_t x, int32_t y, int32_t z) {
return indices.blocks.require(v->id).obstacle;
}
ubyte Chunks::getLight(const glm::ivec3& pos) const {
return getLight(pos.x, pos.y, pos.z);
}
ubyte Chunks::getLight(int32_t x, int32_t y, int32_t z, int channel) const {
if (y < 0 || y >= CHUNK_H) {
return 0;