Hi,
Just a short one regarding compiling of HLSL files/ shaders within Visual Studio.
To be able to compile a HLSL/ shader file as a part of your project, you have to define (at least) 2 things for the file (HLSL compiler):
1. Shader type (i.e. Effect/FX, Pixel shader, Vertex shader etc.)
2. Shader Model
When I split all shaders (VS and PS for example) in separate files, it's all good, because then I set shader type to either PS or VS (+ I specify the main entry point, i.e. PS_main).
But now I've decided to combine the PS and VS in 1 file and the above is no longer an option.
I did find a trick to bypass this, that is to set the shader type to Effect/FX, which compiles the HLSL file fine.
Never the less, FXC (ofcourse) warns me that effects are deprecated (note; I don't use effects11 in my code anymore).
In short;
- do you have any idea how to be able to compile a PS and VS in 1 file, within Visual Studio (2013)?
(without the warning and bypass as if it were an effect file)