> What about combine interpolate ? > > C' = C0*C2 + C1*(1 - C2) > > C0 is incoming texture, C2 is blend color, C1 is previous stage. > > At each stage, if blend color is 1, given channel is set to C0 (incoming > intensity texture) if blend color is 0, given channel is set to C1 > (previous stage - just copied).
What is this "given channel?" We don't get to specify what channel is set. We are setting the new resultant color value C' to the result of the equation. With this in mind, I think your mapping is off. We shoud be trying to pick the new color based on the value of the texture. We descriminate between the blend color and the previous stage's color based on the texture color. So, C0 is blend, C1 is previous, C2 is texture. However, this still doesn't accomplish what we want. If C2 is 0 then C' = C1, i.e., the final color is that of the previous stage (sounds promissing, but wait). Now if C2 is 1 thsn C' = C0 the blend color, i.e., the resultant color is the blend color: not the blend color + the incomming color. Thus, we loose the information from the previous stage. Example (for one pixel): Unit 0: C0 = red = 1,0,0,1 C1 = transparent black = 0,0,0,0 C2 = texture0 = 1 then C' = C0 = red Now Unit 1 comes along: C0 = green = 0,1,0,1 C1 = C' = red = 1,0,0,1 C2 = texture1 = 1 then C'' = C0 = green But we wanted (1,1,0,1) yellow! To get yellow we need to add red and green. yellow = red + green. -Stoney =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".