Skip to content

Conversation

@dli7319
Copy link
Collaborator

@dli7319 dli7319 commented Oct 30, 2025

By default, the simulator renders the main scene to an render target, then composites that render target over the simulator scene, isolating the main scene's blending from the simulator scene just like actual XR rendering.

When rendering to a render target, three.js sets the output color space of shaders to linear using a linearToOutputTexel function within each shader. However, sparkjs does not include this function inside it's gaussian splatting shader so it continues to output SRGB unless we request it to output linear.

Note that technically the simulator will still look slightly different than on device because alpha blending in linear will be different than alpha blending in SRGB.

image

@dli7319 dli7319 requested a review from nsalminen October 30, 2025 19:41
Copy link
Collaborator

@nsalminen nsalminen left a comment

Choose a reason for hiding this comment

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

Thanks so much @dli7319!

@nsalminen nsalminen merged commit a876652 into main Oct 31, 2025
7 checks passed
@dli7319 dli7319 deleted the spark_colorspace branch October 31, 2025 17:06
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.

2 participants