Skip to content

[Impeller] Add feature to allow attribute mapping of uint32s host-side to vec4s shader-side #102778

@bdero

Description

@bdero

Once the GLES 2 renderer lands, impellerc could be extended to map the 4
color bytes to vec4s in the shader, i.e.:
glVertexAttribPointer(2, 4, GL_UNSIGNED_BYTE, false, 4, nullptr);
...as opposed to:
glVertexAttribPointer(2, 4, GL_FLOAT, false, 16, nullptr);

impellerc could e.g. detect some kind of special naming convention hint
from the attribute name to support this case:
in vec4 vertex_color__byte;

Such a feature would remove the need to convert color data in some cases, as in flutter/engine#32981.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilitye: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions