Abstract

Current commodity graphics cards offer programmability through vertex shaders and pixel shaders to create special effects by deformation, lighting, texturing, etc. The Effect framework introduced by Microsoft allows to store shader program code, settings, and a limited graphical user interface within a single .fx text file. This supports a division of labor between programmers writing the code and designers using the GUI elements to control settings. Furthermore, the Effect framework proves to be ideal for experimenting with shader programming — be it for learning purposes or for rapid prototyping. In this tutorial, we employ the Effect framework for an exploratory, hands-on approach, introducing first principles only as needed, not in advance. Simple shader programs are used to review basic 3D techniques such as homogeneous coordinates and the Phong shading model. Then we turn to basic deformation effects employing vertex shaders and the use of texture maps as decals or reflected environments inside pixel shaders. To create bump mapping and related effects, tangent space coordinates and normal maps are introduced. Finally, we treat more complex effects such as anisotropic specular highlights. Keywords : Pixel shader, Vertex shader, HLSL, Effect framework

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.