80 likes | 229 Views
Atila OGL library. “T&L emulated via Vertex Shaders”. News in Atila OGL Library. GLState updated Shaders have fully access to “light” GL state (including derivative vectors): LIGHTPROD, HALF, etc. New default Lighting shaders (OpenGL default) Assumes 1 light enabled (GL_LIGHT0)
E N D
Atila OGL library “T&L emulated via Vertex Shaders”
News in Atila OGL Library • GLState updated • Shaders have fully access to “light” GL state (including derivative vectors): • LIGHTPROD, HALF, etc. • New default Lighting shaders (OpenGL default) • Assumes 1 light enabled (GL_LIGHT0) • A simple ambient, specular, and diffuse infinite lighting computation with a single light and an eye-space normal • Spaceship demo works • About 26000 vertexes (GL_TRIANGLES) • 110 millions of cicles per frame • 23 minutes per frame (fargas)
Comparative Lighting Shader ARBVP NVIDIA GeForce FX 5900XT ATI Radeon 9600 See next slide Atila GPU
Problems in ATI Radeon 9600 • Shader used is the default for this configuration (emulates default T&L): • GL_LIGHTING and GL_LIGHT0 enabled • Should produce same results than T&L • If the shader is ommited, (use T&L directly) • Same result than Atila and Nvidia 5900 • If the shader is used directly • Result shown in previous slide • We do not know why…
Minor improvements in Atila GLLib • Internal buffers are dynamic • No buffer underrun or limit in the number of vertices • Some bugs fixes • Full support for light state • Updates and queries • GLContext fully documented
Sphere demo • Using standard lightmodel (same as spaceship demo) • 1 light (GL_LIGHT0) • Fully GL API • No hardcoded code within library
“Rosquillas” demo • Using user shader • Z-test working • Fully GL API: No hardcoded code within library
To do • Creation of shaders on the fly to support the differents T&L fixed functions • Great source of documentation: “Fixed function pipeline using vertex programs “ • http://www.idi.ntnu.no/grupper/su/sif8094-reports/2002/p10.pdf • Implement more calls in Atila OGL Library • Implement a partial GLSL compiler • Many demos using this interface