Skip to content

How to update shader uniforms? #64

@outlineutils

Description

@outlineutils

I have made a runtime effect with RuntimeEffect.makeForShader(shaderSrc);
I have created the shader with effect.makeShader(Data.makeFromBytes(data), null, null, false) (data being a byte buffer of uniforms)
I created the paint with paint = new Paint(); paint.setShader(shader);

The problem is, none of these classes have a method to update the uniforms in the shader.
How do I do this? I can't just re create the shader as it takes ~3ms to create and uniforms need to be updated each frame.

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