From e1ee0bd1381d6b66736fc9ba8b84f369a2e9b6c0 Mon Sep 17 00:00:00 2001 From: sphere Date: Fri, 19 Nov 2021 18:56:55 +0100 Subject: [PATCH] Reverse subtractive and reverse subtractive. --- Source/Core/IO/SRB2MapSetIO.cs | 3 ++- Source/Core/Rendering/Renderer3D.cs | 18 +++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Source/Core/IO/SRB2MapSetIO.cs b/Source/Core/IO/SRB2MapSetIO.cs index aacb302..97bfef5 100644 --- a/Source/Core/IO/SRB2MapSetIO.cs +++ b/Source/Core/IO/SRB2MapSetIO.cs @@ -77,7 +77,8 @@ namespace CodeImp.DoomBuilder.IO { 936, 0.4f }, { 937, 0.3f }, { 938, 0.2f }, - { 939, 0.1f } + { 939, 0.1f }, + { 940, 0.5f } // modulate, placeholder value }; startTypes = new List() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 }; diff --git a/Source/Core/Rendering/Renderer3D.cs b/Source/Core/Rendering/Renderer3D.cs index 6d2407c..1cb9e59 100644 --- a/Source/Core/Rendering/Renderer3D.cs +++ b/Source/Core/Rendering/Renderer3D.cs @@ -994,14 +994,14 @@ namespace CodeImp.DoomBuilder.Rendering break; case RenderPass.Subtractive: - graphics.Device.SetRenderState(RenderState.BlendOperation, BlendOperation.ReverseSubtract); + graphics.Device.SetRenderState(RenderState.BlendOperation, BlendOperation.Subtract); graphics.Device.SetRenderState(RenderState.SourceBlend, Blend.SourceAlpha); graphics.Device.SetRenderState(RenderState.DestinationBlend, Blend.One); break; case RenderPass.ReverseSubtractive: - graphics.Device.SetRenderState(RenderState.BlendOperation, BlendOperation.Subtract); - graphics.Device.SetRenderState(RenderState.SourceBlend, Blend.InverseSourceAlpha); + graphics.Device.SetRenderState(RenderState.BlendOperation, BlendOperation.ReverseSubtract); + graphics.Device.SetRenderState(RenderState.SourceBlend, Blend.SourceAlpha); graphics.Device.SetRenderState(RenderState.DestinationBlend, Blend.One); break; @@ -1139,14 +1139,14 @@ namespace CodeImp.DoomBuilder.Rendering break; case RenderPass.Subtractive: - graphics.Device.SetRenderState(RenderState.BlendOperation, BlendOperation.ReverseSubtract); + graphics.Device.SetRenderState(RenderState.BlendOperation, BlendOperation.Subtract); graphics.Device.SetRenderState(RenderState.SourceBlend, Blend.SourceAlpha); graphics.Device.SetRenderState(RenderState.DestinationBlend, Blend.One); break; case RenderPass.ReverseSubtractive: - graphics.Device.SetRenderState(RenderState.BlendOperation, BlendOperation.Subtract); - graphics.Device.SetRenderState(RenderState.SourceBlend, Blend.InverseSourceAlpha); + graphics.Device.SetRenderState(RenderState.BlendOperation, BlendOperation.ReverseSubtract); + graphics.Device.SetRenderState(RenderState.SourceBlend, Blend.SourceAlpha); graphics.Device.SetRenderState(RenderState.DestinationBlend, Blend.One); break; @@ -1521,14 +1521,14 @@ namespace CodeImp.DoomBuilder.Rendering break; case RenderPass.Subtractive: - graphics.Device.SetRenderState(RenderState.BlendOperation, BlendOperation.ReverseSubtract); + graphics.Device.SetRenderState(RenderState.BlendOperation, BlendOperation.Subtract); graphics.Device.SetRenderState(RenderState.SourceBlend, Blend.SourceAlpha); graphics.Device.SetRenderState(RenderState.DestinationBlend, Blend.One); break; case RenderPass.ReverseSubtractive: - graphics.Device.SetRenderState(RenderState.BlendOperation, BlendOperation.Subtract); - graphics.Device.SetRenderState(RenderState.SourceBlend, Blend.InverseSourceAlpha); + graphics.Device.SetRenderState(RenderState.BlendOperation, BlendOperation.ReverseSubtract); + graphics.Device.SetRenderState(RenderState.SourceBlend, Blend.SourceAlpha); graphics.Device.SetRenderState(RenderState.DestinationBlend, Blend.One); break;