Programmable rendering on the GPU (Graphics Processing Unit) utilizing "shader" technology has become a recognized benefit to visual simulation, providing unprecedented realism and fidelity to synthetic environments. However, effective use of shaders is a technological challenge, where implementation of even a trivial vertex or fragment shader requires manual re-implementation of the fixed-function pipeline. Furthermore, generation of efficient shaders for existing data is a complicated undertaking that is compounded by the number of state permutations possible under a modern graphics API, such as OpenGL, and the desire to extend fixed function state with advanced rendering techniques.
Therefore, system integrators and run-time providers face significant challenges in incorporating shader technology while hiding complexity and maintaining backwards compatibility with existing data. Preserving the massive investment in existing database and model libraries, while enhancing system capabilities, is a fundamental concern. Though some shader techniques are required for modeling, others are typically supplied by the run-time. Fundamentally, it is clearly disadvantageous to have run-time code contained in shared modeling assets.
As a solution to these problems, this paper introduces a Shader Infrastructure that automates the building of vertex and fragment shaders by analyzing the OpenGL state machine. The Shader Infrastructure is capable of not only dynamic generation of highly efficient shaders for rendering any legacy data considered valid by the OpenFlightâ„¢ standard, but also extending the rendering pipeline via Advanced Rendering Techniques. Techniques allow for implementation and merging of novel GPU-based rendering approaches by injecting small snippets of shader code into the Shader Infrastructure. The Shader Infrastructure allows designers to customize portions of the rendering pipeline and to automatically combine that customization with other rendering techniques, either fixed-function or shader-based. Therefore, it significantly simplifies the problem of content management and reuse while taking full advantage of the advances in the programmable PC graphics hardware.