mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Grass rendering behing water fix
This commit is contained in:
parent
805f203f22
commit
ff0e617732
4 changed files with 18 additions and 10 deletions
|
|
@ -317,12 +317,12 @@ vec4 BlocksRenderer::pickSoftLight(int x, int y, int z, const ivec3& right, cons
|
|||
void BlocksRenderer::render(const voxel* voxels, int atlas_size) {
|
||||
int begin = chunk->bottom * (CHUNK_W * CHUNK_D);
|
||||
int end = chunk->top * (CHUNK_W * CHUNK_D);
|
||||
for (ubyte group = 0; group < 8; group++) {
|
||||
for (const auto drawGroup : *content->drawGroups) {
|
||||
for (int i = begin; i < end; i++) {
|
||||
const voxel& vox = voxels[i];
|
||||
blockid_t id = vox.id;
|
||||
const Block& def = *blockDefsCache[id];
|
||||
if (!id || def.drawGroup != group)
|
||||
if (!id || def.drawGroup != drawGroup)
|
||||
continue;
|
||||
const UVRegion texfaces[6]{ cache->getRegion(id, 0), cache->getRegion(id, 1),
|
||||
cache->getRegion(id, 2), cache->getRegion(id, 3),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue