Skia Texture alpha aliasing in stride renderer

hi all,

I have a weird problem: My skia texture shows ugly antialiasing on the edges of text. I copied the heart of my drawing patch and tried feeding it plain text nodes. And the Antialiasing is gone.

This example patch is set up the same way as my project. I can render after-scene 3D or 2D. All my skia layers just go into that one skia texture. texture sizes and camera position is exactly the same. IDK why my patch shows this behavior.

stride quality.vl (51.7 KB)

Has anyone experienced a similar problem?

Maybe related:

“the raster tragedy in skia” lol

you have my deepest condolences.

what I do not understand is that I am unable to reproduce the error in my example patch. Do we really have the same problem? Because mine looks totally undersampled. Almost like I would display 720p with point sampling.

And like I said my main drawing patch is exactly the same. The only differenct would be that I handle my skia layers in some datastructures, but in the end the drawing should be the same.

I also tried using all effects and imagefilters, post fx I use in the final project. My testbpatch looks good, my project looks almost like 720p pointfiltered.

Both screenshots are taken with 2021.4.7

I guess I misunderstood. I thought you were refering to the “dark fringes” that are visible in the patch you posted. But thinking about it, even that is probably another issue more likely caused by the background color of the RenderTexture and/or the BlendState.

Didn’t download your screeshot too look at it at 100%.

Hard to tell without looking at that patch.

One thing you could try is using AlphaBlendPremultiplied instead of AlphaBlend.

1 Like

also, if you render a texture in high resolution and downscale it by uneven amounts, it will create these artifacts. downscaling is very problematic for text. so either use SkiaRenderer to don’t rasterize the text at all before displaying it or make sure the texture has the right size, so that the pixels don’t get scaled when displaying them.

and yes, as @bjoern noticed correctly, you are blending the text against a black background, so that will create black orders. if you dont blend the texture against the same color later, because the rgb information in the background color gets mixed with the text color if you rasterize text.

ok I found the culprit. I use custom regions to set my layers. Accidently I did set each skia layer double. the one from the dict grouped with the region content. So everything double.

This will probably help no one.
Just wanted to share.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.