Results 1 to 6 of 6

Thread: about texture combiner functions

  1. #1
    Junior Member Newbie
    Join Date
    May 2005
    Location
    india
    Posts
    8

    about texture combiner functions

    i am trying to get the intensity variation of an intereference pattern using texture combining.i have found a state variable GL_DOT3_RGB. but the formula given for the calculation 4*((Arg0r-0.5)(Arg1r-0.5)+(Arg0g-0.5)(Arg1g-0.5)+(Arg0b-0.5)(Arg1b-0.5)) may give values greater than one. it is also said in the redbook that this is stored into all three(R,G,B). but if it generates numbers larger than 1 wont the program report an error. please explain it to me.

    also i want to know if the (R,G,B) values are all specified as equal, will i get different shades of white.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jul 2001
    Location
    France
    Posts
    1,662

    Re: about texture combiner functions

    I just can tell you that giving number greater than one won't provoke any error at all. All the numbers you give will be truncated between the range 0..1.

  3. #3
    Junior Member Newbie
    Join Date
    May 2005
    Location
    india
    Posts
    8

    Re: about texture combiner functions

    i want to know according to what relation they are mapped to the range [0,1].

    also whether i can get different intensity of white if (R,G,B) are equal but different from 1.

  4. #4
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Naarn, Austria
    Posts
    1,102

    Re: about texture combiner functions

    The values will just be clamped, that is, values <0 will be mapped to 0, values >1 will be mapped to 1...

    R==G==B will always give you gray, with the special cases of 0 == black and 1 == white

  5. #5
    Junior Member Newbie
    Join Date
    May 2005
    Location
    india
    Posts
    8

    Re: about texture combiner functions

    thanks for the reply.i am greatful for it.

  6. #6
    Junior Member Newbie
    Join Date
    May 2005
    Location
    india
    Posts
    8

    Re: about texture combiner functions

    i have seen that i can either get the intensity variation by using texture combiner functions, or crudely by just drawing lines with various values for (RGB). but after this i need to shift the fringe system according to a mathematical relation. so considering that,which approach will be computationally more effficient and faster.

Similar Threads

  1. Texture Combiner Issues with Specific Video Card
    By Kaiser in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 02-07-2012, 10:29 AM
  2. Texture combiner within an FBO (solved)
    By renaissanz in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 07-22-2006, 02:23 PM
  3. texture*Lod() functions
    By Tom Nuydens in forum OpenGL: GLSL
    Replies: 9
    Last Post: 05-03-2004, 09:18 AM
  4. Modulate & add texture combiner?
    By markfcsl in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 09-20-2002, 02:59 AM
  5. Register Combiner and 3D Texture border
    By ysatou in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 03-22-2002, 04:50 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