You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
three.js core has long needed fixes since implementing layers. See mrdoob/three.js#26160 which does so and implements WebXR rendering for postprocessing and three.js.
Reacted by Daniel Martínez Sebastián, Micheal Parks and pbit
It still not showing right in the webxr polyfill with overlayed cameras. But in mixed reality simulator it shows up correctly. not sure if the effect is being applied to each xr camera or the whole viewport.
The effect is applied once to the whole viewport; the render pass should contain XR transforms. You can read from pose directly if you want to apply per-eye effects to keep it to 1 draw call -- it's notable that WebXR spec allows for any number of views which some devices have 6 or 100 of. Setting renderer.xr.enabled = false will opt out of XR transforms when rendering which all effects should be doing. I've already applied the necessary changes in https://codesandbox.io/s/kgjxfb which is waiting on mrdoob/three.js#26160.
Yes that works too. I'm sorry I don't understand how to modify the effect I made to do that so the distortion is applied to both cameras seperately. I've integrated your three changes into the tests. And updated RenderPass. I've only updated EffectPass.
I've rebuilt everything and integrated webxr into the manual demos in this branch. But npm isn't liking checking out your branch of three with the fixes, the module has to be copied in. There is a possible bug with webxrmanager I have to figure out. I'll work out the issue with my effect so it's applied to both webxr cameras.
I've fully upgraded the manual and public demos with the fix merged with latest three in that branch. It seems to be working but can't get pages generated for it. fullscreen render.
I spent too much time on it and gave up for now. It's waiting on integrating changes in three. I couldnt get the lens distortion showing up stereo its just monoscopic.
Activity
DanielMartinezSebastian commentedon Feb 16, 2023
I am interested in this topic. I am developing various XR features in React environments and I have the same question. Any suggestion about it?
vanruesc commentedon Mar 22, 2023
Right,
postprocessingeffects are currently not stereo-aware. XR support will be addressed when v7 is complete.CodyJasonBennett commentedon Jun 18, 2023
three.js core has long needed fixes since implementing layers. See mrdoob/three.js#26160 which does so and implements WebXR rendering for postprocessing and three.js.
danrossi commentedon Jul 11, 2023
danrossi commentedon Jul 12, 2023
danrossi commentedon Jul 12, 2023
I've taken to task to migrate xr changes over to postprocessing with updated examples.
https://danrossi.github.io/three-lens-distortion/example/postprocessing.html
https://danrossi.github.io/three-lens-distortion/example/postprocessing-video.html
Using these branches
https://github.com/CodyJasonBennett/three.js/tree/fix/offscreen-webxr
https://github.com/danrossi/postprocessing/blob/main/src/passes/EffectPass.js#L578
It still not showing right in the webxr polyfill with overlayed cameras. But in mixed reality simulator it shows up correctly. not sure if the effect is being applied to each xr camera or the whole viewport.
CodyJasonBennett commentedon Jul 12, 2023
The effect is applied once to the whole viewport; the render pass should contain XR transforms. You can read from pose directly if you want to apply per-eye effects to keep it to 1 draw call -- it's notable that WebXR spec allows for any number of views which some devices have 6 or 100 of. Setting
renderer.xr.enabled = falsewill opt out of XR transforms when rendering which all effects should be doing. I've already applied the necessary changes in https://codesandbox.io/s/kgjxfb which is waiting on mrdoob/three.js#26160.danrossi commentedon Jul 12, 2023
Yes that works too. I'm sorry I don't understand how to modify the effect I made to do that so the distortion is applied to both cameras seperately. I've integrated your three changes into the tests. And updated RenderPass. I've only updated EffectPass.
https://github.com/danrossi/postprocessing/blob/main/src/passes/RenderPass.js#L322
Is those changes still needed ?
I've integrated the webxr fixes into these demos.
https://danrossi.github.io/postprocessing/public/demo/#bloom
danrossi commentedon Jul 13, 2023
I've rebuilt everything and integrated webxr into the manual demos in this branch. But npm isn't liking checking out your branch of three with the fixes, the module has to be copied in. There is a possible bug with webxrmanager I have to figure out. I'll work out the issue with my effect so it's applied to both webxr cameras.
https://github.com/danrossi/postprocessing/tree/webxr-render-fix
danrossi commentedon Jul 14, 2023
I've fully upgraded the manual and public demos with the fix merged with latest three in that branch. It seems to be working but can't get pages generated for it. fullscreen render.
Utopiah commentedon Apr 10, 2024
Wondering what's the status.
danrossi commentedon Apr 11, 2024
I spent too much time on it and gave up for now. It's waiting on integrating changes in three. I couldnt get the lens distortion showing up stereo its just monoscopic.
vanruesc commentedon Feb 9, 2025
Closing in favor of #677.