Skip to content

Wrapper to align values for dynamic uniforms #8

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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