News for hackers. Stuff that matters.
Re:Impossible Colors by drdeca on Thursday September 03, 2020 @02:00PM (#24366748)
Oh man, I've wanted to do something like this for a while, but I didn't know the software to do it had already been written, and also I don't have a VR headset.

So you can have it render an object which shows different colors to different eyes, while rendering the rest of the scene normally?

What software supports this?

Re:Impossible Colors by terramex on Thursday September 03, 2020 @02:59PM (#24367460)
I used old version of Unity (5.4? maybe even older) and tested it on both Google Cardboard and Oculus CV1. It used to have separate cameras for left and right eye. Unity has a system of layers and every camera has a bitmask that defines which layers are rendered by it. So I simply left environment on default layer rendered by both cameras, put one copy of an object on 'Left' layer and another copy with different material on 'Right' layer. Worked really nice for "vampire" eyes (specifically irises) rendering.

Few years ago they switched to single pass stereo rendering to avoid rendering whole scene twice. In theory this legacy option to use two cameras is still there, but quick googling says that it has some issues on modern Oculus SDK's and new Unity render pipelines but workarounds are possible.

https://forum.unity.com/threads/right-eye-black-for-urp-on-q...

https://forums.oculusvr.com/community/discussion/90660/unity...

https://answers.unity.com/questions/1534621/vr-how-to-render...

Re:Impossible Colors by r34 on Thursday September 03, 2020 @02:34PM (#24367183)
That's exactly my problem as well. I have GearVR headset which fits seversal Samsung smartphones and it's really nice to play around (and it's cheap), but the only piece of software written for WebVR is Three.js module, which doesn't allow different scene presentation to each eye.

But maybe I'll get back to work on my hack. Some suggestions are here: https://stackoverflow.com/questions/53775620/webvr-update-sc...

Re:Impossible Colors by terramex on Thursday September 03, 2020 @03:06PM (#24367555)
I used Unity's layers system (more on that in sibling comment: https://news.ycombinator.com/item?id=24367460).

I have zero experience with WebVR, but solution you linked seems sensible.