Skip to content

[Feat] PathStyleExtension: Save one vertex attribute when highPrecisionDash is disabled #10007

@amarant

Description

@amarant

Target Use Case

Currently, in PathStyleExtension, when the highPrecisionDash option is set to false (which is the default), the instanceDashOffsets vertex attribute remains constant at 0. In this case, the attribute is effectively unused and could be removed.

Avoiding this extra attribute would help prevent hitting the WebGL limit of 16 vertex attributes. At the moment, the PathLayer uses 13 attributes, and PathStyleExtension adds 2 more. This makes it difficult to use additional extensions without exceeding the limit.

Proposal

The proposal is to conditionally define and use instanceDashOffsets only when highPrecisionDash is enabled.

This could be implemented using a #define HIGH_PRECISION_DASH, similar to how DataFilterExtension conditionally enables its additional attributes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions