Commit graph

387 commits

Author SHA1 Message Date
Christoph Oelckers
dab1f7fcec - handle walls where a sloped floor intersects with the visible part. 2022-01-30 08:54:11 +01:00
Christoph Oelckers
11b21cce2c - handle wall sprites on orthogonal walls better.
This covers the case that a wall sprite may overlap two walls with a slight deviation in their position - always pick the closest one.
2022-01-30 08:28:52 +01:00
Christoph Oelckers
686a648aa1 - fixed inverted logic when checking for dragged sectors. 2022-01-29 09:59:29 +01:00
Christoph Oelckers
04a380ce14 - added script exports for DCoreActor's member variables. 2022-01-24 00:24:46 +01:00
Christoph Oelckers
0398ba4ff0 - added all parts needed to implement the actor property parser.
Not hooked up yet with the rest of the code, this just adds the needed files in compilable form.
2022-01-23 13:03:39 +01:00
Christoph Oelckers
3aff12cf4c - sky management rework. 2022-01-16 12:12:43 +01:00
Christoph Oelckers
e2061dbcc6 - fixed bad wall array access when handling a sector that got split up. 2022-01-14 22:56:00 +01:00
Christoph Oelckers
7b1d99373b - fixed last commit and optimized wall lookup code a bit.
No need to continue if a matching wall has been found.
2022-01-14 20:20:47 +01:00
Christoph Oelckers
ef711f0b2d - allow a bit of tolerance for attached orthogonal wall sprites.
We have to account for mappers adding some 'safe' distance (which isn't really safe!)
2022-01-14 16:27:24 +01:00
Christoph Oelckers
8281374551 - do not use floor sprites for splitting geometry.
This is way too expensive on maps with lots of sprites. Instead, run them through the case for slope sprites which should be sufficient here
Also let rendered_* count the actual draw calls, not processed objects, because that is the most relevant metric for checking performance issues.
2022-01-14 00:49:57 +01:00
Christoph Oelckers
899ced50aa - moved alpha threshold determination for sprites to the setup pass.
Overall this is not much, but it can be easily offloaded to a worker thread later.
2022-01-14 00:19:26 +01:00
Christoph Oelckers
37e7f92182 - made a few changes to the timer calls for renderer profiling.
A few items were counted double, other were in the wrong slot.
2022-01-14 00:15:33 +01:00
Christoph Oelckers
9375750a17 - added sorting for wall sprites attached to non-orthogonal walls. 2022-01-13 20:55:55 +01:00
Christoph Oelckers
8d84bc2599 - disable window clipping entirely in outside areas.
This is a first grade performance killer on large maps and doesn't offer much in clipping robustness.
On maps like Clear the Coast or Wpudrichem omitting this check reduces map traversal time by 40%.
2022-01-13 19:46:04 +01:00
Christoph Oelckers
8976813fe1 - removed some overlooked debug code. 2022-01-13 13:14:00 +01:00
Christoph Oelckers
fcf04a7df1 - delete unused variable. 2022-01-13 12:27:40 +01:00
Christoph Oelckers
85cce1128a - do proper handling of the 'no shadow' case for Duke's bad guys.
Using a flag like RedNukem instead of hacking dispicnum, which occasionally does reach the renderer and causes problems.
2022-01-13 00:42:34 +01:00
Christoph Oelckers
1b162ececc - do not add two-sided walls outside of the visible range to the clipper
This caused a render glitch in Duke E4L2.
2022-01-13 00:04:32 +01:00
Christoph Oelckers
22afc25046 - fixed floor sprite normals. 2022-01-13 00:04:14 +01:00
Christoph Oelckers
f09bbb8b5e - fixed the normals for sloped planes. 2022-01-12 16:02:45 +01:00
Christoph Oelckers
e5dad53f6d - menu entries for light modes, plus handling of overbright shades. 2022-01-11 00:19:15 +01:00
Christoph Oelckers
f20bd94269 - the gl_fogmode hack is no longer needed 2022-01-11 00:18:56 +01:00
Christoph Oelckers
aa0e558af2 - use different fade ramps for 64 and 32 shades.
Also some optimization to eliminate redundant calculations of the fade strength.
2022-01-11 00:18:20 +01:00
Christoph Oelckers
07eeb147ab - tweaked light mode for weapon lighting and avoiding getting too dark. 2022-01-11 00:16:43 +01:00
Christoph Oelckers
aa7af0711a - fine tuning of the new light modes. 2022-01-11 00:13:31 +01:00
Christoph Oelckers
26223ffca2 - experimental new light mode, based on GZDoom's original light modes. 2022-01-11 00:12:50 +01:00
Christoph Oelckers
98c919fbe4 - g_visibility stuff 2022-01-11 00:12:32 +01:00
Christoph Oelckers
ddcee4ecbf - split up g_visibility into two variables.
This is preparation for experimenting with the weapon flashes that can be quite annoying with how they brighten distant parts of the level far more than nearby parts.
2022-01-11 00:12:32 +01:00
Christoph Oelckers
91d51d518b - this hack is needed because dragging vertices around can randomly create wall intersection.
In clear English: Geometry in Build maps is always broken by design. :(
2022-01-09 20:38:07 +01:00
Christoph Oelckers
a0e6ee0e2e - added a bit more logic to handle overlapping walls.
All this is needed to make the back door to the cinema in Duke E1L1 render properly without making the clipper break on complex overlapping sector setups, like some of the ducts in Duke E2L7.
2022-01-09 12:05:36 +01:00
Christoph Oelckers
36bb3e621f - fix typo. 2022-01-09 11:53:32 +01:00
Christoph Oelckers
fcba341546 - use proper aspect ratio to calculate the frustum's angle. 2022-01-08 23:43:08 +01:00
Christoph Oelckers
415dc5246d - fixed sprting of non-translucent sprites. 2022-01-08 21:18:18 +01:00
Christoph Oelckers
fe0581ed97 - disable palette emulation when rendering weapons.
The 2D code cannot handle transparency well with it.
2022-01-08 14:16:18 +01:00
Christoph Oelckers
70087ebc12 - fixed: The new renderer still called the Polymost screen finish function.
This led to a second, redundant postprocessing step with incorrect matrix values.
It now calls screen->Update() directly without the unneeded stuff, but this required a bit of reordering in the game code to ensure that the renderer receives the weapon data to display.
2022-01-08 13:50:47 +01:00
Christoph Oelckers
a3162f6ccf - renamed testnewrenderer CVAR. 2022-01-07 12:49:41 +01:00
Christoph Oelckers
0cfe6bbed3 - do the unlink properly when replacing a clip node. 2022-01-07 00:22:02 +01:00
Christoph Oelckers
98258e0bb2 - fix handling in the clipper for a new range that completely covers an existing one.
The handling for this was from the first draft of the clipper that made very different assumptions than the final version.
This cannot simply delete the old range - it has to explicitly alter it and recursively insert the outer sub-ranges separately.
2022-01-06 16:34:04 +01:00
Christoph Oelckers
159409d5d2 - allow a bit of tolerance when sorting walls, so that microscopic intersections can be ignored. 2022-01-06 00:43:47 +01:00
Christoph Oelckers
9f6d6a0e6d - block y-flipping of slope sprites only if they are actually sloped.
This mirrors Polymost's (buggy) handling.
2022-01-05 09:20:54 +01:00
Christoph Oelckers
d5daa8ee84 - fixed: The bunch drawer's gotwall array was cleared before resizing.
This means that on the first frame of a new map it'd operate on partially uninitialized data.
2022-01-04 17:18:26 +01:00
Christoph Oelckers
227ac0fca6 - RR: address a missing texture in E1L2.
The current texture on this wall is suboptimal but it's still better than glitchy HOM.
2022-01-04 17:18:25 +01:00
Christoph Oelckers
ac3546bdaa - fixed depth buffer use of slope sprites.
They cannot be treated like perfectly horizontal floor sprites and need to write to the depth buffer in the same pass as the regular pixels.
2022-01-04 12:42:45 +01:00
Christoph Oelckers
e2e3b4482d - do some better sorting of slope sprites.
Splitting by translucent floor plane is essential, splitting by wall not that much - sorting by center point should be sufficient here.
2022-01-03 12:31:54 +01:00
Christoph Oelckers
daa07b9e55 - an attempt to render "reflection" floor sprites by lifting them up to the floor and drawing them with 33% alpha. 2022-01-01 20:01:36 +01:00
Christoph Oelckers
6807086f3c - relaxed the FindWall check for wall sprites a bit so that slightly out-of-sector sprites can find a wall to attach to. 2022-01-01 18:55:42 +01:00
Christoph Oelckers
fcb3e43799 - fixed side check for sloped sprites. 2022-01-01 17:27:09 +01:00
Christoph Oelckers
9680ff1863 - ignore y-flipping when rendering slope sprites in the new renderer.
This is what Polymost, and apparently NBlood, do here.
2022-01-01 12:55:28 +01:00
Christoph Oelckers
551ff89778 - fixed signed/unsigned comparison warning. 2022-01-01 11:30:00 +01:00
Mitchell Richters
f1530a051f - Fix two signedness warnings in hw_sections.cpp. 2022-01-01 21:02:00 +11:00