Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

[wgsl-in] Type aliases for a vecN<T> doesn't work when constructing vec from a single argument #2105

Closed
@Wumpf

Description

@Wumpf

Given
type Vec3 = vec3<f32>;

Try to create a Vec3 from a single argument:
let thing = Vec3(0.5);

I get an "Expression is invalid" error.

In contrast these things all work fine:

    let a = Vec3(0.0, 0.0, 0.0);
    let c = vec3<f32>(0.0);
    let b = Vec3(vec2<f32>(0.0), 0.0);
    let d = Vec3(vec2<f32>(0.0), 0.0);

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: front-endInput formats for conversionkind: bugSomething isn't workinglang: WGSLWebGPU shading language

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions