Skip to content
This repository was archived by the owner on Aug 14, 2025. It is now read-only.
This repository was archived by the owner on Aug 14, 2025. It is now read-only.

Resolution scale with upscaling #4

Description

@rocksdanister

Rendering the shader at lower resolution and upscaling is a good way to improve performance, particularly useful with certain shaders that do use texture when it has minimal visual impact.

I am still learning Skia, I have tried:

  1. Copying the lower resolution output to a offscreen canvas and upscaling which does work but very poor performance at higher shader resolution.
  2. ViewBox - renders at full resolution.
  3. effect.ToShader(uniforms, children, SKMatrix.CreateScale(scaleFactor, scaleFactor)) does not work.
  4. canvas.Scale(scaleFactor, scaleFactor); renders at lower resolution but not sure how to upscale again without having the shader run at full resolution.
  5. Setting ShaderWidth and Height and then adjusting stretch value - renders at full resolution.

Thanks for this project, it helped me finish the port of my weather app to Avalonia. The Windows version uses UWP with library ComputeSharp - one feature it has is the ability to set Resolution Scale (0 - 1).. I was hoping we can figure out something similar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions