Christoph Oelckers
5e94eaff8e
- new renderer: handle light level underflows.
2021-05-16 18:50:54 +02:00
Christoph Oelckers
a348508779
- handle the wall sprite clipping properly.
2021-05-16 16:00:00 +02:00
Christoph Oelckers
5bb438b817
- new renderer: fixed bad positioning when a y-flipped wall sprite had to be clipped to floor or ceiling.
2021-05-16 12:17:26 +02:00
Christoph Oelckers
845ce63348
- make sure that all objects rendered as shadow reset the object color after the draw call.
2021-05-15 10:40:25 +02:00
Christoph Oelckers
55abb261c6
- this was in the wrong place. :(
2021-05-15 10:25:37 +02:00
Christoph Oelckers
db8572dbcc
- newrenderer: clip wall angles before doing any math with them.
...
In some cases these unclipped ranges ended up in other data structures, causing problems with bunch ordering.
2021-05-14 12:56:37 +02:00
Christoph Oelckers
3d6ae40bc0
- normalize all angles to the actual viewing range in the drawer.
...
This simplifies the debugging of this code a lot because we no longer have to deal with range overflows and can do direct comparisons everywhere.
2021-05-14 10:50:22 +02:00
Christoph Oelckers
cb2bc7967a
- fixed the remaining warnings.
2021-05-12 21:50:01 +02:00
Christoph Oelckers
d097c8e635
- removed the non-functional and long abandoned level music alias feature.
...
With RMAPINFO such a hack is no longer needed for anything.
2021-05-12 21:48:40 +02:00
Christoph Oelckers
783b94f922
- more warning fixes in 'core'.
2021-05-12 21:48:14 +02:00
Christoph Oelckers
03289f5097
- silenced some warnings.
2021-05-12 21:47:32 +02:00
Christoph Oelckers
e74aca291c
- position tweaking for Nam's skies.
...
Why is this such an utter mess to get skies placed correctly? :(
2021-05-10 20:13:28 +02:00
Christoph Oelckers
325af156e7
- fixed loop in ProcessBunch to account for array reallocation.
2021-05-08 09:16:06 +02:00
Christoph Oelckers
79823b430c
- reinstate the old code for rendering the first portal without stencil
...
The previous commit fixes the true issue causing the problems - with this back the restriction is not needed anymore.
2021-05-07 00:26:22 +02:00
Christoph Oelckers
b644000b02
- fixed texture y-flipping on bottom tiers of walls.
...
The flip flag was taken from the wrong side of the wall.
2021-05-07 00:18:13 +02:00
Christoph Oelckers
29b0106a96
- fixed yet another problem with the local 'sprite' variables in HWWall causing problems.
...
This variable and its companions in HWFlat and HWSprite have now been renamed to avoid these issues.
2021-05-07 00:09:30 +02:00
Christoph Oelckers
d206a767b2
- added render workaround for CP07.
2021-05-03 17:48:35 +02:00
Christoph Oelckers
d8b808576f
- restrict the sky portal shortcut to skies in scenes where there are no other portals.
...
This entire setup does not work with sector portals, causing various render glitches in Shadow Warrior's portals. This also applies to skies within portals so it is now restricted to single sky setups.
2021-05-03 14:52:23 +02:00
Christoph Oelckers
389340f97c
- use sections for rendering.
2021-05-03 00:15:09 +02:00
Christoph Oelckers
aa6bd8ffcc
- factor in angoff when placing sprites.
2021-04-25 11:58:03 +02:00
Christoph Oelckers
ad28630df6
- offloaded map patches to data files.
...
This is a lot easier to manage than having them in the code.
For now it piggybacks on the map hack feature, later this should use the same scripted approach as GZDoom.
2021-04-24 23:07:35 +02:00
Christoph Oelckers
a7046eaee4
- fixed animations on skies.
...
Lunatic Fringe made this very obvious.
2021-04-24 20:04:02 +02:00
Christoph Oelckers
5585351c0f
- added a hack to help the new renderer with Lunatic Fringe.
...
This is by no means a permanent solution but having it buys some time to find something more universal that won't affect performance too badly and investigate the need for a more robust solution.
The idea here is to define pairs of walls where when the first element of the pair is seen, it will treat the second one as view blocking.
This is used as the two offending windows (sectors 151 and 152) to cope with the lack of a height sensitive clipper.
2021-04-24 20:00:54 +02:00
Christoph Oelckers
be08a2f800
- clipper rework
...
* let the clipper work on relative angles to simplify the math.
* properly initialize the initial visible range and preserve it for multiple invocations.
* track the maximum visible angular range per sector. While possibly not sufficient to handle every edge case imaginable it has low overhead and is still useful to eliminate obvious cases that do not need more complex checks. It is enough to fix the blue door in Duke E3L4.
* removed unused elements of the clipper.
2021-04-24 12:08:38 +02:00
Christoph Oelckers
eb573bea23
- removed all compensation for the clamped shades.
...
None of this is needed, the shader can work with out of range shades to produce proper lighting.
2021-04-21 22:48:55 +02:00
Christoph Oelckers
dc0df7d081
- don't clamp shade values in the setup pass.
...
We need their proper values when setting up the lighting.
2021-04-21 22:32:27 +02:00
Christoph Oelckers
643b969dff
- added another weird Build specialty: no vertical sprite offset flipping for face sprites.
...
Just... why...? :?
2021-04-20 19:37:32 +02:00
Christoph Oelckers
be20b6a839
- fixed: wall sprites do not need NPOT emulation.
2021-04-20 16:58:18 +02:00
Christoph Oelckers
d078b511b8
- flip backwards oriented wall sprites before submitting them to the render list.
...
Backwards orientation will break the translucent object sorter so this needs to be sorted out beforehand.
2021-04-20 14:30:22 +02:00
Christoph Oelckers
ccdf9d13f1
- do not render sprites that are extremely close to the camera.
...
These can temorarily cover the entire screen so everything with a distance of less than 4 map units will now be skipped if it is a face sprite.
2021-04-20 00:15:11 +02:00
Christoph Oelckers
cdf89b9175
- portal rendering fix when viewing through two-sided walls outside the actual portal area.
...
If there's more portal area behind such a line its range in the clipper needs to be cleared again.
2021-04-17 18:32:40 +02:00
Christoph Oelckers
2b1072eb91
- fixed bad sector addressing in flat sprites drawer.
2021-04-14 19:17:40 +02:00
Christoph Oelckers
5c306c61d6
- better fix for shadow rendering.
2021-04-14 14:46:15 +02:00
Christoph Oelckers
89be30b720
- handle fullbright sprite hackery using negative shade values.
2021-04-12 18:57:10 +02:00
Christoph Oelckers
bf019ac028
- Build must draw the sky for completely closed sectors as well.
2021-04-12 16:31:44 +02:00
Christoph Oelckers
ef95754e87
- fixed bad texture checks.
2021-04-11 18:38:26 +02:00
Christoph Oelckers
42d02834b1
Merge branch 'master' into newrenderer2
...
# Conflicts:
# source/build/include/build.h
# source/build/src/polymost.cpp
# source/build/src/voxmodel.cpp
# source/core/gamecontrol.cpp
# source/core/gamestruct.h
# source/games/blood/src/animatesprite.cpp
# source/games/blood/src/misc.h
# source/games/blood/src/view.cpp
# source/games/duke/src/render.cpp
# source/games/sw/src/draw.cpp
# source/games/sw/src/game.h
# source/games/sw/src/jsector.cpp
# source/glbackend/glbackend.cpp
2021-04-11 14:38:56 +02:00
Christoph Oelckers
057b8a7354
- cleanup of bvectan family of functions.
...
This can be greatly simplified to a single bvectangbam function using atan2 directly.
2021-04-10 12:54:29 +02:00
Christoph Oelckers
35221188db
- inlined Clipper::PointToAngle
2021-04-10 10:56:11 +02:00
Christoph Oelckers
2e191f2742
- consolidated the SetLightAndFog code fragments.
2021-04-10 10:34:20 +02:00
Mitchell Richters
28fb752446
- Replace gethiq16angle()
with bvectangbam()
in renderer code. This addresses some observed clipping issues in the new renderer.
2021-04-10 09:23:02 +10:00
Christoph Oelckers
e0dc261dfd
- fixed edge case in wall sorter when the camera is exactly on a line that's being checked.
2021-04-10 00:05:29 +02:00
Christoph Oelckers
345275db5d
- better handling for portal lines having sloped back sectors.
...
This is a very ugly special case that probably needs a bit more work to get right, for now this should be enough as this combination is rather rare.
2021-04-09 22:48:16 +02:00
Christoph Oelckers
c9483353ff
- some more translucency checks.
2021-04-08 19:56:18 +02:00
Christoph Oelckers
1362a7ebc5
- added extended translucency support and did a bit of code consolidation.
2021-04-08 19:45:18 +02:00
Christoph Oelckers
38ecfc8fa5
- added handling for cubemapped skyboxes.
2021-04-08 12:47:31 +02:00
Christoph Oelckers
b68512ef88
- on closer inspection, do not draw skies on intra-sky lines ever - the renderer already takes care of this elsewhere.
2021-04-08 10:10:15 +02:00
Christoph Oelckers
d348377bd8
- when drawing skies on walls where both sides are sky, use the backside's texture.
...
This fixes a sky anomaly in RR's E1L1.
2021-04-08 09:45:17 +02:00
Christoph Oelckers
7a03967ceb
- fixed clipping info not properly reset when rendering the scene in two passes.
...
We need to reset the gotsector array for that, but since we also need the accumulate result of both passes there's now two such arrays.
2021-04-07 16:52:17 +02:00
Christoph Oelckers
caa8efd3d5
- fixed renderer to avoid bunches of walls that wrap around behind the camera's back.
2021-04-07 16:09:25 +02:00