Commit graph

1,055 commits

Author SHA1 Message Date
Dileep V. Reddy
e9a067dd65 Skymist is a third sky layer with transparency, and adopts the fade color and skyfog density. Size not connected to SKY1 or SKY2. Works with 6-sided skyboxes. Three template pngs (skymist1, 2, & 3) all 1x544 pixels, 8-bit grayscale with transparency are part of gzdoom.pk3 for general usage. Can supply custom lump through mapinfo. Console command 'skymisttoggle' shows the effect (make sure fade has a non-zero color in mapinfo and skyfog has non-zero density). Oh, and skyfog now works with 6-sided skyboxes. 2025-05-06 11:47:45 -03:00
Dileep V. Reddy
502af6adb9 SSECMF_DRAWN was being skipped for some cases, affecting texture automap drawing. See bug #3066. 2025-05-02 09:37:59 -04:00
Ricardo Luís Vaz Silva
3780c5910a
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 10:15:46 -03:00
Ricardo Luís Vaz Silva
c0d17bbda3 limit light alpha mult to renderflag 2025-04-29 15:47:28 -03:00
dileepvr
701d1f71d1 Ensure boolean to suppress compiler warning
Finally used `!!(...)` somewhere.
2025-04-20 16:38:52 -03:00
dileepvr
34451c9acd Boolean op instead of mod with 2
`( ... & 1)` is simpler than `(... % 2 != 0)`.
2025-04-20 16:38:52 -03:00
dileepvr
e199fd11d5 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-20 16:38:52 -03:00
Ricardo Luís Vaz Silva
a43b99bf51 further remove manual memory management 2025-04-16 23:45:16 -03:00
Gene
9e32e58c8f Try TMap 2025-04-07 04:21:35 -07:00
Gene
20c234b90f Scrap dlight lighthead link lists 2025-04-06 13:06:57 -07:00
Dileep V. Reddy
da6730d0a7 Addressing some small regression by conditioning a few calculations on OoB viewpoints. Branching Frustum calculation to old method. 2025-03-29 13:22:23 -03:00
MajorCooke
210ee1780e 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-03-09 16:17:07 -03:00
dileepvr
74594e4c34 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-03-08 13:01:39 -03:00
dileepvr
e24c6fa4db Update hw_portal OoB height clip
Hopefully the last bug squash.
2025-03-08 13:01:39 -03:00
Dileep V. Reddy
60ebd71fea Handle sectors within sectors for stacked portals and plane mirrors (affects OoB only). 2025-03-08 02:16:31 -05:00
Dileep V. Reddy
def3082ed8 Forgot to account for when both floor and ceiling of a sector are portals. 2025-03-08 02:16:31 -05:00
Dileep V. Reddy
0b30b4a493 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-03-06 23:29:12 -03:00
Dileep V. Reddy
093d3e32e6 Small correction to OoB viewpoint stacked-sector portal visibility. OoB is not the same as Ortho. 2025-03-05 12:54:34 -05:00
Dileep V. Reddy
2c4ac886aa Stacked sector portals now render for OoB viewpoints. 2025-03-05 12:54:34 -05:00
Dileep V. Reddy
dc5a250797 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-03-05 12:54:34 -05:00
Dileep V. Reddy
0acfd9661b Making 3D-floors respond to r_dithertransparency properly. 2025-03-05 12:54:34 -05:00
Dileep V. Reddy
42947d04dc 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-03-05 12:54:34 -05:00
Dileep V. Reddy
2223ea6227 3D floor flats now respect r_dithertransparency flag (how did this make it into vkdoom but not gzdoom?) 2025-03-05 12:54:34 -05:00
Dileep V. Reddy
232b93534d Better flat visibility checks for Ortho projection. 2025-03-05 12:54:34 -05:00
nashmuhandes
aae8c12cdf Add a particle flag to allow user shaders on the sprites 2025-01-29 17:00:12 -03:00
Ricardo Luís Vaz Silva
3d2f9e06ed remove bone component cache to decrease memory consumption
caching this is entirely unnecessary, as it changes every frame
2025-01-27 17:04:46 -03:00
Rachael Alexanderson
f3b0c3ac5e
- Roll back filesystem changes. These were causing instabilities in the master branch that were interfering with development. 2025-01-04 11:27:21 -05:00
nashmuhandes
a4e527979d Allow setting a dynamic light's alpha to influence its brightness. This brings it in parity with VKDoom 2024-12-26 04:10:44 -05:00
Christoph Oelckers
d1abc3eb8c renamed things in file system to reduce Doom specific terminology. 2024-11-24 18:05:11 +01:00
Christoph Oelckers
634a646c2d take namespace enum out of namespace and added CheckNumForAnyName and CheckNumForFullNameInFile to clarify the meaning of CheckNumForFullName.
This is to take some renaming noise out of the upcoming refactoring.
2024-11-24 17:59:16 +01:00
Boondorl
c31f45c653 Fixed view for frozen players
Will no longer try and extrapolate mouse input that's bound to mispredict.
2024-11-19 08:00:37 -05:00
Boondorl
3ea5be1ea7 Reworked FRandom constructors
Removes ambiguity while keeping old constructor syntax in check for better overall portability.
2024-11-15 23:56:23 -03:00
Boondorl
597b06ae52 Added CRandom functions
Unique RNG namespace for client-side effects and HUDs. Identifiers for these cannot clash with identifiers that affect the playsim making them completely safe to use in HUD elements. They also won't be saved.
2024-11-15 23:56:23 -03:00
Rachael Alexanderson
ccd38afbcb
- revert adding in the sprite/frame support for visual thinkers 2024-11-13 16:16:36 -05:00
Ricardo Luís Vaz Silva
a0c1f5b1b7 fix compilation 2024-11-13 17:02:50 -03:00
Rachael Alexanderson
ad40299da4 - add sprite/frame support for VisualThinkers 2024-11-13 14:39:40 -05: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
Ricardo Luís Vaz Silva
3622e2bb2a Compress visualthinker bools into a flags field 2024-11-13 15:47:22 -03: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
Dileep V. Reddy
2ba57b5068 Reduce number of multiply ops per frame and increase x-axis clipper range for orthographic projection. 2024-10-26 18:36:45 -04:00
nashmuhandes
12c6d1361a Move no-mipmapping from actor renderflag/particle flag, to a material property in GLDEFS, where it makes more sense. The feature was introduced in the short-lived engine version of 4.13 which was deemed too broken and needed to be replaced with a newer version anyway, so might as well perform an API-breaking change at this point in time. Note that this currently only works for sprites (its primary targeted use case) -- walls, flats and models can be patched in later. 2024-10-19 18:35:54 -04:00
dileepvr
6e7148b074 Missed a line in RenderOrthoNoFog
Tying up the fov fix.
2024-10-18 03:34:29 -04:00
dileepvr
c38b119435 FOV scales ortho up to 180 degrees
One line change in r_utility.cpp affecting a custom field.

