elm-explorations / elm-explorations/webgl

Workaround for uniform array type inference failure

Open
#37 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Elm
Stars
123
Forks
17
PR merge metrics
No merged PRs in 30d

Description

I have the following Elm type for uniforms:

`type alias Uniforms = { cellColors : List Vec3 }`

In a vertex shader I have the following declaration for an array of vec3 uniform:

`uniform vec3 cellColors[9];`

The GLSL parser, however, is inferring/parsing the type of the `cellColors` variable to be `Vec3`, and not `Array Vec3`.

It seems as if this is a bug in the underlying GLSL parsing library: https://github.com/noteed/language-glsl/issues/19

Is there a way to work around this bug?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.