Skip to content

Fix point light shadows breaking when shadow res decreases#10383

Open
boxrocket6803 wants to merge 1 commit intoFacepunch:masterfrom
boxrocket6803:fix-point-shadow
Open

Fix point light shadows breaking when shadow res decreases#10383
boxrocket6803 wants to merge 1 commit intoFacepunch:masterfrom
boxrocket6803:fix-point-shadow

Conversation

@boxrocket6803
Copy link
Copy Markdown
Contributor

Summary

Shadows on point lights would break if the desired resolution decreased.

2026-04-06.19-02-19.mp4

Now they don't

Implementation Details

ShadowMapper.Projected had

// Do we want a bigger resolution for this shadow map now?
if ( cacheEntry.CurrentResolution != desiredResolution )

whereas ShadowMapper.ProjectedCube had

// Do we want a bigger resolution for this shadow map now?
if ( cacheEntry.CurrentResolution < desiredResolution )

Spotlights work and point lights didn't, so despite the comment I believe != to be correct. Not 100 percent sure though, this could be an issue with something else that was hidden by spotlight comparison being wrong.

Checklist

  • Code follows existing style and conventions
  • No unnecessary formatting or unrelated changes
  • Public APIs are documented (if applicable)
  • Unit tests added where applicable and all passing
  • I’m okay with this PR being rejected or requested to change 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant