Blentran - updated
Bringing back toaster's excellent work from !1534 (closed), updated to use current next
as a base. Makes additional blending modes (additive, subtractive, reverse subtractive, modulative) more accessible, and adds a few extras as well.
More detailed information:
- New frame flags for objects:
-
FF_ADD
,FF_SUBTRACT
,FF_REVERSESUBTRACT
andFF_MODULATE
for the new blending modes. The first three work withFF_TRANS10
toFF_TRANS90
for varying intensity. -
FF_SEMIBRIGHT
, which makes sprites get drawn between full brightness and sector brightness. -
FF_FLOORSPRITE
is also added to make floorsprites/splats easier to access, similarly toFF_PAPERSPRITE
.
-
- Blending modes can now be used by translucent FOFs. In the binary map format, this is done by adding an optional number to the upper texture field, which was previously only used for alpha:
- Formatted as #AAAB, where AAA is the alpha value (like before) and B is an optional blending mode.
- #1281 sets additive blending at 50% strength.
- #1282 sets subtractive blending at 50% strength.
- #1283 sets reverse subtractive blending at 50% strength.
- #1284 sets modulative blending. Any alpha from 012 to 255 (anything that's not the lowest transparency level) will make this display at 100% strength.
- Blending modes can also be used for midtextures. In UDMF, this is done via the
blendmode
orrenderstyle
linedef field. In the binary map format, this is done using new linedef actions:- 910 to 919 for additive blending.
- 920 to 929 for subtractive blending.
- 930 to 939 for reverse subtractive blending.
- 940 for modulative blending.
- Linedef type 909 (fog wall) is turned into a blendmode too. Sorry for hijacking your branch --MascaraSnake
- Blending modes can also be used for patch/graphic drawing, using
V_ADD
,V_SUBTRACT
,V_REVERSESUBTRACT
andV_MODULATE
.-
V_OFFSET
,V_WRAPX
andV_WRAPY
have been removed to make space for these new flags.
-
Known issues:
- The original branch's Software gamma correction has not been implemented, which is partly why blendmode-using walls look somewhat different between renderers. Anyone else is welcome to step in and implement this, as you'll probably do a better job at it than me.
- Subtractive blending looks weird at lower opacity values. It's not hard to make it look better in Software, but renderer parity seems more important.
Testing files: srb2win-blentran.exe Updated on 01/08/2022 - BASED ON next
SO BEWARE YOUR SAVE FILES
Edited by MascaraSnake