Commit graph

81 commits

Author SHA1 Message Date
RaveYard
2dd7ad8eb2 WIP multiple probes support 2025-02-22 10:15:15 +01:00
Magnus Norddahl
3f01630b8a Render environment probe at player position 2025-02-16 19:03:45 +01:00
Magnus Norddahl
7a59234bb4 Add lm_dynlights CVAR for running dynamic lights entirely in lightmaps 2025-02-01 21:21:33 +01:00
Ricardo Luís Vaz Silva
9073fb8501 add shadowMinQuality property and gl_light_shadow_max_quality CVar 2025-01-03 07:30:54 +01:00
Boondorl
3a179ec1c6 Make coronas array global
Correctly collect all coronas to be drawn across all view points
2025-01-01 23:12:48 +01:00
nashmuhandes
83b988c76e Merge branch '4.13' of https://github.com/ZDoom/gzdoom 2024-10-16 02:31:44 +08:00
Rachael Alexanderson
ffcce790de
- Actor.GetSpecies() is a non-destructive function 2024-10-15 10:56:50 -04:00
Magnus Norddahl
4655b02f06 Fix using wrong surface for the extra BLAS structures for trace hits
Add gl_raytrace for ray tracing the level mesh
2024-09-05 00:15:59 +02: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
7e2d1da4a6 Add gl_shownormals cvar as enabling ssao and setting a specific debug level was a bit too obscure for this feature 2024-03-18 03:26:29 +01:00
Rachael Alexanderson
d8ef27e0ed
Squashed commit of the following:
commit ad25b50089b6e01b8e4291e34cfe3a008af9128d
Author: Rachael Alexanderson <madame-rachelle@users.noreply.github.com>
Date:   Fri Feb 9 12:12:46 2024 -0500

    Revert "Adding isometric camera mode with orthographic projection to current state of master branch of GZDoom."

    This reverts commit d2c2c93cf1.

commit 8537f0d8db804f0076b90daa66b750e44dccf44c
Author: Rachael Alexanderson <madame-rachelle@users.noreply.github.com>
Date:   Fri Feb 9 12:12:41 2024 -0500

    Revert "Changed all of the isometric functionality to mapinfo and playerinfo variables. Retained function of most of the CVars."

    This reverts commit dc897eacc0.

commit d45f6ebf11f31d246f2de4f3bbd11f7970783125
Author: Rachael Alexanderson <madame-rachelle@users.noreply.github.com>
Date:   Fri Feb 9 12:10:21 2024 -0500

    Revert "Restored r_orthographic behavior."

    This reverts commit 26908f5bc5.

commit be0836feef9b95f12828eeed4319c726ef13780d
Author: Rachael Alexanderson <madame-rachelle@users.noreply.github.com>
Date:   Fri Feb 9 12:09:15 2024 -0500

    Revert "Adding isometric camera mode with orthographic projection to current state of master branch of GZDoom."

    This reverts commit 08b03e6b19.

commit 688288a9199b912203022cb4db37503f6270e0c3
Author: Rachael Alexanderson <madame-rachelle@users.noreply.github.com>
Date:   Fri Feb 9 12:09:06 2024 -0500

    Revert "Changed all of the isometric functionality to mapinfo and playerinfo variables. Retained function of most of the CVars."

    This reverts commit d3405837ce.

commit 72b7df9fa1841d665c2846dd31a89c6f48123e55
Author: Rachael Alexanderson <madame-rachelle@users.noreply.github.com>
Date:   Fri Feb 9 12:08:59 2024 -0500

    Revert "Restored r_orthographic behavior."

    This reverts commit e171f4eb6a.

commit aa954132bf29f2f8a51bf09dae127e5ffe2c5670
Author: Rachael Alexanderson <madame-rachelle@users.noreply.github.com>
Date:   Fri Feb 9 12:08:48 2024 -0500

    Revert "Merged with latest master and made small change (zcenter -> center.Z) to hw_sprites.cpp. Now compiles and works."

    This reverts commit c8a7507e8e.

