这是indexloc提供的服务,不要输入任何密码
Skip to content

Naming of vertex formats #164

@Kangz

Description

@Kangz

Currently the vertex format enum is a bit of a stub:

enum WebGPUVertexFormat {
    "floatR32G32B32A32",
    "floatR32G32B32",
    "floatR32G32",
    "floatR32"
    // TODO other vertex formats
};

Feedback we got internally is that first it is weird for vertex formats to use "RGBA" in their name instead of "XYZW". Also the names are very redundant. The suggestion is to use "Vec" + count + type + size + normalized giving names like Vec4Float32, Vec4Uint8Norm, Vec2Int16Unorm and (assume Vec1 is implicit) Float32, Int8Norm, etc.

Special vertex formats could use similar but longer naming: Vec3Uint10Uint2 for the 32bit 10-10-10-2 unnormalized integer format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions