Bilinear Filtered Scaling

by ntfwc

0

Description

This project provides a bilinear filtering shader and a script for using it with a viewport to replace the default window scaling.

This is mainly useful for pixel art games. The default scaling uses nearest-neighbor, which causes apparent pixel sizing to vary when at resolutions that are not perfect multiplications of the source resolution. By using this shader and updating the pixel_scale uniform, you get well defined pixels at any resolution larger than the source.

Using it

This is a Godot 3 project. Refer to the Godot 3 documentation for how to use the editor and launch a project.

The default scene shows a test image and demonstrates the shader working with window scaling. To use it in a project, you would only have to replace the TextureRect under the Viewport with your main scene, and set the viewport resolution.

Version

1.1

Engine

3.0.4

Category

Shaders

Download

Version1.1
Download

Support

If you need help or have questions about this plugin, please contact the author.

Contact Author