Skip to content

fix: clustered lighting packed decode stability on Samsung WebGL#8461

Merged
mvaligursky merged 1 commit into
mainfrom
mv-clustered-samsing-fix
Feb 14, 2026
Merged

fix: clustered lighting packed decode stability on Samsung WebGL#8461
mvaligursky merged 1 commit into
mainfrom
mv-clustered-samsing-fix

Conversation

@mvaligursky

@mvaligursky mvaligursky commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

Summary

It seems some older Samsung devices loose precision on uints when stored inside a struct (we have similar precision loss issue with shadow matrix on Pixel 5 as well), and so:

  • Move clustered packed decode temporaries out of ClusterLightData into module-scope GLSL variables in clusteredLightPS.
  • Keep field naming/comments aligned with previous struct members and document the driver issue reference.

Fixes #7800.

Store clustered packed `flags`, `anglesData`, and `colorBFlagsData` as module-scope temporaries instead of struct members to avoid observed precision/corruption issues on some Samsung devices while preserving decode behavior.

Fixes #7800.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mvaligursky mvaligursky merged commit b5c58cd into main Feb 14, 2026
8 checks passed
@mvaligursky mvaligursky deleted the mv-clustered-samsing-fix branch February 14, 2026 09:04
mvaligursky added a commit that referenced this pull request Feb 24, 2026
…GL (#8461)

Store clustered packed `flags`, `anglesData`, and `colorBFlagsData` as module-scope temporaries instead of struct members to avoid observed precision/corruption issues on some Samsung devices while preserving decode behavior.

Fixes #7800.

Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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.

Clustered lighting not working on some devices

2 participants