As my skills regarding scene illumination are nearly non existing, I was searching for a simple, intuitive lighting solution for 3D scenes. Along the way I stumbled upon a technique called “Image Based Lighting” using “Spherical Harmonics”. Reading the Siggraph paper “An Efficient Representation for Irradiance Environment Maps” finally made it clear: I need that too! After compiling the code to find spherical harmonic coefficients from the Siggraph paper and downing some lightprobes from Paul Debevec’s website I was good to go with a JOGL2 implementation. I chose to go for a vertex shader based implementation as the diffuse radiance changes only slightly anyway so a per pixel fragment shader would be overkill I guess. Code as always on Github: GL3_EnvironmentBasedLighting_SphericalHarmonics.java. The corresponding shaders can be found here: .vs .fs

NIGHTNIGHT by DEDDY