Merge pull request #7811 from reaperrr/new-blendmodes1
Added two new BlendModes
This commit is contained in:
@@ -34,7 +34,18 @@ namespace OpenRA
|
|||||||
|
|
||||||
public interface IHardwareCursor : IDisposable { }
|
public interface IHardwareCursor : IDisposable { }
|
||||||
|
|
||||||
public enum BlendMode : byte { None, Alpha, Additive, Subtractive, Multiply }
|
public enum BlendMode : byte
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
Alpha,
|
||||||
|
Additive,
|
||||||
|
Subtractive,
|
||||||
|
Multiply,
|
||||||
|
SoftAdditive,
|
||||||
|
Translucency25,
|
||||||
|
Translucency50,
|
||||||
|
Translucency75
|
||||||
|
}
|
||||||
|
|
||||||
public interface IGraphicsDevice : IDisposable
|
public interface IGraphicsDevice : IDisposable
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -241,6 +241,32 @@ namespace OpenRA.Renderer.Sdl2
|
|||||||
GL.BlendFuncSeparate(BlendingFactorSrc.DstColor, BlendingFactorDest.Zero, BlendingFactorSrc.One, BlendingFactorDest.OneMinusSrcAlpha);
|
GL.BlendFuncSeparate(BlendingFactorSrc.DstColor, BlendingFactorDest.Zero, BlendingFactorSrc.One, BlendingFactorDest.OneMinusSrcAlpha);
|
||||||
ErrorHandler.CheckGlError();
|
ErrorHandler.CheckGlError();
|
||||||
break;
|
break;
|
||||||
|
case BlendMode.SoftAdditive:
|
||||||
|
GL.Enable(EnableCap.Blend);
|
||||||
|
ErrorHandler.CheckGlError();
|
||||||
|
GL.BlendFunc(BlendingFactorSrc.OneMinusDstColor, BlendingFactorDest.One);
|
||||||
|
break;
|
||||||
|
case BlendMode.Translucency25:
|
||||||
|
GL.Enable(EnableCap.Blend);
|
||||||
|
ErrorHandler.CheckGlError();
|
||||||
|
GL.BlendFunc(BlendingFactorSrc.OneMinusConstantAlpha, BlendingFactorDest.One);
|
||||||
|
ErrorHandler.CheckGlError();
|
||||||
|
GL.BlendColor(1f, 1f, 1f, 0.25f);
|
||||||
|
break;
|
||||||
|
case BlendMode.Translucency50:
|
||||||
|
GL.Enable(EnableCap.Blend);
|
||||||
|
ErrorHandler.CheckGlError();
|
||||||
|
GL.BlendFunc(BlendingFactorSrc.OneMinusConstantAlpha, BlendingFactorDest.One);
|
||||||
|
ErrorHandler.CheckGlError();
|
||||||
|
GL.BlendColor(1f, 1f, 1f, 0.5f);
|
||||||
|
break;
|
||||||
|
case BlendMode.Translucency75:
|
||||||
|
GL.Enable(EnableCap.Blend);
|
||||||
|
ErrorHandler.CheckGlError();
|
||||||
|
GL.BlendFunc(BlendingFactorSrc.OneMinusConstantAlpha, BlendingFactorDest.One);
|
||||||
|
ErrorHandler.CheckGlError();
|
||||||
|
GL.BlendColor(1f, 1f, 1f, 0.75f);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorHandler.CheckGlError();
|
ErrorHandler.CheckGlError();
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
explosion:
|
explosion:
|
||||||
|
Defaults:
|
||||||
|
BlendMode: Additive
|
||||||
piff: DATA.R8
|
piff: DATA.R8
|
||||||
Start: 3626
|
Start: 3626
|
||||||
Length: 5
|
Length: 5
|
||||||
@@ -6,64 +8,51 @@ explosion:
|
|||||||
Start: 3429
|
Start: 3429
|
||||||
Length: 4
|
Length: 4
|
||||||
Tick: 80
|
Tick: 80
|
||||||
BlendMode: Additive
|
|
||||||
small_explosion: DATA.R8
|
small_explosion: DATA.R8
|
||||||
Start: 3403
|
Start: 3403
|
||||||
Length: 15
|
Length: 15
|
||||||
BlendMode: Additive
|
|
||||||
med_explosion: DATA.R8
|
med_explosion: DATA.R8
|
||||||
Start: 3390
|
Start: 3390
|
||||||
Length: 12
|
Length: 12
|
||||||
BlendMode: Additive
|
|
||||||
tiny_explosion: DATA.R8
|
tiny_explosion: DATA.R8
|
||||||
Start: 3386
|
Start: 3386
|
||||||
Length: 4
|
Length: 4
|
||||||
Tick: 80
|
Tick: 80
|
||||||
BlendMode: Additive
|
|
||||||
nuke: DATA.R8
|
nuke: DATA.R8
|
||||||
Start: 3965
|
Start: 3965
|
||||||
Length: 14
|
Length: 14
|
||||||
Tick: 60
|
Tick: 60
|
||||||
BlendMode: Additive
|
|
||||||
mini_explosion: DATA.R8
|
mini_explosion: DATA.R8
|
||||||
Start: 3403
|
Start: 3403
|
||||||
Length: 15
|
Length: 15
|
||||||
Tick: 60
|
Tick: 60
|
||||||
BlendMode: Additive
|
|
||||||
self_destruct: DATA.R8
|
self_destruct: DATA.R8
|
||||||
Start: 3433
|
Start: 3433
|
||||||
Length: 15
|
Length: 15
|
||||||
BlendMode: Additive
|
|
||||||
building: DATA.R8
|
building: DATA.R8
|
||||||
Start: 3448
|
Start: 3448
|
||||||
Length: 22
|
Length: 22
|
||||||
BlendMode: Additive
|
|
||||||
large_explosion: DATA.R8
|
large_explosion: DATA.R8
|
||||||
Start: 3988
|
Start: 3988
|
||||||
Length: 22
|
Length: 22
|
||||||
BlendMode: Additive
|
|
||||||
artillery: DATA.R8
|
artillery: DATA.R8
|
||||||
Start: 3988
|
Start: 3988
|
||||||
Length: 22
|
Length: 22
|
||||||
BlendMode: Additive
|
|
||||||
small_artillery: DATA.R8
|
small_artillery: DATA.R8
|
||||||
Start: 3390
|
Start: 3390
|
||||||
Length: 12
|
Length: 12
|
||||||
Tick: 60
|
Tick: 60
|
||||||
BlendMode: Additive
|
|
||||||
small_napalm: DATA.R8
|
small_napalm: DATA.R8
|
||||||
Start: 3421
|
Start: 3421
|
||||||
Length: 8
|
Length: 8
|
||||||
BlendMode: Additive
|
|
||||||
shockwave: DATA.R8
|
shockwave: DATA.R8
|
||||||
Start: 3687
|
Start: 3687
|
||||||
Length: 6
|
Length: 6
|
||||||
BlendMode: Additive
|
|
||||||
Tick: 120
|
Tick: 120
|
||||||
deviator: DATA.R8
|
deviator: DATA.R8
|
||||||
Start: 3512
|
Start: 3512
|
||||||
Length: 23
|
Length: 23
|
||||||
BlendMode: Additive
|
BlendMode: SoftAdditive
|
||||||
Tick: 80
|
Tick: 80
|
||||||
corpse: DATA.R8
|
corpse: DATA.R8
|
||||||
Start: 430
|
Start: 430
|
||||||
@@ -82,35 +71,35 @@ small_trail:
|
|||||||
Start: 3735
|
Start: 3735
|
||||||
Length: 4
|
Length: 4
|
||||||
Tick: 80
|
Tick: 80
|
||||||
BlendMode: Additive
|
BlendMode: SoftAdditive
|
||||||
|
|
||||||
small_trail2:
|
small_trail2:
|
||||||
idle: DATA.R8
|
idle: DATA.R8
|
||||||
Start: 3540
|
Start: 3540
|
||||||
Length: 4
|
Length: 4
|
||||||
Tick: 80
|
Tick: 80
|
||||||
BlendMode: Additive
|
BlendMode: SoftAdditive
|
||||||
|
|
||||||
bazooka_trail:
|
bazooka_trail:
|
||||||
idle: DATA.R8
|
idle: DATA.R8
|
||||||
Start: 3381
|
Start: 3381
|
||||||
Length: 4
|
Length: 4
|
||||||
Tick: 80
|
Tick: 80
|
||||||
BlendMode: Additive
|
BlendMode: Translucency75
|
||||||
|
|
||||||
bazooka_trail2:
|
bazooka_trail2:
|
||||||
idle: DATA.R8
|
idle: DATA.R8
|
||||||
Start: 3544
|
Start: 3544
|
||||||
Length: 4
|
Length: 4
|
||||||
Tick: 80
|
Tick: 80
|
||||||
BlendMode: Additive
|
BlendMode: Translucency75
|
||||||
|
|
||||||
deviator_trail:
|
deviator_trail:
|
||||||
idle: DATA.R8
|
idle: DATA.R8
|
||||||
Start: 3535
|
Start: 3535
|
||||||
Length: 5
|
Length: 5
|
||||||
Tick: 80
|
Tick: 80
|
||||||
BlendMode: Additive
|
BlendMode: SoftAdditive
|
||||||
|
|
||||||
laserfire:
|
laserfire:
|
||||||
idle: DATA.R8
|
idle: DATA.R8
|
||||||
|
|||||||
@@ -240,17 +240,14 @@ TowerMissile:
|
|||||||
Burst: 2
|
Burst: 2
|
||||||
BurstDelay: 15
|
BurstDelay: 15
|
||||||
Projectile: Bullet
|
Projectile: Bullet
|
||||||
Arm: 0
|
|
||||||
Blockable: false
|
Blockable: false
|
||||||
Shadow: yes
|
Shadow: yes
|
||||||
Inaccuracy: 384
|
Inaccuracy: 384
|
||||||
Image: MISSILE2
|
Image: MISSILE2
|
||||||
RateOfTurn: 10
|
|
||||||
Trail: large_trail
|
Trail: large_trail
|
||||||
TrailInterval: 1
|
TrailInterval: 1
|
||||||
Speed: 256
|
Speed: 298
|
||||||
RangeLimit: 50
|
Angle: 90
|
||||||
Angle: 110
|
|
||||||
Warhead@1Dam: SpreadDamage
|
Warhead@1Dam: SpreadDamage
|
||||||
Spread: 384
|
Spread: 384
|
||||||
Damage: 50
|
Damage: 50
|
||||||
@@ -345,14 +342,12 @@ DevBullet:
|
|||||||
Report: MISSLE1.WAV
|
Report: MISSLE1.WAV
|
||||||
ValidTargets: Ground
|
ValidTargets: Ground
|
||||||
Projectile: Bullet
|
Projectile: Bullet
|
||||||
Speed: 358
|
Speed: 320
|
||||||
Arm: 5
|
|
||||||
Blockable: false
|
Blockable: false
|
||||||
Shadow: yes
|
Shadow: yes
|
||||||
Inaccuracy: 1c416
|
Inaccuracy: 1c416
|
||||||
Angle: 110
|
Angle: 90
|
||||||
Image: MISSILE2
|
Image: MISSILE2
|
||||||
RateOfTurn: 5
|
|
||||||
Trail: large_trail
|
Trail: large_trail
|
||||||
TrailInterval: 1
|
TrailInterval: 1
|
||||||
Warhead@1Dam: SpreadDamage
|
Warhead@1Dam: SpreadDamage
|
||||||
@@ -378,10 +373,10 @@ NerveGasMissile:
|
|||||||
Burst: 1
|
Burst: 1
|
||||||
Report: MISSLE1.WAV
|
Report: MISSLE1.WAV
|
||||||
Projectile: Bullet
|
Projectile: Bullet
|
||||||
Speed: 448
|
Speed: 384
|
||||||
Blockable: false
|
Blockable: false
|
||||||
Shadow: yes
|
Shadow: yes
|
||||||
Angle: 110
|
Angle: 90
|
||||||
Inaccuracy: 1c96
|
Inaccuracy: 1c96
|
||||||
Image: MISSILE
|
Image: MISSILE
|
||||||
Trail: deviator_trail
|
Trail: deviator_trail
|
||||||
|
|||||||
@@ -106,8 +106,11 @@ explosion:
|
|||||||
Length: *
|
Length: *
|
||||||
building: twlt070
|
building: twlt070
|
||||||
ionring: ring1
|
ionring: ring1
|
||||||
|
BlendMode: SoftAdditive
|
||||||
|
Tick: 120
|
||||||
pulse_explosion: pulsefx2
|
pulse_explosion: pulsefx2
|
||||||
BlendMode: Additive
|
BlendMode: SoftAdditive
|
||||||
|
Tick: 80
|
||||||
small_watersplash: h2o_exp2
|
small_watersplash: h2o_exp2
|
||||||
large_watersplash: h2o_exp1
|
large_watersplash: h2o_exp1
|
||||||
water_piff: w_piff
|
water_piff: w_piff
|
||||||
|
|||||||
Reference in New Issue
Block a user