OpenGL Additive Lights

twitterlinkedin

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

twitterlinkedin
Share It!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.