Skip to main content
GameDev.net gamedev.net
🔒 Locked

Resolved: Only TEXCOORD0 works?

Started by mossmoss Apr 5, 2006 at 11:42 AM 0 replies 550+ views
Original Post
mossmoss
mossmoss
This is a followup to this thread, since I can't seem to reply in that thread any longer. I'm posting the resolution, just for reference in case others run into this issue. I finally managed to find the problem, and it was indeed render state; just not where I'd expect to find it. This line of code was done once, very early in execution, and had probably been there prior to my joining the company: SetRenderState(D3DRS_WRAP1, D3DWRAPCOORD_0 | D3DWRAPCOORD_1 | D3DWRAPCOORD_2); Since I "knew" all texture wrapping was being done via SetTextureStageState or SetSamplerState, I never went to the section of code containing this line. (I'm guessing this is an older interface for doing texture wrapping? Still in place for backwards compatibility... ) Anyway, I managed to find it once we started using some nVidia cards, which manifested the problem differently. The ATI card messed up TEXCOORD1 channel, while the nVidia card messed up vertex shader output register 1. Once I removed the SetRenderState call for WRAP1, both problems were fixed. Using PIX for Windows was a big help in locating this bad render state.
Nik02
Nik02
Read the SDK chapter "Texture Wrapping" for explanation.
Niko Suni

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.