Skip to content

Instantly share code, notes, and snippets.

@gero3
Created September 12, 2012 11:08
Show Gist options
  • Save gero3/3705970 to your computer and use it in GitHub Desktop.
Save gero3/3705970 to your computer and use it in GitHub Desktop.
issue
## introduction
This is a suggestion on how we could make use of preprocessor definitions inside a shadermaterial.
## Why
I needed a shadermaterial that had more then 16 texture uniforms defined but depending on the configuration of my application only used 16 or less texture uniforms. So I needed the rebuild my shader sourcecode programmatically or I could make a definition system which used preprocessor definitions.
## definition
We add a new property to the object to define the preprocessor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment