Reputation: 1490
I'm trying to create custom VR panorama viewer using THREE.js. I've managed to create:
Everything looks fine for me but I would like to add some kind of "black vr cardboard frame" to both cameras. I'm not quiet sure how this effect is called, but here is some example:
Can you please give me some tips?
Upvotes: 0
Views: 2026
Reputation: 6986
That word you are looking for is "barrel distortion". You can see a working implementation of this in the WebVR-polyfill here. Depending on how good you understand raw webgl that might be a bit difficult to read though.
So here are the basic steps of a very versatile approach using two render-passes:
PlaneBufferGeometry
) for the two viewports and assign the UV-coordinates such that the left mesh will use the left half of the framebuffer as its texture and the right mesh will use the right half.Upvotes: 3