From 251c7bd098394a247765b54b148a7f8e895b37e2 Mon Sep 17 00:00:00 2001 From: Lyuu17 Date: Sun, 16 Jun 2024 00:52:02 +0200 Subject: [PATCH] Temp fix for leaves --- src/SWBF2/Level.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/SWBF2/Level.cpp b/src/SWBF2/Level.cpp index f45f1e2..9d9d8c0 100644 --- a/src/SWBF2/Level.cpp +++ b/src/SWBF2/Level.cpp @@ -83,6 +83,10 @@ namespace SWBF2 material->set_texture(godot::BaseMaterial3D::TEXTURE_NORMAL, bumpTexture); } + // TODO: fix leaves transparency? + if (mainTextureName == "leaves") + material->set_transparency(godot::BaseMaterial3D::TRANSPARENCY_ALPHA_SCISSOR); + if (segment.m_material.m_flags & Native::Material::MATERIAL_TRANSPARENT) material->set_transparency(godot::BaseMaterial3D::TRANSPARENCY_ALPHA);