Embedded GLSL source strings for the BGI OpenGL rendering pipeline.
More...
Go to the source code of this file.
Embedded GLSL source strings for the BGI OpenGL rendering pipeline.
Three shader programs:
- Page-texture program — draws the 2D BGI page buffer as a fullscreen RGBA quad.
- Flat Phong program — per-face Phong shading using the
flat GLSL qualifier.
- Smooth Phong program — per-vertex (Gouraud) Phong shading with interpolated normals.
- Line program — depth-tested coloured line segments (no lighting).
All solid shaders implement a two-light Phong model:
- Primary light: configurable direction, world-space or view-space.
- Fill light: configurable direction (always world-space), reduced intensity.
- Ambient + diffuse + specular + shininess are uniform scalars.