Difference between ShaderModel versions

Started by
2 comments, last by exoity 15 years, 8 months ago
Hi, I am dealing with some code and DX9 throw a exception when I set the runtime to debug version. [Direct3D9: (ERROR) :ps_3_0 shader can only be used with vs_3_0+ shader (SWVP or HWVP), or transformed vertices.] I found in a technique a vs_2_0 shader works with a px_3_0 shader. I think there are some potential problems but I do not know what they are. Who can tell me? Thanks.
Advertisement
Shader model 3 doesn't work with other shader models. You can mix and match fixed function, SM1 and SM2, but not SM3.
Given that SM3 is bigger and better than SM2 you'll almost certainly be fine just changing the technique definition from vs_2_0 up to vs_3_0. Some tools and drivers may allow mismatches but internally they're probably promoting the SM2 part to SM3 as they assume thats what you meant...

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

If you are just learning about shaders the main difference between SM2 and SM3 is the instruction slot limit. In SM2 the instruction slot is only 64 instructions. In SM3 the instruction slot limit is 512.

This topic is closed to new replies.

Advertisement