Code used in class. The links below may point to out-of-date copies, use anonymous svn to retrieve the latest copies. Code is also available via anonymous svn from https://svn.ece.lsu.edu/svn/gp. Those not familiar with SVN should read these SVN instructions.
Demonstrates the most basic 3D techniques: how to project a triangle specified in object space onto a frame buffer. Draws one lonely (presumably) triangle.
Demonstrates how to apply 3D techniques to a list of possibly unrelated primitives (triangles). The routine draws a grid of identical triangles pierced by a unique one.
Demonstrates color interpolation and Z buffering. The routine draws a grid of triangles pierced by a triangle. The angle of the grid can be interactively adjusted.
Demonstrates simple lighting techniques. The routine draws a gold tube pierced by a triangle. There is a bright light in the tube that can dimmed, brightened, and moved around.
Demonstrates simple texture application and perspective-correct interpolation. Draws the tube, this time it surrounds two rectangles, one composed of many triangles, the other composed of two big ones. Textures can be applied to the tube and rectangles.
Texturing Examples. The code shows an undulating tube pierced by a purple quadrilateral. After turning on texturing the course syllabus will appear on the quadrilateral and tube. Filtering and texture mode can be changed using the UI.
Simple fragment shader example. A fragment shader is used to implement Phong shading. Also see the shader code.
Simulation of balls bouncing on a half-cylinder platform, scene also includes a water wheel and a staircase. The ball physics is performed by GPU via CUDA (or just by CPU) and vertex and geometry shaders are used to compute ball reflection locations. Other techniques include shadow volume to stencil shadow locations and occlusion queries to limit the number of balls rendered. See also CUDA code, and Shader code.
Simulation of a balloon, with physics performed by GPU using either OpenGL Shader Language (GLSL) or CUDA. Also see the OpenGL shader code used for physics, the CUDA code used for physics, the PTX pseudo GPU assembly language of the CUDA code, and the true (maybe) GPU assembly language of the CUDA code.
|David M. Koppelman - email@example.com||Modified 29 Nov 2010 14:15 (2015 UTC)|
|Provide Website Feedback • Accessibility Statement|