Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: How to map 4 images to screen?

  1. #1
    Junior Member Newbie
    Join Date
    May 2017
    Posts
    7

    How to map 4 images to screen?

    Hi,

    How to map 4 images to the area like this: Click image for larger version. 

Name:	ppcppc.jpg 
Views:	31 
Size:	64.6 KB 
ID:	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,
    Code :
    texture[0] = transform(texture[0])
    .

    I can transform one image, what I want to know is how to transform four images?
    Last edited by hyppoo; 05-22-2017 at 08:20 PM.

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    4,173
    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

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •