Skip to content

const array does not expand references to other consts #190

@hukasu

Description

@hukasu
const min = vec3(-1.5);
const max = vec3(1.5);
const min_max = array(min, max);

@fragment
fn fragment() {
    // This errors
    let v = min_max[0];
}

the error

Shader '' parsing error: no definition in scope for identifier: `min`
   ┌─ wgsl:19:20
   │
19 │     let v = (array(min, max))[0];
   │                    ^^^ unknown identifier

this may not be a functioning shader, but it shows what i did

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions