Aeva / m.grl

Midnight Graphics & Recreation Library
http://mgrl.midnightsisters.org
GNU Lesser General Public License v3.0
44 stars 3 forks source link

#include macro for glsl sources #146

Closed Aeva closed 9 years ago

Aeva commented 9 years ago

This feature would add a new glsl file extension - ".glsl". These files can't themselves be used as shader sources (and should never define the main method).

The new macro would be used something like so:

#include "curves.glsl"

This would substitute the macro line with the contents of the named source file. Various useful functions can then be bundled with mgrl, both to simplify existing bundled shader programs as well as a convenience to authoring new ones.