I have been following an excellent series of tutorials on shader programming. It is actually a free e-book called "The CG Tutorial: The Definitive Guide to Real-Time Graphics" and is obtainable at http://developer.nvidia.com/object/cg_tutorial_home.phpl
Although it is based on Cg, which is a high-level shader language developed by Nvidia in close collaboration with Microsoft,it is very similar to Microsoft's HLSL.
So far I've taken the first four tutorials and ported them to 3DRad, using the same syntax as provided by Fernando in his ShaderDemo.3dr. I've clearly marked all the extra additions in the scripts, and by comparing the two versions you should be able to pick up very quickly the small differences. The examples have the same names as those in "The CG Tutorial". The first three are pretty basic and introductory. The fourth one (CG_TutorialExampleC5E4v.3dr) is pretty good........with modifications by myself to demonstrate three interactive colored spotlights.
I have not included all the checks and balances (provided in genetransfer's excellent demos) as I did not want to clutter things too much. As such, they are based on the assumption that you are using shader models vs_2_0 and ps_2_0
As I continue working through the book, I will post the examples that I finish doing.
Although it is based on Cg, which is a high-level shader language developed by Nvidia in close collaboration with Microsoft,it is very similar to Microsoft's HLSL.
So far I've taken the first four tutorials and ported them to 3DRad, using the same syntax as provided by Fernando in his ShaderDemo.3dr. I've clearly marked all the extra additions in the scripts, and by comparing the two versions you should be able to pick up very quickly the small differences. The examples have the same names as those in "The CG Tutorial". The first three are pretty basic and introductory. The fourth one (CG_TutorialExampleC5E4v.3dr) is pretty good........with modifications by myself to demonstrate three interactive colored spotlights.
I have not included all the checks and balances (provided in genetransfer's excellent demos) as I did not want to clutter things too much. As such, they are based on the assumption that you are using shader models vs_2_0 and ps_2_0
As I continue working through the book, I will post the examples that I finish doing.