脑活素的副作用:SGI - Products: OpenGL: Examples: Glut: Advan...

来源:百度文库 编辑:九乡新闻网 时间:2024/04/27 23:58:53
This program demonstrates virtualization of OpenGL's lights. The idea is that if an object is lit by many lights, it is computationally more efficient to calculate the approximate lighting contribution of the various lights per-object and only enable the "brightest" lights while rendering the object. This also lets you render scenes with more lights than the OpenGL implementation light (usually 8). Two approaches are used: The "distance-based" approach only enables the 8 closest lights based purely on distance. The "Lambertian-based" approach accounts for diffuse lighting contributions and approximates the diffuse contribution. multilight.c projshadow.jpg
(shadows)

projshadow1.jpg
(no shadows) Rendering shadows using projective transforms. projshadow.c projtex.jpg
(cube)

projtex1.jpg
(three sides) Demonstrates simple projective texture mapping. projtex.c rasonly.jpg Demonstrates the use of OpenGL for rasterization-only, with perspective-correct texture mapping.