Commit graph

180 commits

Author SHA1 Message Date
James R
39ea73a4ad devmode render: display skybox portal, visplane and drawseg counts on HUD
- Skybox portal count moved from console print to HUD
- Displays visplane count and drawseg count
2023-04-08 00:40:37 -07:00
James R
53b2922fbb Add the debugrender_highlight command, highlight specific rendering in flat colors
Software mode only.

The command is used like this:

debugrender_highlight planes sprites
debugrender_highlight pl spr
debugrender_highlight none

(Abbreviations work.)

Supported rendering to flag:

planes      - sector floor/ceiling
fofplanes   - FOF top/bottom
fofsides    - FOF sides
midtextures - pegged midtexture
walls       - sector upper/lower texture, one-sided linedefs
sprites     - sprites
sky         - skybox
2023-03-06 05:25:36 -08:00
James R
1de5046623 Add cv_debugrender_contrast, adjusts contrast of level geometry
debugrender_contrast -1.0 to 1.0, default 0.0 (no change).
Higher values add more contrast (darkens the level), lower
values add less (brighten). Does not affect thing drawing.
Software mode only.

Adds r_debug.cpp
2023-03-06 05:04:27 -08:00
MascaraSnake
3b971835ee Add Lua backwards compatibility for FOF flags 2022-10-09 01:56:50 -04:00
Nev3r
5c9599f0a9 "UDMF: The whole thing" merged
See merge request STJr/SRB2!1714

Barely any RR features reimplemented
2022-10-09 01:13:37 -04:00
Sally Coolatta
d5c384bf02 Fix even slope lighting being inconsistent 2022-05-27 18:34:52 -04:00
Sally Coolatta
f05ac93633 Fix the two big problems with the lighting
- FULLY fix light offset still being applied on full bright walls
- Fix ceiling lighting being reversed
2022-05-25 16:16:20 -04:00
Sally Coolatta
ec02e75f0d Implement directional lighting
(Sloped ceilings are reversed and not sure what to do about it)
2022-05-25 02:51:08 -04:00
Sally Coolatta
dc890caef3 Add slope lighting
Makes slopes at a great enough steepness able to match the contrast of walls.

COMING SOON: Directional lighting & contrast modifier, as options for map header.
2022-05-24 22:23:04 -04:00
toaster
8563074ee0 Resolve #237 - water ripple effects no longer show garbage in splitscreen. 2022-04-17 21:57:06 +01:00
James R
db619f1ed6 Fix bad merge @ 37e16db41e 2022-03-23 13:52:59 -07:00
toaster
86f2a551e6 Fix floor sprite projection
# Conflicts:
#	src/r_plane.c
#	src/r_things.h
2022-03-18 18:16:31 +00:00
sphere
6d58afe071 Use floating-point math for polyobject planes as well. 2022-03-18 17:25:29 +00:00
toaster
37e16db41e Fix slope plane rotation and alignment.
A flattened-commit port of the SRB2 repository's software-slope-plane-uv-fix-attempt/merge request 1464 due to the vast, vast refactorings that would intefere with brightmaps and Encore if done one commit at a time.
2022-03-18 16:10:05 +00:00
Sally Coolatta
510c65699b Fixed animated span brightmaps being offset
`levelflat->u.texture.num` is modified at run-time to do animations, unlike wall textures which use `texturetranslation`.
2021-12-17 04:16:51 -05:00
Sally Coolatta
5183d3161c Simplify span brightmap load 2021-12-17 03:42:59 -05:00
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
daab86f461 Implement brightmaps for span drawers, fix column loop bug 2021-12-16 11:48:32 -05:00
Sally Coolatta
04c1a9dcb1 Brightmaps on walls 2021-12-16 09:40:14 -05:00
toaster
234403f1f2 Fixed the bad merge that prevented non-transparent surfaces from rippling. 2021-12-02 16:49:13 +00:00
James R
08348fcd43 Merge remote-tracking branch 'srb2/next' 2021-04-05 01:26:17 -07: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
Jaime Ita Passos
316ecff003 [Software] A few floorsprite fixes
This fixes the texture of the floorsprite sometimes facing the wrong way, since plane rendering can change the view angle.
2021-03-29 23:04:13 -03: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
toaster
f40836dcec Fix skies not being Encore-remapped (only affected software :regret:) 2021-02-15 21:55:40 +00:00
James R
0292464611 Let sector flags control plane ripple effect 2021-01-12 22:16:55 -08:00
Nev3r
d27ed974b2 Merge branch 'fix-vibing-slopes' into 'next'
Fix vibing slope planes

See merge request STJr/SRB2!1335
2020-12-16 11:15:41 -05:00
Jaime Ita Passos
ad224acfca Fix vibing slope planes
I messed up the multiplication order for texture scaling: it multiplied a floating point number with a fixed point number, instead of multiplying two floats and then converting the result into a fixed point number.
2020-12-16 00:26:08 -03:00
Jaime Ita Passos
1d8fb0fc50 Restore the viewpoint's angle in R_DrawPlanes instead 2020-12-14 01:14:55 -03:00
Jaime Ita Passos
eee4548d3f Fix a crash 2020-11-23 12:53:59 -03:00
Jaime Ita Passos
be274a4fa9 Merge branch 'next' into spritestuff2 2020-11-19 00:52:43 -03:00
Jaime Passos
cac8e06e7d Remove NOWATER define 2020-11-05 00:00:08 -03:00
Jaime Passos
917f8bbb66 Plane optimization and cleanup 2020-11-04 23:46:34 -03: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
Sally Coolatta
9b6aa946ea Merge remote-tracking branch 'srb2/master' into the-scary-22-merge 2020-10-24 19:28:06 -04:00
Sryder
4029f5bd00 Fix dumb copy paste error that caused software to crash 2020-10-24 00:50:58 +01: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
Hannu Hanhi
49a4ec71d7 R_FindPlane optimization 2020-10-18 01:27:01 +03:00
Jaime Passos
f93e050569 Implement sloped floor sprites 2020-10-13 22:42:07 -03: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
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
dfd733eb80 Up to screen.o
Lots of renderer files I didn't need to touch at all here :)
2020-08-15 00:55:30 -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