Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFlawed resampling of downscaled images #21483
Open
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I originally created this issue in the webrender repository. Apparently it is no webrender issue.
It seems scaled bitmaps (displayed smaller than acutal size) are not properly resampled and therefore show artefacts. I have just started to dive into webrender and so far have only a limited understanding of the webrender approach to rendering. My view on the topic is the following:
In order to display scaled bitmaps at the best possible quality they need to be resampled. It is a crucial question of design when/how often this is done as is usually involves creating/destroying buffers and a somewhat costly resampling step.
What is the overall design approach here? I could think of a few but am very unsure if they fit in.
Ideas:
upsampling images should be avoided, zoomed images can be sampled using the GPUs built-in bilinear filtering
live downsampling via mipmaps is a workaround to downsampling. It is unclear if this fits into the overall design. It probably makes no sense to generate mipchains for each image as they consume memory and bandwidth.
dynamic downsampling provides the best image quality. Probably uploading the original image to the GPU is a good idea. Resampling can be done efficiently using separable filters on the gpu. This involes intermediate buffers.