CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
12.49k stars 3.4k forks source link

Eye Dome Lighting broken in VR mode #8704

Open lilleyse opened 4 years ago

lilleyse commented 4 years ago

Sandcastle (make sure to click the VR button)

bad2

emackey commented 4 years ago

Reminder: Cesium's "VR" mode pre-dates actual WebVR, which itself has been folded into WebXR. Rather than fixing bugs in Cesium VR, consider replacing it with a more modern WebXR integration.

mramato commented 4 years ago

@emackey PRs welcome :smile:

Full support for WebXR is definitely on our long term roadmap, but with so many exciting things happening in the Cesium world, it will most likely be some time before we get to it.

emackey commented 4 years ago

Yeah, I might have a tough time justifying to AGI, but it would be a ton of fun, and I do have hardware to properly test it.

Actually my biggest concern about it is that Cesium likes to hand-craft its model and projection matrices for the camera. In WebXR (and WebVR before it), the model and projection matrices for left and right eyes are handed over by the browser API to the application, using a world space that corresponds to the user's actual environment (their living room or wherever they stand or sit).

So basically we need to short-circuit Cesium's camera logic for figuring these matrices out, and inject the browser-supplied matrices instead, dealing with any downstream dependencies of those appropriately.

After that we would need some UI for allowing the user to arbitrarily scale scene space relative to user-world-space, and change locations etc. But just getting an in-place WebXR immersive camera in place would make a great first PR on this front.

I don't think this is the kind of project I could embark on alone. I would want a collaborator with some understanding of Cesium camera/view internals.

mramato commented 4 years ago

While it's probably out of date, we do have an issue for this: #3422 Please feel free to provide any and all thoughts there so that when we go to do it we have the research all in one place. Thanks!

Winley113 commented 2 years ago

How can I get the full source code of this API