Results 1 to 3 of 3

Thread: A question for lookup table.

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2003
    Posts
    2

    A question for lookup table.

    Hello,

    I'm writing an application of one dimensional and three-dimensional lookup table to image data. for somereason, I want to let the GPU to do the work instead of CPU. Can I apply this using texture lookup? Someone who has experience on this please introduce something to me, thanks very much!

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Aug 2001
    Location
    Italy
    Posts
    625

    Re: A question for lookup table.

    As far as I know, Look Up Tables (LUTs) are just textures by a GPU point of view.

    So first thing to do is find a way to get the data into a texture. This should not be a problem, especially for 1D / 2D / rect2D textures. 3D textures may be problematic since they cannot be rectangular.

    Then, you have to get information from the texture. For some very simple applications you may be able to do it with the standard GL modes but I guess you will need something more sophisticated i.e. dependant texture lookups.
    Those may be performed in some ways (NV_texture_shader[2,3], NV_fragment_program, ARB_fragment_program, others, I raccomand the latter two).

    Now, assuming you got what you need, it's time to process the inputs. Leaving standard GL and NV_register_combiners[2] out, ARB_fragment_program and NV_fragment_program should be cool enough. Beware however, if the algorithm is not linear (it got 'ifs' in it), you will have to go for NV_fragment_program and a very costy GPU (radeon 9500, geforce fx).

    I guess you know how to pull the results out. Render somewhere and read back. Doing this correctly may not be so tricky.

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2003
    Posts
    2

    Re: A question for lookup table.

    Thanks, I'm trying.....

Similar Threads

  1. Shader, 1D lookup table
    By lobbel in forum OpenGL: GLSL
    Replies: 2
    Last Post: 09-03-2008, 10:23 AM
  2. a big lookup table
    By destiny in forum OpenGL: GLSL
    Replies: 3
    Last Post: 03-18-2008, 05:40 AM
  3. lookup table problem...
    By UT666 in forum OpenGL: GLSL
    Replies: 4
    Last Post: 05-06-2006, 10:36 PM
  4. lookup table
    By ym in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 11-22-2002, 07:53 AM
  5. lookup table
    By ym in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 11-22-2002, 07:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean