-
Notifications
You must be signed in to change notification settings - Fork 657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uniform bool value in WebGL shader is always set to false when code is optimized #1970
Comments
@MartinSStewart thanks for this SSCCE! WebGL supports the Bool uniform. The compiler doesn't extract it from a shader. Should be pretty easy to fix. The reason why this breaks in the optimize mode, is that the bool property doesn't make it into the conversion map between the minified record field name and the full original name of the uniform. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A WebGL shader containing a
uniform bool
will always be assigned to false when the--optimize
compiler flag is used.In the following example (lifted from the elm-explorations/webgl's triangle.elm), I have a triangle that should be rendered with the color black if the uniform value
noColor
is set to true. If you runelm make src/Main.elm
this will be the case. Running it withelm make src/Main.elm --optimize
will incorrectly make it colorful.SSCCE
The text was updated successfully, but these errors were encountered: