Commit graph

209 commits

Author SHA1 Message Date
Sally Coolatta
603a97938b "Support" ASM functions
(By that, I mean it defaults to ASM, but uses the C version when drawing brightmapped stuff. Was this worth the minor performance gain over just making NOASM=1 default? I dunno.)
2021-12-16 13:05:37 -05:00
Sally Coolatta
04c1a9dcb1 Brightmaps on walls 2021-12-16 09:40:14 -05:00
James R
2cab15c7a3 Automatically apply additive to tripwires 2021-11-28 16:34:46 -08:00
James R
08348fcd43 Merge remote-tracking branch 'srb2/next' 2021-04-05 01:26:17 -07:00
toaster
690244825b * Fixed blending in OpenGL.
* Caught a UDMF-only crash for Software (where linedef alpha is low but nonzero).
2021-04-03 19:29:06 +01:00
toaster
ebe38ff518 * Add a blend field to FOFs.
* Set via a fourth digit in the upper midtexture for transparent FOFs
        * For example - #2551 is additive solid, #1282 is subtractive half...
    * The original method of setting the upper midtexture to #900 or 901 still works, since I'm not out to break existing maps.
* Software: Remove the horrible `else if` ladder for FOF translucency. Algorithms, baby!
* OpenGL: Move to using `HWR_GetBlendModeFlag` in more places, for more long-term extensible support for multiple blendmodes.
2021-04-01 23:45:21 +01:00
toaster
40cbc30bff Mammoth commit, sorry.
All my work thus far on solving the drawflag/renderflag/additive/subtractive conundrum.

Outstandng problems:
* Bad additive/subtractive tables means that they appear opaque except under certain conditions.
* No support for FOFs, Polyobjects, or linedefs in OpenGL yet.
* All OpenGL support mostly done blind, may or may not function in practice.

If nothing else, the hard engineering problems are solved and it's just bug hammering...
2021-03-31 22:46:23 +01:00
Hannu Hanhi
c08012fe8a Use double precision in R_StoreWallRange sloped seg culling calculations
Fixes culling issues in CEZ2 skybox
2021-03-06 19:56:25 +02:00
Sally Coolatta
4139e67ddb Renderer compile errors 2021-02-28 23:31:56 -05:00
Sally Coolatta
9d7ec0ab8f Merge SRB2 next
Probably doesn't compile yet, but I got rid of all of the conflicts for anyone who wants to take a stab at it.
2021-02-27 05:18:36 -05:00
toaster
4052e01f4a Introduce a sequence of macros to reduce the reliance of Colormap-related code (especially but not limited to Encore mode) on magic numbers. 2021-02-16 14:34:00 +00:00
Jaime Ita Passos
4b8b5d928d Don't clip if the 3D floor is fog 2020-12-02 15:34:11 -03:00
Jaime Ita Passos
fefd953a83 Fix 3D floor culling with polyobject segs 2020-12-02 15:31:11 -03:00
Jaime Ita Passos
be274a4fa9 Merge branch 'next' into spritestuff2 2020-11-19 00:52:43 -03:00
Nev3r
df6a903592 Merge branch 'next' of https://git.do.srb2.org/STJr/SRB2 into udmf-multitag
# Conflicts:
#	src/lua_baselib.c
#	src/lua_maplib.c
2020-10-27 20:48:25 +01:00
Jaime Passos
cdc4a6d86e Implement blend modes 2020-10-27 00:03:41 -03:00
Sryder
11386e12ba Keep NUMTRANSMAPS what it was, instead add NUMEFFECTMAPS to end of enum
Should have easier merging and be less likely to break current effects.
2020-10-26 11:18:53 +00:00
Sryder
488ad70da3 Merge branch 'the-scary-22-merge' of git@git.do.srb2.org:KartKrew/Kart.git into additive-transmap 2020-10-25 14:43:44 +00:00
Sally Coolatta
7c2bd0d1c2 Merge remote-tracking branch 'srb2/next' into the-scary-22-merge 2020-10-24 20:50:58 -04:00
Sryder
d311242a6e Support for additive/subtractive translation maps on FOFs and Polyobjects
Polyobjects set translucency to 11 for additive, and 12 for subtractive
FOFs using the regular translucency settings set the top texture to #900 for additive, and #901 for subtractive
2020-10-22 23:13:51 +01:00
Sryder
4a10861669 Additive/Subtractive translation map support on midtextures 2020-10-22 22:27:14 +01:00
Jaime Passos
b4b4738c94 Changes to sprite rendering:
- Added render flags (see r_defs.h)
- Implemented floor splats
- Drop shadow sprite rendering through render flags
2020-10-12 00:13:22 -03:00
Jaime Passos
3623d715b8 Fix bug 2020-10-10 13:37:23 -03:00
Jaime Passos
b7d1c0b1e4 Make 3D floors cull areas below or above them to reduce overdraw (2) 2020-10-10 01:00:39 -03:00
James R
997d142cb5 SPLITSCREEN FOV
Object tracking is off, but it was off before so I don't know if I actually
broke it. Minor refactoring in HWR_RenderPlayerView and HWR_RenderSkyboxView.
2020-09-23 17:50:47 -07:00
Sally Coolatta
9efdc98de6 Makes it through all kart files
All that's left is SDL, OGL, maybe also Lua
2020-08-15 04:42:56 -04:00
Sally Coolatta
f9ca40e673 Merge branch 'master' into the-scary-22-merge 2020-08-12 20:59:09 -04:00
Sally Coolatta
e296e1309a YAY, round 2 2020-08-09 21:02:56 -04:00
Sally Coolatta
4b5c7d7510 Merge r_segs.c 2020-08-08 17:10:46 -04:00
Jaime Passos
a7f3dd7eff Refactor patch loading 2020-08-08 05:16:47 -03:00
Nev3r
29f3d0e693 Fix smooth brain bruhments. 2020-07-31 22:38:37 +02:00
Nev3r
cc8beb4677 Fix FOF intersections in multitagging for the software renderer. 2020-07-29 14:52:21 +02:00
Sally Coolatta
ef2579f2b3 Merge branch 'master' into draw-flags 2020-07-20 13:38:48 -04:00
Nev3r
ebe16a66d9 Merge branch 'udmf-next' of https://git.magicalgirl.moe/STJr/SRB2/ into udmf-multitag
# Conflicts:
#	src/hardware/hw_main.c
#	src/p_ceilng.c
#	src/p_floor.c
#	src/p_mobj.c
#	src/p_mobj.h
#	src/p_polyobj.c
#	src/p_saveg.c
#	src/p_setup.c
#	src/p_spec.c
#	src/p_spec.h
#	src/p_user.c
#	src/r_bsp.c
#	src/r_defs.h
2020-07-10 18:18:07 +02:00
MascaraSnake
3ce62d7780 Merge branch 'next' into udmf-next
# Conflicts:
#	src/p_mobj.c
#	src/p_polyobj.c
2020-06-09 09:38:01 +02:00
Sally Coolatta
63917ffccc The start of the scary 2.2 merge
All conflicts are left in-tact. We should be collaborating on solving these files one at a time.
2020-05-29 13:43:38 -04:00
Sryder
d4080e94f7 Better fake contrast.
Fake contrast for the segs are calculated at map load.
OpenGL only has the options "Standard" and "Smooth" now. Standard is default and replicates software. Smooth changes the contrast more smoothly depending on angle.
2020-05-21 16:32:34 +01:00
Louis-Antoine
74fa35221d Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2.git into slope-cleanup
# Conflicts:
#	src/hardware/hw_main.c
#	src/p_spec.c
2020-05-18 16:14:05 +02:00
Louis-Antoine
6af2871fa5 Rename P_GetZAt to P_GetSlopeZAt and P_GetZAt2 to P_GetZAt 2020-05-18 15:23:56 +02:00
MascaraSnake
8c22834b46 Merge branch 'next' into udmf-next 2020-05-04 20:32:56 +02:00
MascaraSnake
8efec04051 Remove POLYOBJECTS and POLYOBJECTS_PLANES defines 2020-05-02 12:08:31 +02:00
Nev3r
dbf2b9c0f0 Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2/ into udmf-multitag
# Conflicts:
#	src/p_floor.c
#	src/p_mobj.c
#	src/p_spec.c
#	src/r_segs.c
2020-04-25 10:47:45 +02:00
MascaraSnake
d2e21afaf1 Merge branch 'next' into udmf-next
# Conflicts:
#	src/p_mobj.c
#	src/r_segs.c
2020-04-24 21:15:53 +02:00
Monster Iestyn
e78a2fa297 Merge branch 'master' into next 2020-04-23 18:49:53 +01:00
Nev3r
71d172a2af Fix Tags_Compare() typo to Tag_Compare(). 2020-04-12 15:03:14 +02:00
Nev3r
d59016a18e Use Tags_Compare wrapper on software renderer to compare sector tags. 2020-04-12 13:14:39 +02:00
Nev3r
860c44d953 Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2/ into udmf-next
# Conflicts:
#	src/lua_hooklib.c
2020-04-12 09:57:19 +02:00
toaster
c74dde0f0f Minor optimisations surrounding R_DrawFlippedMaskedColumn.
* Replace the texheight parameter provided directly to it with a previously existing (now renamed) global used for the same purpose, so that it can be used as an interchangeable function pointer with R_DrawMaskedColumn.
* Using the above, optimise R_DrawVisSprite to call a function pointer in a tighter loop rather than check SC_VFLIP each time around.
* SHORT macro can involve repeated operations; calculate once and put in memory for both RANGECHECK and papersprite.
* Remove irrelevant range check (already covered by existing range check immediately above) from R_DrawFlippedMaskedColumn and R_DrawMaskedColumn.
* "Warning: avoiding a crash in %s %d" is a terrible error message, and it chips away at the tightness of the loop just for something most people will never see printed. Replace with a PARANOIA I_Error in case someone actively wants to go hunting for its cause.
2020-03-26 16:09:19 +00:00
Sally Cochenour
505b0176c0 Horizon line apply to FOFs backport 2020-03-25 22:30:52 -04:00
MascaraSnake
58e8ec6500 Standardize the behavior of FF_INVERTSIDES and FF_INVERTPLANES 2020-03-25 08:34:52 +01:00