commit 3ce90e87a3a9956b615995b57b90619e89bbcff4
Author: Rachael Alexanderson <madame-rachelle@users.noreply.github.com>
Date:   Fri Feb 9 12:00:46 2024 -0500

    Revert "Cleaning up implementation of isometric camera with optional orthographic projection."

    This reverts commit 25f1407228.

commit 3aafd363e40c8d1d2ebbe3c61aeb2b80a74e565a
Author: Rachael Alexanderson <madame-rachelle@users.noreply.github.com>
Date:   Fri Feb 9 11:59:25 2024 -0500

    Revert "Small change to SpectatorCamera actor."

    This reverts commit 2b555d7556.

commit a41911f8907731c098de71ca3e14261ac432ec8c
Author: Rachael Alexanderson <madame-rachelle@users.noreply.github.com>
Date:   Fri Feb 9 11:59:16 2024 -0500

    Revert "SpectatorCamera can now follow the 'tracer' actor. Also added a 'lagdistance' property for lazy follow."

    This reverts commit 7fbb4cd06c.

commit 19398edd065b7b483b8c7be42cb16026695e241a
Author: Rachael Alexanderson <madame-rachelle@users.noreply.github.com>
Date:   Fri Feb 9 11:59:05 2024 -0500

    Revert "Minor addition toe SpectatorCamera. Added three chase modes to lazy follow. 0: Catch up until tracer is centered again. 1: Same but don't move if tracer isn't moving (camera moving when character is not is jarring). 2: Stop chasing if tracer is closer than lagdistance. Game modes benefit from a 'center camera' button but that doesn't have to be hard-baked into the engine."

    This reverts commit c3ca564cfc.
2024-02-09 12:15:17 -05:00
Major Cooke
3f72f8acd5 Fixed psprites & viewpos being completely broken for non-isometric mode.
This line of code was altering a global cvar.
2024-02-03 11:22:16 -05:00
Dileep V. Reddy
25f1407228 Cleaning up implementation of isometric camera with optional orthographic projection.
All CVars, mapinfo variables, and playerinfo/playerpawn variables are gone.
A Camera actor named 'SpectatorCamera' is defined in warsrc/static/zscript/actors/shared/camera.zs

The following new flag bits were defined in the 'DViewPosition' struct for use with actor->ViewPos in src/playsim/actor.h:
	VPSF_ALLOWOUTOFBOUNDS =		1 << 3,			// Allow viewpoint to go out of bounds (hardware renderer only).
	VPSF_ORTHOGRAPHIC =		1 << 4,			// Use orthographic projection.
	VPSF_ISOMETRICSPRITES =		1 << 5,			// Displace sprites towards camera and don't billboard (drawn from isometric perspective).

Basically, spawn a SpectatorCamera actor with the appropriate flags and set it to player.camera.
See example template: https://www.mediafire.com/file/fv8rytayjt9l6g1/isometric_actor_wads.zip/file

Has been tested with multiplayer death and disconnection (and respawns). Not tested with portals.
Still only works with hardware renderer (mostly). But should be compatible with older mods and libraries.
2024-02-01 08:43:34 -05:00
Dileep V. Reddy
e171f4eb6a Restored r_orthographic behavior. 2024-01-21 12:13:42 -05:00
Dileep V. Reddy
d3405837ce Changed all of the isometric functionality to mapinfo and playerinfo variables. Retained function of most of the CVars. 2024-01-21 12:13:42 -05:00
Dileep V. Reddy
08b03e6b19 Adding isometric camera mode with orthographic projection to current state of master branch of GZDoom. 2024-01-21 12:13:42 -05:00
Rachael Alexanderson
af08413e10
- reverting pull request #2361 - apparently pull request #2364 changed some behaviour and these two do not play nice together. One or the other unfortunately has to be rolled back to allow GZDoom to build properly again.
Revert "Restored r_orthographic behavior."

This reverts commit 26908f5bc5.

Revert "Changed all of the isometric functionality to mapinfo and playerinfo variables. Retained function of most of the CVars."

This reverts commit dc897eacc0.

Revert "Adding isometric camera mode with orthographic projection to current state of master branch of GZDoom."

