I just re-read that relevant part of the spec and it seems you could use coords #x to sample texture #y in the first pass as well. Interesting . I’ve always matched textures to texcoords, it’s a lot more flexible than I thought.
Edit: Hmmm, no. I think I’ll just go read it a couple more times .
[This message has been edited by PH (edited 02-13-2003).]
specifies that the value present in the texture data bound on the
unit associated with <dst> will be written to that register. A
value for <dst> of REG_x_ATI means that TEXTUREx_ARB will be
sampled, and the result written to REG_x_ATI. The <interp>
parameter specifies which texture coordinate interpolator is used to
sample the map. A value of REG_x_ATI for <interp> in the second
pass of a two-pass shader will do dependent texture read sampling
using the value in register x. Otherwise, specifying TEXTUREx_ARB
will sample the map using the texture coordinates on unit x.
The text “A value for <dst> of REG_x_ATI means that TEXTUREx_ARB will be sampled, and the result written to REG_x_ATI” means that the <dst> register always samples the texture unit which number is defined by the register number.
The text “Otherwise, specifying TEXTUREx_ARB will sample the map using the texture coordinates on unit x” means that the texture coordinates on unit x is used, it does not mean that a texel is sampled from unit x.
Ahhh yes, that appears to be correct. You’re right, it does say sample the map using texcoords from unit x, where the would mean the texture data bound on the unit associated with <dst>. Crystal clear .
Perhaps the ATI driver guys have problems reading the spec too, as your shader should work.
Well, the 8500 is more flexible than I thought. Thanks for the info vincoof and Ysaneya.
[This message has been edited by PH (edited 02-13-2003).]