Commit graph

1617 commits

Author SHA1 Message Date
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
Eidolon
be021baa02 Add extern "C" in C++ to all headers 2022-12-30 19:26:16 -06:00
James R
3a40352679 opengl: fix bottom and right edge of clip rect 2022-12-17 18:38:40 -08:00
Sally Coolatta
38d8281a6b Merge branch 'master' into cmake-sources 2022-12-15 19:54:59 -05:00
James R
db062fd0bb OpenGL: clipping support for HWR_DrawStretchyFixedPatch 2022-12-11 17:45:15 -08:00
Sally Coolatta
b95a18676f Clipping rectangle
Instead of the absolute insanity that is V_DrawCroppedPatch, which makes you specify the number of pixels to crop off the top/left and then the number of pixels to show after the crop ... you just use V_SetClipRect to create a rectangle for any future draws to be cropped down to, and V_ClearClipRect afterwards to clear it.

Currently only supported by V_DrawStretchyFixedPatch. Ideally other drawing functions should also receive clipping rectangle support too.
2022-12-11 13:53:51 -05:00
James R
07c30a20c2 Move all sources into CMakeLists.txt
Changing Sourcefile did not automatically update the CMake
cache.
2022-11-28 21:46:43 -08:00
AJ Martinez
80252717c9 Kill SF_HIRES, use skin_t highresscale instead 2022-11-03 16:19:17 -07:00
Sally Coolatta
29595f946b Add V_VFLIP
Ironman can now be shitty
2022-11-03 08:47:44 -04:00
James R
603a1671b4 Use angle between viewz and mobj z to determine splat sprite angle 2022-11-03 03:38:56 -07:00