- Home /
Question by
schweini · Jun 06, 2016 at 07:14 AM ·
texturevrsphereuv coordinates
Mapping webcamTexture to only a part of a sphere, and adjusting it at runtime?
I'm trying to build a very simple VR webcam viewer.
My simplistic plan is to use a webcamTexture, stick it on a sphere, and have the camera in the center of the sphere (adjusting the sphere's shader to render inside).
But, since each webcam has different Field-of-Views and horizontal or vertical distortions, I need to adjust the size of the (rectangular) texture on the sphere, so that it doesn't cover the whole sphere, and that I can move the texture around and resize it on the sphere at runtime.
Do I have to use a UV map (and how?), or is there a simpler option somewhere to tell Unity3D NOT to stretch the webcamTexture to the sphere's surface automatically? All I need is the rectangular texture projected part of the surface of the sphere.
Comment