Closed SjorsVanGelderen closed 6 years ago
I think the createUniformSetter
function should check the size of the incoming uniform, and use the appropriate type accordingly. The biggest hurdle probably is that the GLSL parser that is being used doesn't infer the types correctly.
@SjorsVanGelderen Hi, this is a known limitation https://github.com/elm-community/webgl/issues/36
What kind of graphics editing application do you have in mind? It would be better first to know more about the use case.
The current plan is to rewrite the glsl parser, integrate it with the Elm compiler, and only after we can think about supporting more types in shaders.
Closing because this is tracked in #36
The type of an array in a shader is incorrectly inferred as just the primitive type. Example:
yields
Where
palette
should probably have been inferred asArray Int
.Combined with the inability to generate textures at runtime, this is a real obstruction when for example creating a graphics editing application.