Commit graph

1626 commits

Author SHA1 Message Date
James R
8387b5e2cd Don't draw OpenGL loading screen for credits attract demos 2024-03-25 17:01:18 -07:00
SteelT
5b4b31a354 Don't draw OpenGL loading screen on titlemap
As it looks kinda jarring seeing it appear on the title screen for a split second.
2024-03-25 13:29:30 -04:00
Lach
8d7cc11346 Typo correction: Lightning -> Lighting 2024-03-09 19:25:43 +11:00
Lach
dd52fb7620 Disable directional lighting on Ark Arrow models 2024-03-09 17:37:54 +11:00
toaster
7f0df71558 R_SkinAvailableEX
- Most R_SkinAvailable calls should be returning index into demo.skinlist (same numerical value as when demo was recorded), for demo sync
- A handful of general things permit exception for this
- Expose `replaynumskins` (calculated as `(demo.playback ? demo.numskins : numskins)`) to Lua
    - There's *always* more that can be done for this, but this is the minimum spec that can at least be somewhat stable
2024-03-05 13:21:38 -08:00
James R
c6bdf4eae3 Remove RANGECHECK, replace with devmode prints
- All code that would I_Error behind RANGECHECK, simply
  return
- Add debug prints under devmode render
2024-03-03 17:31:33 -08:00
Sal
16f021d7a5 Merge branch 'legacy-gl-is-unsupported' into 'master'
Bring back OpenGL "USE AT ROBOTNIK'S RISK" warning screen

See merge request KartKrew/Kart!1987
2024-03-03 01:31:50 +00:00
AJ Martinez
47a9cce133 Add shittysigns cheat 2024-03-02 04:27:41 -07:00
James R
1e44088373 Bring back OpenGL "USE AT ROBOTNIK'S RISK" warning screen 2024-03-01 18:38:16 -08:00
AJ Martinez
25ea0bf743 Exclude all "3D Geometry" sprites from sprite-clip hack 2024-02-14 04:14:28 -07:00
AJ Martinez
77617c9d31 GL: Don't pull papersprites towards camera 2024-02-13 18:19:52 -07:00
SteelT
488386db68 Check for SPR2_SIGN, SPR2_SIGL and SPR2_TALK as well 2024-01-22 22:40:38 -05:00
SteelT
626d39870b Don't allow model rendering on Ring Shooter face overlay 2024-01-22 22:19:13 -05:00
AJ Martinez
fb20f7b036 Merge branch 'opengl-brightmaps' into 'master'
OpenGL BRIGHTMAPs + sprite/model directional lighting

See merge request KartKrew/Kart!1485
2024-01-19 05:14:41 +00:00
James R
014cbdb3bb OpenGL: fix BRIGHTMAP sneaking into textures where it doesn't belong and creating artifacts 2024-01-17 18:21:46 -08:00
Sal
9382031337 OpenGL sprite+model directional light 2024-01-17 12:05:12 -08:00
Sally Coolatta
83e3401806 Don't use colormap tint on OGL brightmap 2024-01-17 12:05:12 -08:00
Sally Coolatta
d03eb9e9cd Add batching support to OGL brightmaps 2024-01-17 12:05:12 -08:00
James R.
e4a2461faf WIP - brightmaps in opengl, artifacts may occur, batching is super broken 2024-01-17 12:05:11 -08:00
Sally Coolatta
0f695e203f Use old faster luminance calc for HWR blends
Not accurate to Software's look but can't be assed to fuck around with legacy HWR to implement this as shader.
2024-01-17 13:27:32 -05:00
SteelT
7eb4d7fff1 Fix could not implicitly convert operands to arithmetic operator
idk why my shader compiler trips up on this but not others
2024-01-12 19:14:51 -05:00
AJ Martinez
3378a03d79 Offset sprites towards camera in Legacy GL 2024-01-12 16:41:04 -07:00
James R
dae4454055 Use untranslated texture for checking R_TextureCanRemap
- Handles animated textures correctly
2023-12-22 19:02:07 -08:00
James R
73e032573d TERRAIN: add 'remap' boolean, toggles ENCOREMAP/TWEAKMAP
- Software* + OpenGL support
- *Not supported: R_DrawColumnShadowed_8
  - This has something to do with walls and FOF lights.
    However, I don't see an easy code solution and I don't
    know how to even test this.
2023-12-22 19:02:06 -08:00
Eidolon
baad413cc3 Remove unneeded memcpy in HWR_CacheTextureAsFlat 2023-12-16 19:10:23 -06:00
Eidolon
5e8da61e5e Encore colormap textures-as-flats in GL 2023-12-16 17:37:40 -06:00
Eidolon
016cc1e95f Work around pointer-integer comparison in hw_cache 2023-12-15 11:19:34 -06:00
Eidolon
4654bb43bb Workaround encore crash in HWR_GetMappedPatch 2023-12-14 23:05:17 -06:00
Eidolon
9147aeaac7 Add encoremap to textures-as-flats 2023-12-14 23:03:42 -06:00
Eidolon
b2b03ecbb5 Fix GLENCORE memory leak, re-enable 2023-12-14 23:03:42 -06:00
VelocitOni
0081c5427f semi-bright increase & semi-bright spikes, no encore remap on spikes
Semi-bright is 192 instead of 128 now, an average of half-to-max brightness. We don't make really dark maps in RR, this makes sense
2023-11-17 22:27:39 -05:00
James R.
7b3010c93d Fix many instances of splitscreen view number if there are duplicate displayplayers
- Avoid iterating displayplayers to find view number and
  prefer R_GetViewNumber.