Orthographic projection sees "more" of the sceen as fov increases, but only up to 180 degrees, after which it will have no effect.
Orthographic projection has no meaning for fov since there is no Frustum. But since this is fundamental to the engine, I am reinterpreting it. Cherno wanted this too.
I'll update the wiki if this gets in.
2024-10-18 03:34:29 -04:00
Rachael Alexanderson
3bf3af9441
- readd canvas check 2024-10-17 23:45:09 -04:00
Rachael Alexanderson
c2fd99a24d
Revert "- Actor.GetSpecies() is a non-destructive function"
This reverts commit ee5442c06b.
2024-10-17 21:28:52 -04:00
Rachael Alexanderson
ee5442c06b
- Actor.GetSpecies() is a non-destructive function 2024-10-14 17:31:18 -04:00
Major Cooke
fa467073eb Added (SPF_)STRETCHPIXELS.
This counteracts the squaring implied by rolling sprites.
2024-10-14 16:14:25 -04:00
Dileep V. Reddy
f9a59a989b Orthographic projection Widescreen aspect ratio horizontal clipping fixed. This one-line change only affects ortho viewpoints. Easy to verify in windowed mode. 2024-10-08 12:36:00 -04:00
Dileep V. Reddy
568a39d203 Removing pre-clipping of Frustum if pitch > 46 degrees and viewpoint is not allowed out of bounds. This is like old behavior. 2024-09-30 10:16:50 -04:00