Commit graph

57 commits

Author SHA1 Message Date
Ricardo Luís Vaz Silva
9aa44fa13b Merge branch '4.14.2' into gz_merge 2025-05-02 17:15:41 -03:00
Dileep V. Reddy
c7d25f1452 Addressing some small regression by conditioning a few calculations on OoB viewpoints. Branching Frustum calculation to old method. 2025-04-09 14:19:56 -03:00
Dileep V. Reddy
a0f3ed11cd Reflective flats now work with OoB viewpoints, including ortho. Had to create a new type of portal stencil for the HWPlaneMirrorPortal. Stacked sector portals could be made to work the same way, but there are clipper issues, revealing out-of-view sections of the map on the other side. Hence sector portal rendering is still disabled in OoB viewpoints. 2025-04-09 14:19:55 -03:00
Dileep V. Reddy
e73c283a97 Making 3D-floors respond to r_dithertransparency properly. 2025-04-09 14:19:55 -03:00
Dileep V. Reddy
8a66eff437 Added visual rendering for LinePortals and SkyPortals for OoB viewpoints. SkyPortals will be stenciled, and will always use perspective projection. Disabled interpolation when portalgroup changes (portal transition occurs) if viewpoint is OoB (was necessary for fog of war when r_radarclipper is set to true). Tightened up radar clipper by making it more aggressive. Voided walls wont' get filled in by a floor or ceiling sky (because of the stencil). Ceiling sky will be half-infinitely tall upwards, and floor sky will be half-infinitely tall downwards. Use only floor skies and a good GLSKYBOX for top-down/isometric cameras. Level.ReplaceTextures("F_SKY1", "SKY1", TexMan.NOT_FLOOR); (zscript) is a nice trick for WorldLoaded(). 2025-04-09 14:19:55 -03:00
Dileep V. Reddy
6c93c3d564 Allow portal rendering and sky rendering (with stencils) and reflective flats with OoB and Ortho viewpoints. Works with r_radarclipper too. 2025-03-13 03:07:46 +08:00
nashmuhandes
1770bbc0d0 Merge branch 'master' of https://github.com/ZDoom/gzdoom into gzd-master-experimental 2024-11-15 00:42:38 +08:00
Ricardo Luís Vaz Silva
9466c2d138 remove unecessary allocations 2024-11-13 15:47:22 -03:00
Ricardo Luís Vaz Silva
174344ddf1 move visual thinker definition into its own header 2024-11-13 15:47:22 -03:00
nashmuhandes
5464090800 Merge branch 'post-4.13' of https://github.com/madame-rachelle/gzdoom into gzd-master-experimental 2024-11-05 21:51:43 +08:00
Dileep V. Reddy
85cefd8516 Limiting r_radarclipper effect to Out-of-Bounds viewpoints only. Opens the possibility of leaving it true by default in the future. 2024-11-03 20:38:12 -05:00
Rachael Alexanderson
7980d351b7
Merge branch '4.13' of ../gzdoom into gz4.13.1-merge 2024-10-20 10:25:15 -04:00
dileepvr
131ce183db
Missed a line in RenderOrthoNoFog
Tying up the fov fix.
2024-10-18 03:35:28 -04:00
dileepvr
6e7148b074 Missed a line in RenderOrthoNoFog
Tying up the fov fix.
2024-10-18 03:34:29 -04:00
nashmuhandes
fa0a88f85e Merge branch 'master' of https://github.com/ZDoom/gzdoom 2024-09-11 00:11:39 +08:00
Dileep V. Reddy
aacc4d7278 PointToPseudoPitch() was being called even when viewpoint was not allowed out of bounds. And its sqrt was slow even when it was necessary (thanks dpjudas for the speedup code). 2024-09-10 10:58:36 -04:00
dileepvr
95b264bdb6
Isometric Mode and Robin (#2618)
* Feature-complete isometric mode fork.

* Dithered transparency condition tweaks.

* Dithered transparency for non-corpse monsters only (and missiles).

* SpectatorCamera vertical shift.

* Including math.h in hw_sprites.cpp to keep visual studio happy (it couldn't find M_SQRT2 definition).

* Defining MY_SQRT2 in hw_sprites.cpp to keep visual studio happy (it couldn't find M_SQRT2 definition).

* Defining MY_SQRT2 in r_utility.cpp also to keep visual studio happy.

* retrigger checks

* Have correct sprite angle-frame face the camera with orthographic projection enabled.

* Dithered Transparency now works properly on 3D floors. Moved that dither-trans flag setting code within hw_bsp.cpp to handle double-processing of linedefs. Added helper functions to FRenderViewpoint class 'bool IsOrtho()' and 'bool IsAllowedOoB()' to clean up checks everywhere in the code.

* Fixed indents. Added bbox property to subsector struct and use it instead of BSP nodes and Clippers (creating a bbox around viewpoint and checking for overlap) in orthographic mode when no fog of war is active. Turns out to be much faster. Though you need really big maps (Winter's Fury MAP01) to see a difference in fps.

* Non-linux checks don't like uint. Changed to unsigned int.

* Small change of a float to camera.zs. Ignore for testing. Should make no difference.

* Update actor.h to remain mergeable

RF2_NOMIPMAP was introduced, so I had to displace RF_ISOMETRICSPRITES to next bit.
2024-08-11 10:04:40 -04:00
Dileep V. Reddy
8a5e7449c1 Consolidated isometric mode commits. 2024-08-11 15:55:21 +02:00
Magnus Norddahl
805bce1166 Merge remote-tracking branch 'gzdoom/master' 2024-01-10 04:03:35 +01:00
Ricardo Luís Vaz Silva
35e56d3f42 Minor optimizations to VisualThinker
* remove duplicated fields
* make native functions use direct calls
* remove unnecessary pointer from particle_t
* create HWSprite directly in Construct
2024-01-06 20:06:57 -05:00
Magnus Norddahl
73ada7f84b Merge remote-tracking branch 'gzdoom/staging' 2024-01-02 17:10:47 +01:00
Magnus Norddahl
ac212e0147 Use HWFlat for ceilings and floors 2023-12-26 04:30:57 +01:00
Rachael Alexanderson
4b54aac288 - rename ZSprites to VisualThinkers 2023-11-22 12:11:57 -05:00
Major Cooke
8fcd2c5f43 Fixed compilation with CI 2023-11-17 08:06:11 -05:00
Major Cooke
48e7c2d994 - Proper heap handling of HWSprite pointer
- Added `Construct()` method and ensure it's called when created from any means
2023-11-17 08:06:11 -05:00
Major Cooke
b6b1b25035 Added ZSprites.
- Effectively similar to Actors, but without the excess.
- Can be created with either the `level` function or the static `Spawn` function in ZSprite.
- STAT_SPRITE belongs to ZSprites only; ZSprites cannot be moved out of, nor can anything else be moved in to, this statnum.

Misc:

- Fixed (Sprite)Offset taking roll into account.

Crediting phantombeta, RicardoLuis0 and RaveYard for assistance.
2023-11-17 08:06:11 -05:00
Magnus Norddahl
e75e5a387b Merge remote-tracking branch 'gzdoom/master' into merge-gzdoom 2023-10-19 21:05:17 +02:00
Christoph Oelckers
9cd57faec1 rewrite of HWWalls to allow grabbing the output from the render item generator. 2023-10-19 18:35:51 +02:00
dpjudas
411b281e7c Remove multithreading RenderState as that seemed to be a poor approach 2023-10-09 03:20:19 +02:00
Christoph Oelckers
89535b803a Backend update from Raze. 2023-10-07 18:42:24 +02:00
Magnus Norddahl
d9b066ad37 Move the visible surface list to HWDrawInfo 2023-09-15 20:45:03 +02:00
RaveYard
06d137e4da Skip portal and sky surfaces 2023-09-14 15:14:59 +02:00
RaveYard
7cd33cc060 Optimize which surfaces are passed to lightmapper 2023-09-14 15:14:59 +02:00
RaveYard
5912a2c30b Remove awful hardcoded byte offset hack 2023-09-10 23:42:00 +02:00
RaveYard
6f44e2b5d4 Change surfaceIndices to surfaces 2023-09-10 23:42:00 +02:00
RaveYard
d96d1aeffc Visible surfaces are gathered in processing (gathering) render phase and lightmaps drawn before rendering 2023-09-10 23:42:00 +02:00
Magnus Norddahl
362dc63fc1 Add support for gl_multithread while gl_meshcache is active
Stop building geometry for lines that have a portal (when gl_meshcache is active)
2023-07-04 02:23:07 +02:00
Magnus Norddahl
3be36b3aa3 Hook up portals to gl_meshcache 2023-07-04 01:16:17 +02:00
Magnus Norddahl
a7f4971d5d Add HWDrawContext so that multiple threads can maintain their own drawinfo without need for synchronization 2023-06-29 03:33:07 +02:00
Magnus Norddahl
7bdf3f7364 Create a RenderState object for each thread 2023-05-17 22:39:22 +02:00
Magnus Norddahl
154cb2e967 Prepare FFlatVertexBuffer for removal 2023-05-07 03:19:43 +02:00
Magnus Norddahl
87c3be94d5 Adjust meshbuilder to vkdoom changes and make sure the drawinfo functions always allocate vertices from the output renderstate object 2023-04-26 04:22:07 +02:00
Christoph Oelckers
2c7761926e - removed volatile type punning for clipping against line portals.
This now uses a common base for line_t and HWLinePortal.
2022-07-14 10:39:11 +02:00
Christoph Oelckers
1ba4dfbfa8 - fixed setup of PolyBSPs when the software renderer is active.
Some needed initialization was still in the hardware renderer and not the data creator.
2022-04-15 23:59:43 +02:00
nashmuhandes
15159a3c19 Add sprite shadows for the hardware renderer 2021-04-24 22:40:54 -04:00
Christoph Oelckers
8feba7dff9 - fixed: line portal rendering PR was missing handling for portals with z offset.
Since it used the back sector's height directly the needed offsetting was not applied to the upper and lower texture.
2021-03-05 17:19:02 +01:00
Timothy Quinn
a15216c90f - fixed rendering of one-sided line portals in the hardware renderer
# draw upper and lower textures when the back sector does not properly match
# do not draw middle textures on portal lines
# minor optimization to 'is***Portal' functions to avoid memory access in the most common case of no portal being present.
2021-03-05 12:02:31 +01:00
Christoph Oelckers
5d10d6c448 - directory structure cleanup.
The hwrenderer folder did not contain sufficient files anymore for such extensive subgrouping.
2020-04-29 17:36:58 +02:00
Christoph Oelckers
6cf91d3941 - moved the remaining core parts of the GL renderer to 'common'. 2020-04-29 17:19:17 +02:00
Christoph Oelckers
69d724ae73 - moved lightbuffers and flatvertices to 'common'. 2020-04-26 12:41:13 +02:00