Skip to content

Conversation

@mvaligursky
Copy link
Contributor

Fixed a bug in the GLSL gaussian splatting shader where initCenter was using an out parameter instead of inout for the SplatCenter struct.

Details:

  • In GLSL, out parameters are uninitialized on function entry, causing any values assigned to SplatCenter members (specifically modelCenterOriginal and modelCenterModified) prior to the call to be discarded.
  • This prevented custom shader effects that rely on the original or modified center positions (such as cropping or masking effects) from working correctly in WebGL.
  • Changed the parameter qualifier to inout to preserve the pre-initialized values, matching the behavior of the WebGPU implementation.

@mvaligursky mvaligursky self-assigned this Dec 8, 2025
@mvaligursky mvaligursky added bug Something isn't working area: graphics Graphics related issue labels Dec 8, 2025
@mvaligursky mvaligursky requested a review from a team December 8, 2025 15:54
@mvaligursky mvaligursky merged commit dc37e4d into main Dec 8, 2025
7 checks passed
@mvaligursky mvaligursky deleted the mv-init-centers-inout branch December 8, 2025 15:58
mvaligursky added a commit that referenced this pull request Dec 8, 2025
Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Graphics related issue bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants