mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
fix AABB bounds for opaque custom block models
This commit is contained in:
parent
4dc1fdbe05
commit
1bea18294f
1 changed files with 5 additions and 1 deletions
|
|
@ -389,14 +389,18 @@ void BlocksRenderer::blockCustomModel(
|
|||
vcoord.z * Z + r * 0.5f + t * 0.5f + n * 0.5f;
|
||||
aoColor = pickSoftLight(p.x, p.y, p.z, glm::ivec3(r), glm::ivec3(t));
|
||||
}
|
||||
auto pLocal = coord + vcoord.x * X + vcoord.y * Y + vcoord.z * Z;
|
||||
this->vertex(
|
||||
coord + vcoord.x * X + vcoord.y * Y + vcoord.z * Z,
|
||||
pLocal,
|
||||
vertex.uv.x,
|
||||
vertex.uv.y,
|
||||
mesh.shading ? (glm::vec4(d, d, d, d) * aoColor) : glm::vec4(1, 1, 1, d),
|
||||
n,
|
||||
mesh.shading ? 0.0f : 1.0
|
||||
);
|
||||
if (!densePass) {
|
||||
expand_aabb(localAabb, localAabbInit, pLocal);
|
||||
}
|
||||
indexBuffer[indexCount++] = vertexOffset++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue