|
|

楼主 |
发表于 2004-12-8 11:35:00
|
显示全部楼层
Re:千古难题,被我碰上了!
现在找到了两块显卡在贴图性能上的区别了,用dx9带的工具capsview看的:
9100上:
D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE值为真
4200上:
D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE值为假,没有这一项
查dx9c,有说明如下
The interpretation of MaxTextureRepeat is also affected by the D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE capability bit. When this bit is set, the value in the MaxTextureRepeat member of D3DCAPS9 is used precisely as described. However, when D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE is not set, texture repeating limitations depend on the size of the texture indexed by the texture coordinates. In this case, MaxTextureRepeat must be scaled by the current texture size at the largest level of detail to compute the valid texture coordinate range. For example, given a texture dimension of 32 and MaxTextureRepeat value of 512, the actual valid texture coordinate range is 512/32 = 16, so the texture coordinates for this device must be within the range of -16.0 to +16.0.
英文在大好,只能看懂,不能翻出
4200的问题我想应当是出在这上面。
贴图不正确的地方是使用的贴图的负座标,可能超出了范围,但在最近的一次试验中只在shader中改变贴图座标,并限制座标范围,却发现出现的现象是4200贴图好象不接受座标为负数的情况,我需要将贴图在渲染的时候变化贴图座标,只要是涉及到这方面的时候,4200就错误地进行贴图,很难看。
希望解决了此问题的高手给个意见参考一下。 |
|