Commit graph

239 commits

Author SHA1 Message Date
Christoph Oelckers
4928187b02 - handle the RR geometry hack 2021-12-25 21:28:57 +01:00
Christoph Oelckers
b30be9bc12 - unlimited blockingpairs 2021-12-25 21:28:50 +01:00
Christoph Oelckers
d5c27e6239 - unlimited the bit arrays for the automap and the bunch drawer, removed some leftover constants/declarations. 2021-12-25 21:28:50 +01:00
Christoph Oelckers
eeabe0fe6d - fixed culling of mirrored voxels for real this time. 2021-12-15 21:19:42 +01:00
Christoph Oelckers
8cb871e5ff - fixed: voxel culling must take sprite flipping into account. 2021-12-14 13:43:24 +01:00
Christoph Oelckers
7546cf3a4b - replaced vec3f_t with FVector3. 2021-12-14 09:58:01 +01:00
Christoph Oelckers
a899055f50 - fixed: in palette emulation mode, assume all textures to be non-translucent.
These need to force an alpha test, which is disabled for textures with translucent texels.
2021-12-13 10:35:03 +01:00
Mitchell Richters
2253a418c7 - Tidy up some of the indentations that were badly resolved in the previous commits merge conflict. 2021-12-13 07:39:01 +11:00
Christoph Oelckers
054d81fc8e - fixed logic for discarding walls in new renderer.
The case being checked here may decide not to add the wall to the clipper but it must still be rendered.
Information for determining visibility is not sufficient in case of sector overlaps which can happen with rotating doors or poorly set up sector objects.

