diff --git a/OpenRA.Game/Graphics/IGraphicsDevice.cs b/OpenRA.Game/Graphics/IGraphicsDevice.cs index fcb356aad0..2fdafe30d2 100755 --- a/OpenRA.Game/Graphics/IGraphicsDevice.cs +++ b/OpenRA.Game/Graphics/IGraphicsDevice.cs @@ -44,7 +44,9 @@ namespace OpenRA SoftAdditive, Translucency25, Translucency50, - Translucency75 + Translucency75, + Multiplicative, + DoubleMultiplicative } public interface IGraphicsDevice : IDisposable diff --git a/OpenRA.Renderer.Sdl2/Sdl2GraphicsDevice.cs b/OpenRA.Renderer.Sdl2/Sdl2GraphicsDevice.cs index 2c866d194f..a5b749aa23 100755 --- a/OpenRA.Renderer.Sdl2/Sdl2GraphicsDevice.cs +++ b/OpenRA.Renderer.Sdl2/Sdl2GraphicsDevice.cs @@ -267,6 +267,16 @@ namespace OpenRA.Renderer.Sdl2 ErrorHandler.CheckGlError(); GL.BlendColor(1f, 1f, 1f, 0.75f); break; + case BlendMode.Multiplicative: + GL.Enable(EnableCap.Blend); + ErrorHandler.CheckGlError(); + GL.BlendFunc(BlendingFactorSrc.Zero, BlendingFactorDest.SrcColor); + break; + case BlendMode.DoubleMultiplicative: + GL.Enable(EnableCap.Blend); + ErrorHandler.CheckGlError(); + GL.BlendFunc(BlendingFactorSrc.DstColor, BlendingFactorDest.SrcColor); + break; } ErrorHandler.CheckGlError();