SHADER_TARGET
is defined to a numeric value that matches the ShaderA program that runs on the GPU. More info
See in Glossary target compilation model (that is, matching #pragma target
directive). For example, SHADER_TARGET
is 30
when compiling into Shader model 3.0. You can use it in Shader code to do conditional checks. For example:
#if SHADER_TARGET < 30
// less than Shader model 3.0:
// very limited Shader capabilities, do some approximation
#else
// decent capabilities, do a better thing
#endif