GShadow: Dynamic blob shadows for G/ZDoom!
Now universal! (in terms of mods that use Doom as the IWAD, anyways)
Download GShadow RV2!
Download GShadow RV3 (Universal)
"This is a tiny resource mod that allows to cast multiple dynamic shadows on both Software and Hardware renderer without need of shaders or any special stuff, pure DECORATE and ACS! You can use it for your own projects without asking for permission." -sonic_HD87, original GShadow dev.
Those who have seen GShadow and remember what it was like, may remember it was quite slow even on just IWAD maps, and it didn't work correctly on Zandronum (yet it still ate bandwidth like nothing else). However, GShadow: Resurrected aims to fix those issues, greatly speeding up performance, making it even easier to add to your own projects, adding compatibility with Zandronum (Because why not?), and some more.
Spoiler: Compatibility with other mods (Open)The non-universal version is not compatible with all gameplay mods, only those that leave monsters and decorations intact. Only exception i know of is DUBG, if you enable Dehacked Compatibility, and possibly MetaDoom, but not sure if it's mod detection only detects DEHACKED patches.
The universal version is compatible with mods that use the same editor numbers for their replaced decorations as the original (in basic terms, it's compatible with any mod that works with regular Doom maps), but there's no restrictions in terms of monsters (except monsters with larger radius/height than a pinky don't cast shadows, which is intentional). Load order shouldn't matter, but try loading GShadow last if it doesn't work.
I've tested with the following mods successfully:
Brutal Doom v21 (if it works with this one, it should work with all of them lol)
Project Brutality REDUX
Death Foretold
Quake Champions: Doom Edition
Complex Doom
Doom 4 Vanilla
DUBG (plus the monsters addon, otherwise it was compatible with the non-universal version too)
Also, it's not compatible with any of the Shadowpacks (for reasons I hope are obvious enough), so shadows will appear square on all mods.
You can disable it mid-game by setting the gs_enable CVAR to 0 or FALSE.
You can also disable shadows being casted outdoors without any nearby light source with the gs_outdoorshadow CVAR.
Spoiler: Shadowpacks NEW (15/03/20) (Open)What are "shadowpacks"? Shadowpacks are simply replacements for the default rectangular shadow to shadows that have the shape of the actual thing they are casted from, so if a Zombieman gets put in front of a light source, the shadow looks more like a silhouette of him, and not like just a rectangle. These don't work with the universal version.
Currently, there's only one available for vanilla Doom's monsters and player, but i may make one for FreeDoom and Heretic later.
Download vanilla Doom shadowpack
NOTE: The load order is GShadow main .pk3 first, and then your shadowpack of choice.
Spoiler: Screenshots (Open)
Spoiler: How do i add this into my projects (Open)If you wanna add it into your project, you can copy all of the things in the .pk3, rename LICENSE.txt to GSHADOW-LICENSE.txt, and merge the contents of each file into your project's version of them (For example, if your project already has CVARINFO, then put the contents of the GShadow:R CVARINFO into that one).
Then, in every monster actor (that's not much bigger than a pinky so it doesn't look weird), add this line to the very start of the Spawn state:
TNT1 A 0 NoDelay A_GiveInventory("GS_SpawnShadow")
And this one at the very start of the Spawn state of static actors that should cast light:
TNT1 A 0 NoDelay A_GiveInventory("GS_SpawnLight")
And that's it, your project now has GShadow support integrated.
Spoiler: Changelog (Open)v3 (31/8/2020)
-Added an universal version. Non-universal is still at v2, since anyways there's no changes on that front.
v2 (14/03/2020)
-Shadows are now displayed when outdoors and there's no nearby light source.
(Can be disabled with gs_outdoorshadow, customizable with LANGUAGE,
as shown in TEST_LANG.txt on the .pk3)
-Shadows can now be toggled from the clientside, as opposed to only being
toggled by the server host. (gs_enable CVAR controls this)
-Made it easier to change the shadow displayed, mostly for use with mods.
-Minor optimizations to online play.
From GShadow Beta 2 to GShadow: Resurrected v1 (13/03/2020)
-MASSIVE optimizations to all of the code, and there's only one shadow per
actor, instead of multiple.
-Practically all of the way shadows work has been completely rewritten.
-Works on all maps now.
-Runs in Zandronum now (It did before, but nothing worked).
-Code has been cleaned up with proper indentation, and removed various useless
actors and scripts.
-Toggleable with gs_enable, in case a mod implements this and you don't like
the effect or it just bogs down performance too much on your end.
-Now works online without latency skyrocketing.
-Fixed enemies spawning more shadows when they lose a target.
-Restored dynamic lights for the light sources, now the shadows actually
make sense.
-Greatly reduced shadow model polygon count from 216 (more or less if Noesis'
voxel converter isn't the same as ZDoom's) to just 2 polygons.
Software mode is still identical.
-Slightly offset model upwards so it wouldn't flicker when on a moving lift.
-Added compatibility with Heretic.
-Now licensed under the MIT license.
Spoiler: Implementation details (Open)Compared to GShadow Beta 2, everything has been almost completely changed.
Most importantly the ShadowBrain and ShadowContainer actors have been completely cut from the equation, as I felt things could be done much faster cutting the middlemen and setting up things directly from the ShadowActor itself.
Now, there's only one ShadowActor per shadowcaster, since one of the major performance issues was caused by the fact that every actor had one ShadowContainer, but one ShadowActor per light source, which means that basically 80 monsters with 20 light sources is: 1600 shadow actors! Yeah, no wonder it was so slow!
While it may look very slightly less realistic in some situations, the gigantic (perhaps 20 times faster or more on average) increase in performance is well worth it.
And there are also some other minor performance optimizations here and there, most notably the monsters' shadows being updated 4 times less than the player's (Reducing the amount of times the size and alpha of the shadow has to be recalculated). All of this amounts to a quite lightweight shadow system, being far less of a trade-off compared to the already quite solid GShadow Beta 2, and making it more viable to be implemented in more heavyweight projects.
Link to the original topic, of GShadow Beta 2.
One thing I have asked from the Lord, that I shall seek: That I may dwell in the house of the Lord all the days of my life, to behold the beauty of the Lord and to meditate in His temple. (Psalm 27:4, NASB)
My Discord tag is @tdrr, and it's my preferred contact method. I also check PMs here from time to time.