How to use SkRuntimeEffect.makeShader() for offscreen rendering with named uniforms? #3433
Unanswered
Trevor16gordon
asked this question in
Q&A
Replies: 1 comment
-
|
Hi @wcandillon I'm wondering if you might be able to help here? I see you're active on other issues in this repo. I'd really appreciate it 🙏🏼🙏🏼🙏🏼 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have a custom shader created with Skia.RuntimeEffect.Make() that works correctly when used declaratively within a component. My goal is to render this shader offscreen to an SkImage so I can access its output data.
Based on the available examples for offscreen rendering, it seems I need to create an SkShader object (current examples only use factory methods here). I'm working from my current implementation where I create my shader using an SkRuntimeEffect. So, I'm struggling to find the correct way to convert my SkRuntimeEffect into an SkShader, specifically using the runtimeEffect.makeShader() method.
Current Working Implementation
The Problem
To render offscreen, I need to create an SkShader instance. My attempt looks like this:
Specific Questions
Is someone able to provide a brief example of using RuntimeEffect.makeShader() with a combination of float, vector, and child shader uniforms?
I appreciate any help!
Beta Was this translation helpful? Give feedback.
All reactions