1. ## 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. ## 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. ## 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. ## 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. ## Re: about texture combiner functions

thanks for the reply.i am greatful for it.

6. ## 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.

#### Posting Permissions

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