How can I tell if HLSL shader code is valid for a given shader version?

576 Views Asked by At

In Ogre, when loading HLSL shaders you specify a target PS/VS e.g SM2.0, SM 3.0. Are there tools for HLSL (and I guess other shader languages) which will tell me what shader-model versions a given HLSL function/file is valid as? For instance we wrote shaders for SM3.0 by default but for all I know they are valid as SM2.0.

1

There are 1 best solutions below

0
On BEST ANSWER

Start with a low shader version and work your way up until it compiles. Its not elegant but it works.