-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work liste: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requeststeam-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Description
This would allow users to generate high bitrate textures in one shader and consume them in another.
example
class Foo {
final ui.FragmentShader sdfMaker;
final ui.FragmentShader renderer;
final ui.Rect _rect;
ui.Image _sdf;
bool _isDirty;
void draw(Canvas canvas) {
if (_isDirty) {
final recorder = PictureRecorder();
final subCanvas = Canvas(recorder);
final paint = Paint()..shader = sdfMaker;
subCanvas.drawRect(_rect, paint);
final picture = recorder.endRecording();
_sdf = picture.toImageSync(
canvas.size.width,
canvas.size.height,
targetPixelFormat: TargetPixelFormat.r32Float);
}
renderer.setImageSampler(0, _sdf);
final paint = Paint()..shader = renderer;
canvas.drawRect(_rect, paint);
}
}Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work liste: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requeststeam-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team