diff --git a/project/code/TMV/Mission.cs b/project/code/TMV/Mission.cs index ec230c5..f903bcd 100644 --- a/project/code/TMV/Mission.cs +++ b/project/code/TMV/Mission.cs @@ -284,7 +284,8 @@ public partial class Mission : Node3D { var overrideMat = new StandardMaterial3D { - AlbedoTexture = TextureLoader.LoadTexture(path) + AlbedoTexture = TextureLoader.LoadTexture(path), + Transparency = BaseMaterial3D.TransparencyEnum.AlphaDepthPrePass, }; var surfaceCount = model.Mesh.GetSurfaceCount(); diff --git a/project/code/TMV/ModelLoader.cs b/project/code/TMV/ModelLoader.cs index 4de1cc2..edae4c0 100644 --- a/project/code/TMV/ModelLoader.cs +++ b/project/code/TMV/ModelLoader.cs @@ -65,7 +65,8 @@ public class ModelLoader var mat = new StandardMaterial3D { - AlbedoTexture = TextureLoader.LoadTexture(path) + AlbedoTexture = TextureLoader.LoadTexture(path), + Transparency = BaseMaterial3D.TransparencyEnum.AlphaDepthPrePass, }; var name = material.Name.ToLower(); for (var i = 0; i < 4; i++) diff --git a/project/code/TMV/TextureLoader.Gif.cs b/project/code/TMV/TextureLoader.Gif.cs index 85deeb8..33dc1d1 100644 --- a/project/code/TMV/TextureLoader.Gif.cs +++ b/project/code/TMV/TextureLoader.Gif.cs @@ -6,6 +6,7 @@ namespace KeepersCompound.TMV; public partial class TextureLoader { // TODO: Replace this with my own implementation lol + // TODO: Alpha!? // References: // - https://www.w3.org/Graphics/GIF/spec-gif89a.txt private static ImageTexture LoadGif(string path) diff --git a/project/code/TMV/TextureLoader.Pcx.cs b/project/code/TMV/TextureLoader.Pcx.cs index fa9c9e5..abcc84f 100644 --- a/project/code/TMV/TextureLoader.Pcx.cs +++ b/project/code/TMV/TextureLoader.Pcx.cs @@ -38,7 +38,8 @@ public partial class TextureLoader var r = reader.ReadByte() / 255.0f; var g = reader.ReadByte() / 255.0f; var b = reader.ReadByte() / 255.0f; - palette[i] = new Color(r, g, b); + var a = (i == 0) ? 0.0f : 1.0f; + palette[i] = new Color(r, g, b, a); } }