Skip to content

Conversation

@mrxz
Copy link
Collaborator

@mrxz mrxz commented Jun 30, 2025

The PackedSplats and Readback classes kept track of various properties of the render state in order to restore them afterwards. The WebGLRenderTarget has properties for scissor/scissorTest which, when used, cause the WebGLRenderer to keep track of and restore them for us when switching render targets. This simplifies the code as there is less state to track and no longer a need to adjust the pixelRatio (as this doesn't apply to render targets).

I've also changed the xrPresenting to xrEnabled, since the isPresenting flag is considered readonly in Three.js (WebXRManager.js#L100-L107). Temporarily disabling the WebXR code paths in the renderer should be done by setting xr.enabled to false, as can also be seen in the Reflector for example (Reflector.js#L201).

@dmarcos
Copy link
Contributor

dmarcos commented Jun 30, 2025

Thanks. Looks good to me. @asundqui good to go?

@asundqui
Copy link
Contributor

Probably good to go, but can I test on Quest 3 and AVP tonight to make sure?

@mrxz
Copy link
Collaborator Author

mrxz commented Jun 30, 2025

Probably good to go, but can I test on Quest 3 and AVP tonight to make sure?

FYI, I've tested it on a Quest 3 myself, but more testing never hurts. :-)

@asundqui
Copy link
Contributor

asundqui commented Jul 1, 2025

Looks like your code cleans things up and makes it simpler :). I checked on AVP additionally and everything checks out. Let's merge this yes @dmarcos thanks guys!

@dmarcos
Copy link
Contributor

dmarcos commented Jul 1, 2025

Thanks

@dmarcos dmarcos merged commit fe34300 into sparkjsdev:main Jul 1, 2025
2 checks passed
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.

3 participants