Skip to content

Wrapper to align values for dynamic uniforms #8

Open
@LPGhatguy

Description

@LPGhatguy

Some graphics APIs like WebGPU require dynamic uniform offsets to be a multiple of 256. shader-types has a type named DymamicOffsetMember that helps with this, but it creates trailing padding bytes which interacts poorly with crates like bytemuck.

Would it make sense for glsl-layout to have a type like this? If it can calculate and add manual trailing padding to the AsStd140 version of the type, that would help avoid unspecified padding bytes.

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