"The CG Tutorial" examples ported to 3DRad HLSL
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.html 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.
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'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.

tutorialexamples.zip | |
File Size: | 1580 kb |
File Type: | zip |
Here's the example from Chapter 6 which demonstrates a pulsating vertex animation.

cg_tutorialexamplec6e1v.3dr | |
File Size: | 153 kb |
File Type: | 3dr |
A couple of examples from Chapter 7 demonstrating reflection and refraction, respectively.Although 3DRad built-in shaders cover this very thoroughly, it is still nice to be able to go back to first principles to uncover the theory behind them (Chapter 7, IMHO, does this very well)
While going through this process, I discovered that the 3DRad default environment map (000_em.dds), is not representative of the default terrain and sky. It actually depicts a brown sandy desert terrain and different sky. For the sake of the examples, I was forced to make an environment map which was representative of the default terrain and sky which we all use. I've attached it with the examples, so replace the default 000_em.dds with this one.
While going through this process, I discovered that the 3DRad default environment map (000_em.dds), is not representative of the default terrain and sky. It actually depicts a brown sandy desert terrain and different sky. For the sake of the examples, I was forced to make an environment map which was representative of the default terrain and sky which we all use. I've attached it with the examples, so replace the default 000_em.dds with this one.

cg_tutorialexamplec7e1v.3dr | |
File Size: | 177 kb |
File Type: | 3dr |

cg_tutorialexamplec7e3v.3dr | |
File Size: | 178 kb |
File Type: | 3dr |

000_em.zip | |
File Size: | 166 kb |
File Type: | zip |
Back to My Freebies