Commit graph

901 commits

Author SHA1 Message Date
Magnus Norddahl
3a9373da6c Don't draw translucent stuff with indexed textures 2025-05-20 03:41:20 +02:00
Magnus Norddahl
ac335a5fbf Apply colormaps 2025-05-20 02:59:52 +02:00
Magnus Norddahl
990ce7c6c9 Render scene with indexed textures for vid_rendermode 2 2025-05-19 05:55:03 +02:00
Ricardo Luís Vaz Silva
56e94cc268 don't use per-pixel lighting for particles/visualthinkers 2025-05-17 22:56:51 +08:00
nashmuhandes
af7c9db9c5 GLDEFS light intensity and A_AttachLight intensity, VKDoom edition 2025-05-17 21:43:47 +08:00
Ricardo Luís Vaz Silva
60baa0fdaa allow toggling nearest dither 2025-05-17 13:36:21 +02:00
Magnus Norddahl
66d4d2d7d0 Add regular sky into the IsSky check 2025-05-16 00:32:49 +02:00
Ricardo Luís Vaz Silva
814eb8da77 flag only skies as skies 2025-05-16 00:29:39 +02:00
Magnus Norddahl
b281c333a1 Simplify the check in the inner loop 2025-05-16 00:11:33 +02:00
Magnus Norddahl
1c4c5d93ca Only move plane up if its a doom sky 2025-05-16 00:07:48 +02:00
Magnus Norddahl
51c6e8add6 Create VBO vertex data before the level mesh since the mesh uses it to build geometry.
Draw all sectors as subsectors if lightmaps are enabled (even if a sector doesn't have a tile initially it could gain one)
2025-05-15 23:53:34 +02:00
Magnus Norddahl
dfeec3c123 Hook up lm_always_update 2025-05-15 10:07:25 +02:00
Magnus Norddahl
23e4c46684 Restrict light-only changes to only happen in sectors with the SECF_LM_DYNAMIC flag 2025-05-14 13:26:10 +02:00
Magnus Norddahl
156d7e7af2 Correctly apply sunlight to line portals 2025-05-13 15:18:33 +02:00
Magnus Norddahl
0c0e29b18d Add sunlight to line portals 2025-05-13 14:38:35 +02:00
Magnus Norddahl
76fb5901d7 Only force baking of tiles where the geometry changed 2025-05-13 01:52:02 +02:00
Magnus Norddahl
398c9304b6 Enable background tile updates again 2025-05-13 00:27:42 +02:00
Magnus Norddahl
b27d094def Improve GetVisibleSurfaces performance 2025-05-12 22:43:30 +02:00
Magnus Norddahl
5d3f16b0d6 Only update VBO lightmap if its a full update 2025-05-12 13:41:51 +02:00
Magnus Norddahl
3127e2598a Implement the shadow and light list updates 2025-05-12 13:23:56 +02:00
Magnus Norddahl
5f3f51140f Remove debugging code 2025-05-12 12:10:08 +02:00
Magnus Norddahl
2c069349a3 Portal and high update count fixes 2025-05-12 00:39:41 +02:00
Magnus Norddahl
8bf31755df Update sectors and sides where light falls 2025-05-11 20:32:43 +02:00
Magnus Norddahl
6cf3cdb871 Make LevelMeshUpdater responsible for updating the tiles (playsim tells the mesh updater, the level mesh tells the tiles) 2025-05-11 20:11:18 +02:00
Magnus Norddahl
bfb37a89c3 Fix deactivated lightmap light not working 2025-05-11 17:58:07 +02:00
Magnus Norddahl
b61941b4a6 Add IsActive check in DoomLevelMesh::CreateLightList 2025-05-10 16:03:35 +02:00
Magnus Norddahl
ae33d583ad A hack is best solved by adding another hack on top. Everyone knows this. 2025-05-10 03:07:17 +02:00
Magnus Norddahl
6e5df8ef4c Fix the shadow data VBO not updating its lightmap UVs 2025-05-10 03:07:17 +02:00
Magnus Norddahl
737b7ece96 Dynamically allocate and free lightmap tiles 2025-05-10 03:07:17 +02:00
Ricardo Luís Vaz Silva
d5f5c71d67 Bone Getters Part 2/3, plus fixed warnings for MSVC
* add getters for frame poses

* fix missing joint in GetJointPose

* clean up models_iqm.cpp

* clean up usage of I_GetTimeFrac, split out matrix calculation into its own function

* clean up SetModelBoneRotationInternal

* clean up a few float <-> double and unsigned <-> signed warnings

* fix more warnings

* further clean up warnings

* split mode ObjectToWorldMatrix stuff

* initial work on bone getters, matrix hell

(the matrix/vec3 multiplications are probably wrong af, just gotta add more stuff 'till i can test it)

* clean up matrix math

* GetBone/TransformByBone

* fix GetBoneFramePose

* fix ObjectToWorldMatrix

* fix missing array resize

* raw matrix getters (for use with gutamatics/etc)

* reverse matrix mult order

* replace GetBoneLength/GetBoneDir with GetBoneBaseTRS

* fix GetBonePosition, remove GetBoneWorldMatrix as it's useless

* GetBonePosition

* deduplicate code

* rename GetBonePosition to GetBoneBasePosition to avoid confusion

* GetBoneBaseRotation

* GetBonePosition helper function

* forgot include_offsets
2025-05-10 08:42:20 +08:00
nashmuhandes
db8bdab669 Fix coronas duplicate-drawing sometimes 2025-05-03 07:01:11 +08:00
Ricardo Luís Vaz Silva
0efa138cca fix up merge issues 2025-05-02 17:19:07 -03:00
Ricardo Luís Vaz Silva
9aa44fa13b Merge branch '4.14.2' into gz_merge 2025-05-02 17:15:41 -03:00
Ricardo Luís Vaz Silva
99aa489d09 4.14.2 model refactor cherry pick
Some checks failed
Continuous Integration / macOS | Debug (push) Has been cancelled
Continuous Integration / Linux Clang 11 | Debug (push) Has been cancelled
Continuous Integration / Visual Studio 2022 | Debug (push) Has been cancelled
Continuous Integration / Linux GCC 12 | MinSizeRel (push) Has been cancelled
Continuous Integration / Linux GCC 9 | RelWithDebInfo (push) Has been cancelled
Continuous Integration / macOS | Release (push) Has been cancelled
Continuous Integration / Linux Clang 15 | Release (push) Has been cancelled
Continuous Integration / Visual Studio 2019 | Release (push) Has been cancelled
Continuous Integration / Visual Studio 2022 | Release (push) Has been cancelled
* split frame info calculation from RenderFrameModels

* clean up FindModelFrame

* refactor model overrides into its own function

* refactor frame rendering into RenderModelFrame

* split frame processing into ProcessModelFrame
2025-05-01 18:22:30 -04:00
Ricardo Luís Vaz Silva
8833126801 Bone Manip part 1 - bone setters
* split frame info calculation from RenderFrameModels

* clean up fvec4 being used as quat in iqms

* initial work on bone setting

* implement bone setters

* clean up FindModelFrame

* refactor model overrides into its own function

* refactor frame rendering into RenderModelFrame

* split frame processing into ProcessModelFrame

* refactor BoneOverride in preparation for translation/scale overrides

* clean up macros

* SetBoneTranslation/SetBoneScaling

* GetBoneOffset

* fix compilation on linux/mac (fuck you MSVC)

* fix typo 😅

* make sure bone overrides are cleared on model switches, add ClearBoneOffsets to clear them manually

* bone info getters

* fix joint lengths, add joint dirs

* serialize bone overrides

* fix bone dir return type

* GetBoneIndex/GetBoneCount

* helper functions for working with non-quat angles

* add mode enum, add more helper functions

* fix up formatting
2025-05-01 15:47:38 +02:00
Ricardo Luís Vaz Silva
3befb3f5e7 limit light alpha mult to renderflag 2025-04-29 15:49:55 -03:00
dileepvr
a2236c144e Ensure boolean to suppress compiler warning
Finally used `!!(...)` somewhere.
2025-04-29 07:56:19 -03:00
dileepvr
451b5cb5d9 Boolean op instead of mod with 2
`( ... & 1)` is simpler than `(... % 2 != 0)`.
2025-04-29 07:56:19 -03:00
dileepvr
4162c4b19e Fixed pitch culling in reflective flats for OoB Viewpoints
The vertical clipper needed viewpoint pitch sign to be flipped to work correctly. Only relevant for OoB viewpoints.
2025-04-29 07:56:19 -03:00
Magnus Norddahl
f360ae82cf Part of the patent-pending light list design in gzdoom keeps invalid lights in the light lists and you must check for that everywhere... 2025-04-26 17:03:46 +02:00
MajorCooke
9c1d45dd68 Added particle rendering to VisualThinkers.
To activate, use `SetParticleType(int type)`. To deactivate, use `DisableParticle()`.

Types are:
- PT_DEFAULT (default value; uses `gl_particles_style`)
- PT_SQUARE
- PT_ROUND
- PT_SMOOTH

While in this mode:
- `Texture` & `Translation` are ignored
- `Scale.X` sets the size
- `SColor` sets the color

Misc changes:
- Removed warning on textureless destruction
2025-04-09 14:30:04 -03:00
dileepvr
40aef53e26 Remove bitwise opeartion on bool
Visual Studio compiler was giving the warning:
`warning C4805: '|=': unsafe mix of type 'bool' and type 'int' in operation`
2025-04-09 14:28:10 -03:00
dileepvr
df724a8f08 Update hw_portal OoB height clip
Hopefully the last bug squash.
2025-04-09 14:28:10 -03:00
Dileep V. Reddy
bda5b7048d Handle sectors within sectors for stacked portals and plane mirrors (affects OoB only). 2025-04-09 14:28:10 -03:00
Dileep V. Reddy
190896ae1c Forgot to account for when both floor and ceiling of a sector are portals. 2025-04-09 14:28:10 -03:00
Dileep V. Reddy
8326d21cd0 Revert using older stencil method for stacked sectors (and reflective flats) if viewpoint is not allowed OoB. There was some bug with nearby skyplanes otherwise. 2025-04-09 14:28:10 -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
5ba6bd204f Small correction to OoB viewpoint stacked-sector portal visibility. OoB is not the same as Ortho. 2025-04-09 14:19:56 -03:00
Dileep V. Reddy
60157796c0 Stacked sector portals now render for OoB viewpoints. 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