I want to learn how to write shaders, I believe the language being HLSL (are there other types? I assumed HLSL is the standard, if not only.)
I've got programs like rendermonkey and whatever the ATI version is but quite frankly I found them a little restrictive and I'd heard you may as well learn HLSL instead.
But I'm stuck at what books to get, what resources to read, and wondered if anyones got any suggestions where to start and recommended reading?
Cheers
Replies
Rendermonkey is a bit outdated AFAIK, try nVidia's FXComposer. However, these are really only shader writing "IDE"'s (integrated development environment) of sorts, opening visual studio won't help you learn C.
HLSL (I'll assume that is what you will be learning) is pretty simple as a language. It is C-like in syntax and pretty simple as for number of functions and what it can do (though not in what you can do with it... you can do tons).
I started learning HLSL more than a year ago, and since then I've seen the shader scene evolve quite quickly as far as resources available for learning HLSL or any shader language.
Your best resource is probably the CG-Academy HLSL DVD by Ben Cloward. A couple of artists at work bought it and they got a very good, thorough, well taught learning in HLSL basics.
I also have an overview of shaders for artists at http://www.robg3d.com/shadersTutorial.html .
Another great way to learn is via ShaderFX, a 3dsmax plugin written by Kees Rijnen and Ben Cloward (www.lumonix.net) . You can also try Mental Mill, which ships with FXComposer 2, but as an artist, being able to adjust your model/UVs/etc. can help you develop shaders in ways non-artists cannot. Anyway, this will allow you to export a working shader to see how ShaderFX/Mental Mill "does things"... this was much of how I learned more advanced shader things, and I still do it occasionally. It is also helpful for porting your shaders to 3dsmax/XNA/Quest3D/DirectX, etc., as ShaderFX supports them all. It is also a very valuable exercise to be able to 'write' shaders with nodes, giving things a much more tactile feel, until you more understand what is going on behind the scenes.
Along these lines, another way to learn, either basic or advanced, is to study other people's shaders. Ben Cloward has lots of (what are now, I guess) simple shaders- normal mapping, specular mapping, attenuation, etc- on his site, www.bencloward.com . I learned lots from his shaders, but shaders, and his method of writing shaders, has somewhat advanced. I also have a bunch of shaders on my site at http://www.robg3d.com/shaders.html . Any shaders I release here are generally well documented so they should be a good learning tool.
Lastly, there are DirectX books. One that helped me was "Introduction to 3D Programming with DirectX 9" by Frank D Luna, specifically chapters 1, 16, 17, 18, and 19.
The only real problem I still have with the shader scene is that there are no real de-facto online forums for it specifically. If you need help, I'd suggest posting in this forum or at lumonix.net's forums for ShaderFX.
Good luck!
For a gui editor Mental Images mental mill is quite nice. comes with fx composer or on it's own now and has support for hlsl glsl or fx exporting.