EDA 425, Advanced Computer Graphics


Introduction

In this laboratory project you will study CgFX. A CgFX file describes a complete and self-contained rendering effect with vertex/fragment programs, render/texture state and pass information. The text file syntax for CgFX files is similar to the Microsoft .fx 2.0 format (DirectX9 Effect format).

The CgFX runtime supports OpenGL as well as DirectX8 and DirectX9, but in this project we will focus on OpenGL.

Preparation

  1. Read the application manual.
  2. Download the Cg reference manual from nVidia's developer pages (note that the manual has not been updated since 2005, which is fine for most use).
  3. Download the file LAB.ZIP.
  4. Extract LAB.ZIP to a directory of your choice. This will be your working directory for this laboratory project.
  5. Open the solution file (lab_2008.sln) in Microsoft Visual Studio 2008 (i.e. double click on the file...).
  6. If you are not working with the project in the lab, read Appendix C: Setup Visual Studio
  7. Move on to the introduction to CgFX.

Laboratory Project: Real-time Computer Graphics

Introduction to CgFX
Task 1: Lighting
Task 2: Environment Mapping
Task 3: Post-processing
Appendix A: Application Manual
Appendix B: Application Framework
Appendix C: Setup Visual Studio
Appendix D: Post Processing Examples


U. Borgenstam and J. Svensson, 2004 - 2006