From 14e6c959bdc142a0b403e9409293afa8fed3d672 Mon Sep 17 00:00:00 2001 From: MaxED <j.maxed@gmail.com> Date: Sun, 13 May 2012 20:51:41 +0000 Subject: [PATCH] GZDoomBuilder 1.05a: Fixed incorrect rendering of 3D-floors, masked and transparent surfaces introduced in 1.05... Additive transparent surfaces aren't affected by dynamic lights now (because they aren't affected in GZDoom). --- Source/Core/Rendering/Renderer3D.cs | 6 +++--- Source/Core/VisualModes/VisualGeometry.cs | 8 ++++---- .../Plugins/GZDoomEditing/VisualModes/BaseVisualSector.cs | 3 --- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Source/Core/Rendering/Renderer3D.cs b/Source/Core/Rendering/Renderer3D.cs index 3243c142e..e2c4e41e3 100644 --- a/Source/Core/Rendering/Renderer3D.cs +++ b/Source/Core/Rendering/Renderer3D.cs @@ -739,9 +739,9 @@ namespace CodeImp.DoomBuilder.Rendering { // Determine the shader pass we want to use for this object int wantedshaderpass = (((g == highlighted) && showhighlight) || (g.Selected && showselection)) ? highshaderpass : shaderpass; - - //mxd. Seems that translucent lines aren't affected by dynamic lights in GZDoom - if (g.RenderPass != RenderPass.Alpha && General.Settings.GZDrawLights && !fullbrightness && thingsWithLight.Count > 0) { + + //mxd. Seems that lines rendered with RenderPass.Alpha or RenderPass.Additive aren't affected by dynamic lights in GZDoom + if (g.RenderPass != RenderPass.Alpha && g.RenderPass != RenderPass.Additive && General.Settings.GZDrawLights && !fullbrightness && thingsWithLight.Count > 0) { if (curtexture.Texture != null) { if (!litGeometry.ContainsKey(curtexture.Texture)) litGeometry[curtexture.Texture] = new List<VisualGeometry>(); diff --git a/Source/Core/VisualModes/VisualGeometry.cs b/Source/Core/VisualModes/VisualGeometry.cs index ba57592ce..503784a57 100644 --- a/Source/Core/VisualModes/VisualGeometry.cs +++ b/Source/Core/VisualModes/VisualGeometry.cs @@ -203,10 +203,10 @@ namespace CodeImp.DoomBuilder.VisualModes pc.g = (byte)((float)pc.g * valMod); pc.b = (byte)((float)pc.b * valMod); - int colorRef = pc.ToColorRef(); - p1.c = colorRef; - p2.c = colorRef; - p3.c = colorRef; + int c = pc.ToInt(); + p1.c = c; + p2.c = c; + p3.c = c; } vertices[startIndex] = p1; vertices[startIndex + 1] = p2; diff --git a/Source/Plugins/GZDoomEditing/VisualModes/BaseVisualSector.cs b/Source/Plugins/GZDoomEditing/VisualModes/BaseVisualSector.cs index 4fa7f2bb0..78641833d 100644 --- a/Source/Plugins/GZDoomEditing/VisualModes/BaseVisualSector.cs +++ b/Source/Plugins/GZDoomEditing/VisualModes/BaseVisualSector.cs @@ -117,9 +117,6 @@ namespace CodeImp.DoomBuilder.GZDoomEditing // This updates this virtual the sector and neightbours if needed public void UpdateSectorGeometry(bool includeneighbours) { - //mxd dbg - GZBuilder.GZGeneral.Trace("UpdateSectorGeometry isupdating=" + isupdating); - if(isupdating) return; -- GitLab