This reverts commit d2c2c93cf1.
2024-01-21 08:18:16 -05:00
Dileep V. Reddy
26908f5bc5 Restored r_orthographic behavior. 2024-01-21 03:34:00 -05:00
Dileep V. Reddy
dc897eacc0 Changed all of the isometric functionality to mapinfo and playerinfo variables. Retained function of most of the CVars. 2024-01-21 03:34:00 -05:00
Dileep V. Reddy
d2c2c93cf1 Adding isometric camera mode with orthographic projection to current state of master branch of GZDoom. 2024-01-21 03:34:00 -05:00
Magnus Norddahl
ac212e0147 Use HWFlat for ceilings and floors 2023-12-26 04:30:57 +01:00
Magnus Norddahl
47f17b1c03 Move DrawLevelMesh to RenderState 2023-12-26 04:30:57 +01:00
Magnus Norddahl
3cff0de273 Turn off gl_levelmesh 2023-10-19 22:37:17 +02:00
Magnus Norddahl
dec03cb265 Fix compile errors after rebase 2023-10-19 22:16:11 +02:00
Magnus Norddahl
05e46e0cb4 Fix DrawLevelMesh bugs 2023-10-19 22:10:26 +02:00
Magnus Norddahl
fc65d43ae8 Add code that should draw the mesh 2023-10-19 22:09:26 +02:00
Magnus Norddahl
6dd72e5439 Begin code for drawing the level mesh 2023-10-19 22:09:26 +02:00
Magnus Norddahl
52ec71b05b Remove allowSSBO, useSSBO, glslversion, hwcaps and BuffersArePersistent as none of them apply to Vulkan 2023-10-19 21:31:12 +02:00
Magnus Norddahl
5e3d6e39a0 Merge gl_light_shadowmap and gl_light_raytrace cvars as gl_light_shadows
Rename gl_shadowmap_filter to gl_light_shadow_filter as it applies to raytraced shadows as well
2023-10-15 16:14:00 +02:00
dpjudas
411b281e7c Remove multithreading RenderState as that seemed to be a poor approach 2023-10-09 03:20:19 +02:00
RaveYard
adfc7082f5 Remove hacks associated with SetLevelMesh 2023-09-11 14:44:17 +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
RaveYard
139ce34535 WIP refactoring of surface gathering 2023-09-10 23:42:00 +02:00
RaveYard
1466eeefc0 Fix off by one 2023-09-10 23:42:00 +02:00
RaveYard
fd4b3a8e73 Update lightmapper and add limiter to updates 2023-09-10 23:42:00 +02:00
RaveYard
b163901862 WIP partial lightmapping 2023-09-10 23:42:00 +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
1fd14f1140 Remove FFlatVertexBuffer 2023-05-08 23:12:14 +02:00
Magnus Norddahl
1d8f406162 Let the backend manage the shadowmap buffers 2023-05-01 02:10:43 +02:00
Magnus Norddahl
d7a7953d10 Move bone buffer to backend 2023-04-30 04:49:06 +02:00
Magnus Norddahl
f2585a3b17 Manage the light buffer in the backend 2023-04-30 03:43:38 +02:00
Magnus Norddahl
aadb1c31b6 Manage viewpoint buffer internally in the backend 2023-04-30 02:32:04 +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
Magnus Norddahl
640c86d0c7 Build a mesh cache for all sectors 2023-04-26 01:09:05 +02:00
Magnus Norddahl
6894eb013f Begin removing binding points from the hwrenderer layer.
Well known buffers should be created and managed by the backend, otherwise the backend just becomes an OpenGL emulator.
2023-04-16 19:30:27 +02:00
Christoph Oelckers
bafd6be342 - removed backend dependencies on game data. 2023-01-15 08:23:26 +01:00
Magnus Norddahl
181eda0a83 Fix canvas textures getting clipped by wrong scissor box 2022-10-28 18:01:59 -04:00
Shiny Metagross
08f520f1c6 IQM Support Implemented
More info to come
2022-10-19 22:48:57 +02:00