# Conflicts:
#	source/core/rendering/scene/hw_bunchdrawer.cpp
2021-12-12 19:40:17 +01:00
Christoph Oelckers
c2f29b8849 - fixed OOB write in section splitting code. 2021-12-12 09:42:45 +01:00
Emile Belanger
9501215ef2 Revert "- disabled palette emulation for the GLES backend."
This reverts commit 8d9d3d5f8f.
2021-12-11 13:23:39 +01:00
Christoph Oelckers
f765783437 - various small bits of cleanup. 2021-11-29 00:57:11 +01:00
Christoph Oelckers
6cec61683d - fixed incorrectly placed tileUpdatePicnum call in new renderer for sprites.
This was only in the regular sprite call and did not affect models or voxels.
2021-11-29 00:57:10 +01:00
Christoph Oelckers
35c2d6d14e - fixed translucent voxel rendering. 2021-11-29 00:57:10 +01:00
Christoph Oelckers
9b6d6eb7f9 - sector[] in render interface 2021-11-29 00:56:30 +01:00
Christoph Oelckers
adf3133fdc - use sectnum and wallnum to get an index from pointers instead of subtracting the array base. 2021-11-29 00:56:26 +01:00
Christoph Oelckers
01abe7b2ac - addressed most unused/uninitialized variable warnings from MSVC. 2021-11-29 00:55:30 +01:00
Christoph Oelckers
f7fdc5af41 - address several warnings reported by GCC 11. 2021-11-29 00:55:29 +01:00
Christoph Oelckers
83fe41e71e - made updatesector receive a 32 bit int pointer and deprecated the 16 bit variant. 2021-11-06 15:53:16 +01:00
Mitch Richters
b02a6a3ec9 - Replace MIN() from templates.h with version provided in STL. 2021-10-30 10:36:15 +02:00
Mitch Richters
9894729fc2 - Replace MAX() from templates.h with version provided in STL.
# Conflicts:
#	source/common/textures/hw_ihwtexture.cpp
#	source/common/utility/templates.h
2021-10-30 10:36:02 +02:00
Christoph Oelckers
62d0d3712e - use a sprite flag to mark mapped sprites.
This avoids another global array which needs to be addressed by sprite index.
2021-10-14 15:09:43 +02:00
Christoph Oelckers
8d9d3d5f8f - disabled palette emulation for the GLES backend.
Right now the shader does not support it and will require significant redesign to work well with the target hardware.
2021-10-13 00:09:18 +02:00
Christoph Oelckers
83944a7191 - fixed uninitialized light index variable for floor sprites. 2021-10-11 22:28:26 +02:00
Christoph Oelckers
29769dd673 - fixed engine code warnings pointed out by XCode 13. 2021-10-08 19:06:41 +02:00
Christoph Oelckers
0d4e0d72fb - fixed vertex generation when splitting walls by planes on old hardware. 2021-09-18 13:04:46 +02:00
Christoph Oelckers
7f485bfab1 - split off the extended sprite flags into their own word.
Some code overwrites the cstat field entirely (thanks Duke, for being sloppy with this...!)
2021-09-12 18:26:35 +02:00
Christoph Oelckers
99ecfe133d - flag sprites for automapping regardless of the 'automapping' variable's value.
Duke should show its floor sprites, too.
2021-09-12 18:22:38 +02:00
Christoph Oelckers
62a5a720e8 - Check for maps with bad setup of their wall lists.
Lo Wang In Time's map 11 does not include wall 0 into its sector, which caused crashes when trying to triangulate this sector.
2021-07-06 10:29:24 +02:00
Christoph Oelckers
0069af02e7 - use a slightly higher depth bias for translucent elements.
These can otherwise cause z-fighting when being used with non-translucent floor and wall sprites.
2021-06-13 09:39:07 +02:00
Christoph Oelckers
9d36e61d3f - depth bias fixes. 2021-06-09 00:47:13 +02:00
Christoph Oelckers
a32489be31 - wall sprite positioning tweaks.
Turns out that a distance of one Build unit from a wall alone is not enough to render them glitch-free, some depth bias is still needed.
2021-06-09 00:31:54 +02:00
Christoph Oelckers
f96521a7f4 - fixed: Floor sprites must set their view orientation.
The translucent element sorter needs this to operate properly.
2021-06-02 20:32:35 +02:00
Christoph Oelckers
3c5ef9c8e6 - properly render geometry that's fully shrouded in fog. 2021-06-01 21:48:39 +02:00
Christoph Oelckers
2e9732ce79 - fixed new renderer's use of fog on skies: The palette value from the wall was used instead of the one from the sky plane. 2021-05-29 12:09:16 +02:00
Christoph Oelckers
8aed9063f8 - sector splitting hack for SW $bath.map. 2021-05-23 17:06:47 +02:00
Christoph Oelckers
264d42179e - optimized the wall drawer a bit to avoid repeated calls to the render API's deoth bias function.
The setters in FRenderState should check if the value actually changes and the wall drawer should only call it for non-translucent wall sprites.
2021-05-21 19:07:22 +02:00
Christoph Oelckers
4bb57cfab5 - fixed flickering floor sprites.
The SetDepthBias call was somehow gotten lost.
2021-05-21 19:03:39 +02:00
Christoph Oelckers
f7a424cd06 - fixed precision issues with GetClosestPointOnWall for orthogonal lines.
The math failed for some large wall sprites (e.g. Blood E2M4, sprite #181), and in orthogonal cases it is better anyway to perform direct checks of the coordinates
2021-05-21 18:25:30 +02:00
Christoph Oelckers
24dbfc7827 - fixed BunchInFront to do a more thorough comparison in case it encounters colinear walls. 2021-05-21 14:32:01 +02:00
Christoph Oelckers
079a95a0a3 - use a higher depth bias for non-orthogonal wall sprites.
Due to minor angular inaccuracies they are more sensitive to z-ordering than orthogonal ones when things are closely stacked.
2021-05-21 14:32:01 +02:00
Christoph Oelckers
be97ee04f9 - re-enable flat sprite rendering.
This was commented out for testing but forgotten afterward.
2021-05-20 19:21:14 +02:00
Christoph Oelckers
5cfd810311 - new renderer: take fog properties for walls and ceilings from the proper elements. 2021-05-20 19:17:21 +02:00
Christoph Oelckers
b5358bc03c - fixed typo in wall sprite offsetting code. 2021-05-20 18:25:19 +02:00
Christoph Oelckers
d4eb54d686 - render free standing wall sprites without depth bias.
Otherwise they can end up badly ordered with walls.
2021-05-20 12:36:35 +02:00
Christoph Oelckers
e99567cd70 - fixed bad array of arrays access in sector splitting code. 2021-05-20 00:30:54 +02:00
Christoph Oelckers
5fd41ab910 - new renderer: draw the fog layer for skies.
Code was active but alpha wasn't set.
2021-05-18 00:42:45 +02:00
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