Repository navigation
feat: torch, Light spell and spell projectile shadows; highlighted NPCs keep their shadow - #556
Merged
BoroBongo merged 1 commit intoNov 23, 2026
Conversation
…adows; highlighted NPCs and objects keep theirs - ClaimHeroLight takes the hero light's Unity light (torch, Light spell): it casts a cube shadow (near plane 0.2 m, so the torch's stick doesn't hide its flame), its slot is marked (w < 0) and the shaders light it through URP like the lamps. - Spell projectiles (VRSpellThrow) register their light as a dynamic shadow light: a flying fireball now lights the walls it passes (before only NPCs and objects) and throws shadows. Up to 4 dynamic shadow lights; destroyed ones drop out. - Spell effect lights (VisualFxLight: summoning, fire rain) come before the lamps among the pooled shadow lights. - 12 shadow lights at most (feature and shader). - Lit/SingleMesh-Dynamic and Lit/AlphaToCoverage-Dynamic (highlight on hover, fading) got a ShadowCaster pass - a highlighted NPC lost its shadow. - The Shadows option switches them too.
17 tasks
Contributor
Author
|
Folded into #555 on purpose (one PR for the PC shadows): its commits are now part of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-up to #555 (kept separate, so #555 stays reviewable): moving lights cast shadows too.
ClaimHeroLight(owner, unityLight)gets the hero light's Unity light, which casts a cube shadow. Near plane is 0.2 m, so the torch's own stick doesn't hide the flame. The hero light slot is marked (w < 0) and the shaders light it through URP with the shadow, like the lamps in feat: PC shadows - sun/moon, lamps, torch and spells, the hero's own shadow, SSAO, darker nights (GD3D11-like) #555.VRSpellThrow) register their light as a dynamic shadow light. A flying fireball now lights the walls it passes (before, it lit only NPCs and objects) and throws shadows. Up to 4 dynamic shadow lights at once; destroyed ones drop out.VisualFxLight: summoning, fire rain) come before the lamps among the pooled shadow lights.GothicShadowLightsFeature+GothicShadows.hlsl): 6 lamps + hero light + projectiles.Lit/SingleMesh-DynamicandLit/AlphaToCoverage-Dynamic, the highlight/fade swap shaders, now have a ShadowCaster pass.Why
Playtest feedback on #555: "lamps, spells and everything else should cast shadows", and "a highlighted NPC stops casting its shadow".
How to test manually
PCVR (quality High). Night, e.g. G2 Khorinis around 2:00:
Checked in the Editor: a hero light placed at hand height on the night market lights the ground, benches and NPCs, with bench shadows. Projectiles are untested (no way to cast in the Editor test).
Save/load
No new state.
Known gaps / follow-ups
NpcBurnEffect) don't cast shadows.