-
-
Save AndrewRayCode/94913d8fa5081bd9a098 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
| it('variables in main child scope (like for loop) that conflict get renamed correctly ', function() { | |
| var combined = newComposedShader( | |
| newSubShader({ | |
| fragment: ` | |
| void main() { | |
| vec2 position = vec2( 1.0 ); | |
| for (int p = 0; p < 20; p++) { | |
| vec2 other = position + p; | |
| } | |
| gl_FragColor = 1.0; | |
| } | |
| ` | |
| }), | |
| newSubShader({ | |
| fragment: ` | |
| void main() { | |
| vec2 position = vec2( 1.0 ); | |
| gl_FragColor = 1.0; | |
| } | |
| ` | |
| }) | |
| ); | |
| expect( combined.runtime.fragment.toString() ).not.to.contain( ' position + p' ); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment