[QUOTE=rhexter;1467]Surprises me there are not more Shader creation tools like the ShaderFX tool on the market seems to have taken time for these type of tools to emerge… resource for learning seems scarce as well.
I know of mental Mill and I guess, Maxwell…
I’ve recently been using our in house tools for realtime shader creation in this way, its been awhile and getting into it has been fun. Much better than dealing with the code side of it although I do wonder how much more efficent it could be if the shader was then taken and rewritten by a programmer.[/QUOTE]
Although it takes effort to write an editor I think it makes a lot of sense to do this in house, often you need to build it around features of the engine lighting etc. and the material system it uses.
That is not to say you cant take an existing tool and intergrate it.
As for the code they produce, it is normally HLSL and can include some hand written blocks of code. The quality of the code is depedent on the user of the editor and the person who wrote the editor. I think it’s quite hard to mess this up, HLSL is not too complicated. No mater what you write in HLSL, you are at the mercy of the complier (which is different depending on platform) that produces the actual code that runs on the GPU.
I would recommend learning HLSL, then you can understand the shaders your editor outputs and how shaders work in general. It helps you become more creative with what you can do with them too. Reading the shaders you output is a good starting point.
You probably wouldnt see much or any improvement with a programmer writing HLSL, you might see a tiny difference if they wrote a shader in ASM. It might also go the other way and it become worse. The gains a losses are probably tiny, its not worth considering.
It is worth grabbing this:
http://www.paradoxalpress.com/LayoutSamples/HLSLReference.pdf
As it gives you a rough idea of how much each HLSL function costs, by the amount of instructions it uses. So then at least if you spot a function like “smoothstep” etc. you know its expensive.
edit:
Since writing this I read this post by Wolfgang Engel
http://diaryofagraphicsprogrammer.blogspot.com/2008/09/shader-workflow-why-shader-generators.html
Which has some argument on the subject, but like some of the comments, I don’t totally agree with what he is saying.
But maybe I will investigate more the performance of the shaders produced by editors
edit:
And another, with many comments
http://realtimecollisiondetection.net/blog/?p=73