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 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
|
||||
{
|
||||
|
||||
@@ -241,6 +241,32 @@ namespace OpenRA.Renderer.Sdl2
|
||||
GL.BlendFuncSeparate(BlendingFactorSrc.DstColor, BlendingFactorDest.Zero, BlendingFactorSrc.One, BlendingFactorDest.OneMinusSrcAlpha);
|
||||
ErrorHandler.CheckGlError();
|
||||
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();
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
explosion:
|
||||
Defaults:
|
||||
BlendMode: Additive
|
||||
piff: DATA.R8
|
||||
Start: 3626
|
||||
Length: 5
|
||||
@@ -6,64 +8,51 @@ explosion:
|
||||
Start: 3429
|
||||
Length: 4
|
||||
Tick: 80
|
||||
BlendMode: Additive
|
||||
small_explosion: DATA.R8
|
||||
Start: 3403
|
||||
Length: 15
|
||||
BlendMode: Additive
|
||||
med_explosion: DATA.R8
|
||||
Start: 3390
|
||||
Length: 12
|
||||
BlendMode: Additive
|
||||
tiny_explosion: DATA.R8
|
||||
Start: 3386
|
||||
Length: 4
|
||||
Tick: 80
|
||||
BlendMode: Additive
|
||||
nuke: DATA.R8
|
||||
Start: 3965
|
||||
Length: 14
|
||||
Tick: 60
|
||||
BlendMode: Additive
|
||||
mini_explosion: DATA.R8
|
||||
Start: 3403
|
||||
Length: 15
|
||||
Tick: 60
|
||||
BlendMode: Additive
|
||||
self_destruct: DATA.R8
|
||||
Start: 3433
|
||||
Length: 15
|
||||
BlendMode: Additive
|
||||
building: DATA.R8
|
||||
Start: 3448
|
||||
Length: 22
|
||||
BlendMode: Additive
|
||||
large_explosion: DATA.R8
|
||||
Start: 3988
|
||||
Length: 22
|
||||
BlendMode: Additive
|
||||
artillery: DATA.R8
|
||||
Start: 3988
|
||||
Length: 22
|
||||
BlendMode: Additive
|
||||
small_artillery: DATA.R8
|
||||
Start: 3390
|
||||
Length: 12
|
||||
Tick: 60
|
||||
BlendMode: Additive
|
||||
small_napalm: DATA.R8
|
||||
Start: 3421
|
||||
Length: 8
|
||||
BlendMode: Additive
|
||||
shockwave: DATA.R8
|
||||
Start: 3687
|
||||
Length: 6
|
||||
BlendMode: Additive
|
||||
Tick: 120
|
||||
deviator: DATA.R8
|
||||
Start: 3512
|
||||
Length: 23
|
||||
BlendMode: Additive
|
||||
BlendMode: SoftAdditive
|
||||
Tick: 80
|
||||
corpse: DATA.R8
|
||||
Start: 430
|
||||
@@ -82,35 +71,35 @@ small_trail:
|
||||
Start: 3735
|
||||
Length: 4
|
||||
Tick: 80
|
||||
BlendMode: Additive
|
||||
BlendMode: SoftAdditive
|
||||
|
||||
small_trail2:
|
||||
idle: DATA.R8
|
||||
Start: 3540
|
||||
Length: 4
|
||||
Tick: 80
|
||||
BlendMode: Additive
|
||||
BlendMode: SoftAdditive
|
||||
|
||||
bazooka_trail:
|
||||
idle: DATA.R8
|
||||
Start: 3381
|
||||
Length: 4
|
||||
Tick: 80
|
||||
BlendMode: Additive
|
||||
BlendMode: Translucency75
|
||||
|
||||
bazooka_trail2:
|
||||
idle: DATA.R8
|
||||
Start: 3544
|
||||
Length: 4
|
||||
Tick: 80
|
||||
BlendMode: Additive
|
||||
BlendMode: Translucency75
|
||||
|
||||
deviator_trail:
|
||||
idle: DATA.R8
|
||||
Start: 3535
|
||||
Length: 5
|
||||
Tick: 80
|
||||
BlendMode: Additive
|
||||
BlendMode: SoftAdditive
|
||||
|
||||
laserfire:
|
||||
idle: DATA.R8
|
||||
|
||||
@@ -240,17 +240,14 @@ TowerMissile:
|
||||
Burst: 2
|
||||
BurstDelay: 15
|
||||
Projectile: Bullet
|
||||
Arm: 0
|
||||
Blockable: false
|
||||
Shadow: yes
|
||||
Inaccuracy: 384
|
||||
Image: MISSILE2
|
||||
RateOfTurn: 10
|
||||
Trail: large_trail
|
||||
TrailInterval: 1
|
||||
Speed: 256
|
||||
RangeLimit: 50
|
||||
Angle: 110
|
||||
Speed: 298
|
||||
Angle: 90
|
||||
Warhead@1Dam: SpreadDamage
|
||||
Spread: 384
|
||||
Damage: 50
|
||||
@@ -345,14 +342,12 @@ DevBullet:
|
||||
Report: MISSLE1.WAV
|
||||
ValidTargets: Ground
|
||||
Projectile: Bullet
|
||||
Speed: 358
|
||||
Arm: 5
|
||||
Speed: 320
|
||||
Blockable: false
|
||||
Shadow: yes
|
||||
Inaccuracy: 1c416
|
||||
Angle: 110
|
||||
Angle: 90
|
||||
Image: MISSILE2
|
||||
RateOfTurn: 5
|
||||
Trail: large_trail
|
||||
TrailInterval: 1
|
||||
Warhead@1Dam: SpreadDamage
|
||||
@@ -378,10 +373,10 @@ NerveGasMissile:
|
||||
Burst: 1
|
||||
Report: MISSLE1.WAV
|
||||
Projectile: Bullet
|
||||
Speed: 448
|
||||
Speed: 384
|
||||
Blockable: false
|
||||
Shadow: yes
|
||||
Angle: 110
|
||||
Angle: 90
|
||||
Inaccuracy: 1c96
|
||||
Image: MISSILE
|
||||
Trail: deviator_trail
|
||||
|
||||
@@ -106,8 +106,11 @@ explosion:
|
||||
Length: *
|
||||
building: twlt070
|
||||
ionring: ring1
|
||||
BlendMode: SoftAdditive
|
||||
Tick: 120
|
||||
pulse_explosion: pulsefx2
|
||||
BlendMode: Additive
|
||||
BlendMode: SoftAdditive
|
||||
Tick: 80
|
||||
small_watersplash: h2o_exp2
|
||||
large_watersplash: h2o_exp1
|
||||
water_piff: w_piff
|
||||
|
||||
Reference in New Issue
Block a user