Cull backface of slabs

This commit is contained in:
Wuzzy 2024-08-10 09:37:33 +02:00
parent d868461287
commit 7fe94a02ac

View File

@ -119,6 +119,11 @@ function stairs.register_slab(subname, recipeitem, groups, images, description,
-- Use first tile only, for slab mesh
local slab_images = table.copy(images)
if type(slab_images[1]) == "string" then
-- Add backface culling because otherwise z-fighting occurs when
-- inside the node
slab_images[1] = { name = slab_images[1], backface_culling = true }
end
if not slab_images[2] then
slab_images[2] = slab_images[1]
end