Commit graph

20 commits

Author SHA1 Message Date
James R
5415674034 debugfinishline: highlight deathpits and instakill planes 2023-10-04 20:17:31 -07:00
James R
39ea73a4ad devmode render: display skybox portal, visplane and drawseg counts on HUD
- Skybox portal count moved from console print to HUD
- Displays visplane count and drawseg count
2023-04-08 00:40:37 -07:00
James R
4e79b4ead2 Set portal clipping in R_RenderSegLoop
Previously, line-based portals accessed global
ceilingclip/floorclip before the current seg was rendered.
This means clipping for such portals would be based on
whichever seg happened to render before. Additionally,
ceilingclip/floorclip have more to do with clipping the
visplanes than the height of the wall between (for
instance, using these values doesn't work for two-sided
lines that create a "window" between the planes). The
correct approach that should always work is using the
midtexture's height from inside of R_RenderSegLoop.
2023-04-03 01:12:26 -07:00
James R
20692de47a Replace portalline boolean with g_portal pointer to current portal 2023-04-03 01:11:57 -07:00
Eidolon
04a6132f66 software: Skip precip mobjs in sky portal renders 2023-03-25 22:47:12 -05:00
toaster
336010e616 Fix portals
- Resetting portalcullsector fixes the major visual glitches

- Using 32 bits for nummasks and i fixes crashes when rendering lots of portals

# Conflicts:
#	src/r_main.c
2022-03-18 20:44:07 +00:00
James R
d06355018d Track skybox within player struct
TODO: Lua

Splitscreen and change viewpoint uses the proper skyboxes!
2022-01-17 22:46:01 -08:00
James R
2274129f57 Update copyright year to 2020 2020-02-19 14:08:45 -08:00
Jaime Passos
463e2567fe Restore portal culling code that went gone by pure accident 2019-12-11 11:35:34 -03:00
Steel Titanium
a5cdb0a4b3 Update copyright date on source files 2019-12-06 13:49:42 -05:00
Nev3r
0c3f273745 Properly take skybox viewpoint angle into account. 2019-06-11 14:47:58 +02:00
Nev3r
c5c4744652 Remove remnants of portalcullsector. 2019-06-10 17:13:04 +02:00
Nev3r
b7e2b5612c Made Portal_Add static; move ffloors clip reset from R_RenderPlayerView to r_plane. 2019-06-09 22:48:54 +02:00
Nev3r
b8d2e017b4 Refactored a bit of code regarding visplane bound trimming for portals; reset ffloor's f_clip/c_clip so that FOFs on portals don't interfere with previously acquired bounds. 2019-06-07 13:10:12 +02:00
Nev3r
ebe0586993 Add pad checks for visplanes; invalidate invalid columns from visplanes (visplane renderer and column renderers don't speak exactly the same language).
The visplane portal top boundary offset has been restored since all known bugs involving it have been fixed.
2019-06-06 11:26:13 +02:00
Nev3r
819169f378 Vissprite clipping improvements.
Vissprites are now only clipped against their respective portal's geometry obtained from their BSP run.
Additionally, if a portal is provided, they're clipped to the portal's clip boundaries.
The work on this branch should conclude after a pair of remaining glitches are fixed.
2019-06-05 18:07:08 +02:00
Nev3r
906b366e1b Masked elements are now fully grouped individually for each portal/view; fixed viewz-related glitches,.
The drawnodes are now fully grouped in separate lists, and then sorted individually. This fixes sorting problems caused by portals belonging to differently perceived scales (skyboxes for example).

Drawsegs and vissprite/drawnode sorting require the viewz, so the viewz is stored for each portal/view, and then restored when needed; without this, the rendering process erroneously sorts the elements, and draws some at wrong positions.
2019-06-05 12:10:59 +02:00
Nev3r
a1f429030c Set a default frontscale for visplane portals.
I don't know whether this is necessary or not but I'm poking blindly trying to fix the sorting issues for now.
2019-06-04 21:04:35 +02:00
Nev3r
ae1e3630f8 Add visplane portal creation functionality and use it to replace the skybox rendering.
The skybox rendering process has been replaced with portals instead. Those are generated after the first BSP tree pass by looking for existing sky visplanes at the time, and their windows are used to define new portals.
The skybox portals are still incomplete and cause visual glitches when masked elements are involved.
2019-06-02 00:07:55 +02:00
Nev3r
7e1bb4a370 Code refactoring to turn portal struct into a more generalized shape.
Split portal-related code to its own source files.
Most of the 2-line-specific setup has been moved to the function which adds a 2-line case. The portals should render as they used to so far, anyway.
2019-06-01 13:07:23 +02:00