Merge pull request #7853 from Mailaender/alpha-experiments
Added AlphaImage support
This commit is contained in:
@@ -44,7 +44,9 @@ namespace OpenRA
|
||||
SoftAdditive,
|
||||
Translucency25,
|
||||
Translucency50,
|
||||
Translucency75
|
||||
Translucency75,
|
||||
Multiplicative,
|
||||
DoubleMultiplicative
|
||||
}
|
||||
|
||||
public interface IGraphicsDevice : IDisposable
|
||||
|
||||
@@ -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();
|
||||
|
||||
BIN
mods/ts/bits/alpha.pal
Normal file
BIN
mods/ts/bits/alpha.pal
Normal file
Binary file not shown.
BIN
mods/ts/bits/alphatst.shp
Normal file
BIN
mods/ts/bits/alphatst.shp
Normal file
Binary file not shown.
@@ -1270,10 +1270,14 @@ GALITE:
|
||||
Range: 2c0
|
||||
Power:
|
||||
Amount: 0
|
||||
# WithIdleOverlay@LIGHTING:
|
||||
# Sequence: lighting
|
||||
WithIdleOverlay@LIGHTING:
|
||||
Sequence: lighting
|
||||
Palette: alpha
|
||||
Selectable:
|
||||
Bounds: 25, 35, 0, -12
|
||||
Buildable:
|
||||
Queue: Defense
|
||||
Prerequisites: ~disabled
|
||||
|
||||
GAICBM:
|
||||
Inherits: ^Building
|
||||
|
||||
@@ -45,6 +45,9 @@ World:
|
||||
Filename: unittem.pal
|
||||
AllowModifiers: false
|
||||
ShadowIndex: 1
|
||||
PaletteFromFile@alpha:
|
||||
Name: alpha
|
||||
Filename: alpha.pal
|
||||
PaletteFromRGBA@shadow:
|
||||
Name: shadow
|
||||
R: 0
|
||||
|
||||
@@ -690,9 +690,12 @@ galite:
|
||||
damaged-idle: gtlite
|
||||
Start: 1
|
||||
ShadowStart: 3
|
||||
# lighting: alphatst
|
||||
# ZOffset: -1c511
|
||||
# BlendMode: Alpha
|
||||
lighting: alphatst
|
||||
BlendMode: DoubleMultiplicative
|
||||
UseTilesetCode: false
|
||||
icon: liteicon
|
||||
Offset: 0, 0
|
||||
UseTilesetCode: false
|
||||
|
||||
namntk:
|
||||
idle: ntmntk
|
||||
|
||||
Reference in New Issue
Block a user