Created
November 18, 2015 20:31
-
-
Save AndrewRayCode/1d167052a6d84b4cbf57 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Shader 1 | |
| uniform float a; | |
| void main() { | |
| float b; | |
| gl_FragColor = a + b; | |
| } | |
| // Shader 2 | |
| uniform float b; | |
| void main() { | |
| float a; | |
| gl_FragColor = a + b; | |
| } | |
| // Composed shader (desired output): | |
| uniform float a; | |
| uniform float b; | |
| void main() { | |
| float a_avoid_conflict; | |
| float b_avoid_conflict; | |
| gl_FragColor = (a + b_avoid_conflict) + (a_avoid_conflict + b); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment