Hello guys.
I am on starting with hlsl shaders and i would be very happy if you can give me some recommend shader tutorials.
The best is if they where german , but english will work too.
Also I have a question about the formats.
Some time ago i read that hlsl or glsl languages are like assembling , so you do not need any compiler , jus save it as .frag .vs .hlsl .......
Is this right ? I am not sure because i downloaded Nividea FX Composer and the screenshots really lokks like a compilder , or even more like a whole ide.
Hope you can help me a bit
- 7xCore
HLSL beginning
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
Re: HLSL beginning
Google should provide you with a lot of decent tutorials
And shaders do need to be compiled, but this can be done at runtime if preferred
Shaders can also be compiled during a pre-processing stage as to get faster loading times, a lot of larger studios use an uber-shader approach where multiple permutations are stored within a single shader file which can then all be individually compiled during pre-processing or at runtime using compile flags based on the requested permutation
And shaders do need to be compiled, but this can be done at runtime if preferred
Shaders can also be compiled during a pre-processing stage as to get faster loading times, a lot of larger studios use an uber-shader approach where multiple permutations are stored within a single shader file which can then all be individually compiled during pre-processing or at runtime using compile flags based on the requested permutation
Re: HLSL beginning
Ok thanks for now.
I just started Fx Composer and it contains a compiler.
*Shaders can also be compiled during a pre-processing stage as to get faster loading times
So on the startup of the game the shaders compile itself ??
*runtime using compile flags based on the requested permutation
What does this mean ?
I just started Fx Composer and it contains a compiler.
*Shaders can also be compiled during a pre-processing stage as to get faster loading times
So on the startup of the game the shaders compile itself ??
*runtime using compile flags based on the requested permutation
What does this mean ?
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
Re: HLSL beginning
A pre-processing stage happens during the creation of maps or assets, it means the shaders required to run a map will already be compiled so the game itself doesn't have to worry about compiling them at runtimeomg_fail wrote:Ok thanks for now.
I just started Fx Composer and it contains a compiler.
*Shaders can also be compiled during a pre-processing stage as to get faster loading times
So on the startup of the game the shaders compile itself ??
*runtime using compile flags based on the requested permutation
What does this mean ?
Just like in C and C++ you can use the #define, #ifdef, etc. preprocessor directives in shaders to enable/disable functionality at compile-time
This way you can create different permutations from a single piece of code based on the parameters you pass to your shader compiler (which can come in handy for large projects which needs a lot of similar shaders)
Re: HLSL beginning
Ah so its kind of seperating , isn't it ?