Skia and Stride Combination

Hey, I have a basic question about the combination of Skia and Stride, especially for user interfaces. From my first look Skia seems to have more possibilities for interaction functions like ButtunBehavior, ImGui, Elementa … for classical 2D user interfaces. If I want to work with 2D-TextureFilter in addition, I haven’t really found anything with Skia yet, is that so? With Stride I found more right away. Does this mean that if I want to combine the two themes I have to combine Skia and Stride, is this recommended from a performance and stability point of view? If so what is the cleanest way to do that, I found SkiaTexture but with that I lose the interaction inputs from Skia? Is there the reverse way to get a stride texture into Skia?

Many greetings
Jens

You might wanna try the SkiaRenderer node!

1 Like

Thank you, that helps me further, the interaction is back. Unfortunately, the color representation in the stride is slightly shifted. I have already gone through all modes in the RenderState pin of the RenderEntity, there is always a slight colour shift, can this be solved?

Is there an alternative way to get a stride texture into the Skia renderer?

I tried to upload a screenshot, but the upload does not work.

see answers here: Stride displays colors wrong
does that help?

thanks for the link, yes disable the post effect is definitely an improvement. if i understand it correctly, however, this leads to restrictions in stride?

is there a way to get a stride texture in skia?

Absolutely. I just had to do something similar. This is how I did it:

The output of DrawImage is a Layer, which you can then render in Skia. If you use ImGUI there is a LayerWidget, which you can use to display the layer as well.

On the Stride side you use SceneTexture instead of a Renderer.

But you should be aware that this potentially comes with its own set of limitations and unwanted side effects. Mainly that its not very efficient bringing something from the GPU (Stride) to the CPU (Skia), so its not very performant.

It was okay in our case though.

Hope that helps.

1 Like

thanks for the tip i will try it out

The TextureToImage node really consumes a lot of performance, unfortunately.

I also just need an edge filter from Stride into Skia,

Edge.vl (11.4 KB)

just to include the conversion from Stride into Skia doesn’t really make sense. Is there something comparable to the edge filter in Skia?

Best regards
Jens