Is there an existing issue for this?
Use case
I have an external texture that I want to render using FragmentShader. I see that FragmentShader.setImageSampler accepts Image only, and there's no way to pass Texture sampler.
I don't have a workaround for now, but I'm considering using decodeImageFromPixels instead of working with Texture directly.
Proposal
Future<FragmentShader> loadShader() async {
var textureId = await _createExternalTexture();
var texture = Texture(textureId: textureId);
var program = await FragmentProgram.fromAsset('shaders/myshader.frag');
var shader = program.fragmentShader();
shader.setImageSampler(0, texture);
return shader;
}
Is there an existing issue for this?
Use case
I have an external texture that I want to render using
FragmentShader. I see thatFragmentShader.setImageSampleracceptsImageonly, and there's no way to passTexturesampler.I don't have a workaround for now, but I'm considering using decodeImageFromPixels instead of working with
Texturedirectly.Proposal