Category Archives: OpenGL

OpenGL Additive Lights

Purpose of the Sample:

Unity’s legacy renderer supported multiple light sources in the forward renderer by issuing a draw call for a single object for each light that affected the object.  The first draw call will be the base draw call and all other draw calls are additively blended on top of the base draw call.

CGame.h

CGame.cpp

vertexPass0.glsl

fragmentPass0.glsl

vertexPass1.glsl

fragmentPass1.glsl

Download Sample App