An interactive tutorial implementing Phong shading with GLSL, covering per-pixel lighting, normal mapping, and gamma correction.
glsl-lighting-walkthrough is an interactive tutorial that demonstrates how to implement Phong shading and advanced lighting techniques using custom GLSL shaders in WebGL. It walks through per-pixel lighting, normal mapping, gamma correction, and light attenuation with practical code examples. The project solves the problem of understanding complex real-time lighting implementations by providing a hands-on, modular approach.
Intermediate WebGL developers and graphics programmers who already understand basic 3D rendering concepts and want to implement advanced lighting techniques in their shaders.
Developers choose this project because it provides a complete, working implementation of Phong shading with detailed explanations of each component, uses glslify for modular shader code, and demonstrates professional-grade techniques like gamma-correct linear space rendering and Oren-Nayar diffuse.
:bulb: phong shading tutorial with glslify
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses glslify to break down complex shaders into reusable npm modules, making advanced lighting concepts more accessible and maintainable, as shown in the shader sections.
Covers per-pixel lighting, normal mapping, gamma correction, and Oren-Nayar diffuse in one walkthrough, providing a holistic view of professional shading practices.
Includes a live demo with real-time visual feedback, allowing developers to experiment and see the impact of each lighting component immediately.
Implements gamma-correct linear space rendering and attenuation functions like Madams', which are standard in modern real-time graphics for accurate results.
The README explicitly states it's not for beginners and assumes familiarity with WebGL and stackgl, making it inaccessible without foundational graphics programming skills.
Requires the OES_standard_derivatives WebGL extension for flat normals and normal mapping, which may not be supported on all devices or older browsers.
Built around stackgl tools and npm modules, reducing portability to other WebGL frameworks like Three.js without significant adaptation effort.