Skip to content

Conversation

@DESTROYGIRL
Copy link
Contributor

@DESTROYGIRL DESTROYGIRL commented Jul 31, 2025

Description

A backported feature from the Alien Swarm SDK by Saul Rennison

Current issues:

  • Transitioning between two lights at near opposite angles can make the object's shadow do a very jarring sweep

  • When an object stops moving it makes a very obvious flick to the high fidelity shadow at certain angles (Remote players only?)

Toolchain

  • Windows MSVC VS2022

@DESTROYGIRL DESTROYGIRL added this to the Continued Development milestone Jul 31, 2025
@DESTROYGIRL DESTROYGIRL added the Current WIP Currently working on it label Aug 1, 2025
@DESTROYGIRL DESTROYGIRL added the Enhancement New feature or request label Aug 1, 2025
@DESTROYGIRL DESTROYGIRL marked this pull request as ready for review August 6, 2025 13:37
@DESTROYGIRL DESTROYGIRL requested a review from a team August 6, 2025 13:37
when the origin clipped into the floor it would get the skybox as the brightest light
@Rainyan Rainyan self-requested a review August 9, 2025 12:33
Copy link
Collaborator

@Rainyan Rainyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that currently, the approach angle and player velocity affect the resolving of the shadow direction (or so it seems; I haven't debugged the exact reason for this).

I'm worried this would have a negative effect on gameplay, because it's unintuitive where exactly your shadow will be displayed for the opponents—even when standing in the same exact location, it's possible to have a different shadow cast outcome depending on the route you took there and your speed:

lerp.webm

(This could also be related to the sequence of closest lights travelled, with A->B resulting in a different outcome than C->B, somehow. But I'm speculating.)


There's also this strange issue where fidgeting around will make the shadow slowly tend towards what I assume is the neutral (FLT_MAX?) shadow position:

shadow.webm

which also would be a poor experience for the competitive meta, I fear.

@DESTROYGIRL
Copy link
Contributor Author

I didn't consider this aspect.
We could revert to the shadow moving on it's own rather than being restricted to only moving when the player does, but it looked very silly in my opinion. But it seems that that's what is done on newer engine branches.

Maybe a system where the shadow angle is determined from the average between lights, so the movement of the shadow might not look so jarring. But then the shadows might not look accurate

@Rainyan
Copy link
Collaborator

Rainyan commented Aug 11, 2025

As an update for this PR, I have a supplementary WIP PR open for it to address some of the shadow problems mentioned above at: DESTROYGIRL#2

I suggest we wait on this PR until DESTROYGIRL#2 is good for merge to this one, and proceed from there.

@DESTROYGIRL DESTROYGIRL marked this pull request as draft August 11, 2025 18:13
@DESTROYGIRL DESTROYGIRL removed the Current WIP Currently working on it label Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants