View Full Version : TXB Fragment Instruction

Simon Dobbyn
08-23-2006, 06:53 AM
I've been trying to use the TXB fragment instruction but I'm not sure how to use it. It says in the specs that:

The TXB instruction takes the first three components of its source vector and maps them to s, t, and r. These coordinates are used to sample from the specified texture target on the specified texture image unit in a manner consistent with its parameters. Additionally, the fourth component of the source vector is applied to equation 3.14 as fragment_bias below to further bias the level of detail.

lambda'(x,y) = log2[p(x,y)] + clamp(texobj_bias + texunit_bias + fragment_bias)
Does the w-component have to be within a certain range of values?
What are texobj_bias and texunit_bias? Where are these values set?
Thanks in advance,

08-28-2006, 11:23 AM
w can be anything. As implied by the name, texobj_bias comes from the texture object, and texunit_bias comes from the texture unit. If you didn't touch any of those, they are zero.