Skip to content

Instantly share code, notes, and snippets.

@jimmyjonezz
jimmyjonezz / mask.gd
Last active April 6, 2020 17:00
Alpha mask on shader for Godot
shader_type canvas_item;
uniform sampler2D base_mask: texture;
uniform vec2 size;
uniform vec2 scale;
uniform vec2 position;
uniform vec2 region;
vec2 uv(vec2 uv) {
vec2 s = vec2(size.x / scale.x, size.x / scale.y);