There is a low- and a high-level framework to define the visual appearance of objects that can be used alternatively.
Low-level Framework
Eventually, the color of each displayed pixel is calculated by a program running on the GPU inorder to achieve the best performance. The low-level framework allows the programmer to write such GPU programs and to apply them in the rendering of surfaces. Gpu programs are obviously platform dependent. Therefore, when targetting OpenGL, the class GlShading from the SharpGfx.OpenGL assembly must be inherrited. SharpGfx has extra support built in for OpenGL ensuring that host arguments are correctly passed to GPU program parameters. In addition to custom parameters, there are a few predefined parameters that pass on information about the scene and the camera.
High-level Framework
In the real world, the color visual objects emerges from the interaction of light and matter. The high-level framework carries this over into the programming model. Each of the two aspects, represended by the abstract classes Light and Material, can be defined separately in a geometric manner. Using this information, the framework can compose the GPU programs that implement the combined visual effect.