Skip to content

Instantly share code, notes, and snippets.

View JakeLunn's full-sized avatar
🏠
Working from home

Jake Lunn JakeLunn

🏠
Working from home
View GitHub Profile
@CowThing
CowThing / pixel_perfect.gd
Last active April 6, 2024 17:09
Pixel perfect scaling script for Godot 3.1
extends Node
"""
An autoload singleton for pixel perfect rendering of the game.
Set this script as an autoload.
`base_size` - Is the target size of the viewport. The viewport will scale up to fit the largest
possible integer multiple of this size within the window.
`expand` - If true the viewport will expand to the edges of the window after scaling up.