PDA

View Full Version : How to map 4 images to screen?



hyppoo
05-22-2017, 05:17 AM
Hi,

How to map 4 images to the area like this: 2374?
The transform will be like using four look-up tables for backward mapping.
The right side rectangle is for vertex shader. I know how to use fragment shader and vertex shader to do fisheye calibration.
BTW, I know how to use texture.


EDIT

The 4 images' transforms to the four areas are nonlinear, and each of them is bit different, take one for example: image1 --> area1.
Suggest that there are 100 points,

vertex_position[0] --> texture[0] ........ vertex_position[99] --> texture[99];
here vertex position is area1, texture is image1, vertex position's z is not used and is setting to 0,
I perform the nonlinear transform on texture coordinates,
texture[0] = transform(texture[0]).

I can transform one image, what I want to know is how to transform four images?

Dark Photon
05-22-2017, 06:26 PM
It's not clear to me exactly what you you know vs. want to know here.

Check out the "Lens Matched Shading" and "LMS" pages in this presentation:

* NVidia OpenGL in 2016 (http://on-demand.gputechconf.com/siggraph/2016/presentation/sig1609-kilgard-jeffrey-keil-nvidia-opengl-in-2016.pdf)

Theory is first, then practice. There's also source code for this out there on the NVidia web site. What they're doing isn't precisely what you're doing, but it's very close.