How to update shader uniforms?
Opened this issue · 1 comments
catgirljenni commented
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.
tonsky commented
Hm. It takes only 0.02..0.06 ms for me
You can try asking on https://groups.google.com/g/skia-discuss/, if there’s a better way I’m happy to provide API for it