|
|
下面是texreg2rgb指令的解释:
General dependent texture read operation that takes the red,
green, and blue color components of s as texture address data
(u, v, w) consisting of unsigned values to sample a texture at d.
This is useful for color-space remapping operations.
为何有用颜色值的r,g,b来对贴图进行座标寻址呢?这里根据的是什么原理?
举个例子:
比如一个点p,它的颜色值为(0.1,0.5.1.0), 如果拿它来对贴图进行寻址的话,根据上述,应该是找贴图座标中位置点(0.1,0.5,1.0)的点; 可这个谁能保证就是点p(p点可以为贴图中任意一点,而根据这个指令就只映射到一个固定点,明显不合逻辑) ,是不是我什么地方理解错了呢?
|
|