- Iterate over all matching displayplayers if necessary,
  instead of stopping at the first match.
2023-10-03 21:28:33 -07:00
James R.
afeba341c0 Remove translucenthud cvar, let V_HUDTRANS fade in like V_SLIDEIN
- V_HUDTRANS does not fade if combined with V_SLIDEIN
  (since sliding elements are not supposed to fade).
- If not V_SPLITSCREEN, uses most opaque fade value among
  splitscreen players (since Tally will fade back out for
  specific players).
2023-09-11 18:30:40 -07:00
James R
6c0b042eed Refactor cvar definitions completely, move everything to cvars.cpp
- No need to call CV_RegisterVar
- Cvar definitions live in only one file, easier to locate
- Organized into sections -- netvars, cheats, etc.
- Use builder pattern to initialize cvars
- Still need to extern if you want to read the cvar value
2023-08-25 17:22:40 -07:00
toaster
7ce5ae03b0 Merge branch 'fix-gl-sprite-rollangle' into 'master'
Fix OpenGL sprite rollangle for non-papersprites

Closes #616

See merge request KartKrew/Kart!1416
2023-08-21 12:22:31 +00:00
Sally Coolatta
82e9257284 Fix frequent legacy GL crash that Jeck is getting
This uses `gl_frontsector`, which can sometimes be NULL.
2023-08-21 01:40:05 -04:00
James R
f67c3df3ed HWR_ProjectSprite: fix rollangle for non-papersprites 2023-08-20 16:46:01 -07:00
James R
70294e62bd Automatically disable directional lighting if the sector has no sky 2023-08-11 01:41:49 -07:00
James R
46406931c1 Toggle all manner of directional lighting with MSF_FLATLIGHTING 2023-07-27 17:49:45 -07:00
Sally Coolatta
5067bb854a Split hitlag into its own file 2023-06-30 23:05:40 -07:00
toaster
4f3751bf59 HWR_ProjectSprite: Invert spriterotangle for the sake of rotsprite in GL 2023-06-05 16:12:12 +01:00
toaster
8d9b42e49b Skin name search-assistive hashing
More opportunities for early rejection in table-wide searches, in anticipation of future work.
- Many circumstances independently implemented string name comparisons. Most of these have been converted to use R_SkinAvailable, with one exception.
    - M_CharacterSelectInit already needs to iterate over the characters, so produce the skin hash independently.
2023-05-30 12:21:40 +01:00
Oni
d6d8cf548a Merge branch 'optimize-precip-think' into 'master'
Optimize precipitation by eliminating the thinker entirely

See merge request KartKrew/Kart!1157
2023-04-09 05:31:31 +00:00
James R
9eab5317f3 Stop calling P_NullPrecipThinker
In levels with tens of thousands of precipmobjs, the
overhead of running a thinker for all of them is too much,
no matter how small the thinker is.

ALL thinking is done inside the renderer now, where it can
be limited by distance. Precipmobjs track the last
leveltime they thunk, so interpolated frames don't think
twice.
2023-04-08 13:34:42 -07:00
James R
5ee4461bfc hardware/hw_main.c: remove unused clipping code, remove ifdef NEWCLIP 2023-04-08 21:08:07 +01:00
James R
bced5ecbc5 Render precip through blockmap instead of during BSP
There can be very many precipmobjs in a sector. During BSP
rendering, for each sector reached by BSP (the entire
visible level at least), all the precipmobjs would be
iterated and their distance from the camera calculated, to
determine whether they are within draw distance.

The issue with the old approach is that there really are
too many precipmobjs in each sector. By iterating the
blockmap within a certain range instead, precipmobjs
out of view are not iterated at all, saving some time.

Caveat: drawdist_precip is no longer respected as an
exact value, since it must round to the precision of the
blockmap.

List of potentially scary changes:

- Removes snext/sprev for precipmobj_t
- Removes preciplist for sector_t

- Adds bnext/bprev for precipmobj_t
  - mobj_t and precipmobj_t field offsets are symmetrical

- Modified P_SetPrecipitationThingPosition and P_SetThingPosition
  - The syntax in these functions is kind of wacky
2023-04-06 05:41:06 -07:00
James R
8955f2ead0 R_RenderPlayerView, HWR_RenderPlayerView, HWR_RenderSkyboxView: cut down on duplicated code 2023-04-06 04:47:14 -07:00
James R
c53ae816c1 Renderer: force Trip Wires to maximum brightness, ignore colormaps
Fixes sector light level and colormaps darkening Trip
Wires, especially in OpenGL.
2023-03-28 21:08:11 -07:00
Sally Coolatta
43156f63dd Only call NetUpdate once
This doesn't need to be in a bunch of rendering code, simply only run it in TryRunTics.

Worst case scenario: if this sucks then it means dedicated servers have also sucked the whole time and we should come up with a new solution to fix both of them.

More likely scenario: nothing changes and we now aren't doing networking inside of the renderer.
2023-03-26 14:12:01 +01:00
Eidolon
ce15c47a4d Only interpolate shadowcasters if they exist
# Conflicts:
#	src/hardware/hw_main.c
2023-01-27 23:24:58 +00:00