1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 09:09:47 +00:00

Fix some image effects resulting in wrong colors when the image has non-opaque pixels

This commit is contained in:
Emmanouil Papadeas 2024-07-30 18:29:01 +03:00
parent c59ce34aad
commit 7d30aed62d
6 changed files with 6 additions and 0 deletions

View file

@ -1,4 +1,5 @@
shader_type canvas_item;
render_mode unshaded;
uniform sampler2D selection : filter_nearest;
uniform vec2 offset = vec2(0.0); // In pixels

View file

@ -1,6 +1,7 @@
// Maps the color of the input to the nearest color in the selected palette.
// Similar to Krita's Palettize filter
shader_type canvas_item;
render_mode unshaded;
uniform sampler2D palette_texture : filter_nearest;
uniform sampler2D selection : filter_nearest;

View file

@ -5,6 +5,7 @@ https://godotshaders.com/shader/pixelate-2/
This shader is under MIT license
*/
shader_type canvas_item;
render_mode unshaded;
uniform uvec2 pixel_size = uvec2(4);
uniform sampler2D selection : filter_nearest;

View file

@ -1,5 +1,6 @@
// https://godotshaders.com/shader/color-reduction-and-dither/
shader_type canvas_item;
render_mode unshaded;
uniform sampler2D selection : filter_nearest;
uniform float colors : hint_range(1.0, 255.0) = 2.0;

View file

@ -1,6 +1,7 @@
// No AA version from https://github.com/deakcor/godot-omniscale/blob/5dfee6e89cd955dd01dccfe70c9979f9b55bb1bf/OmniScale.shader
// Edited slightly by Overloaded to add rotation support for Pixelorama
shader_type canvas_item;
render_mode unshaded;
//#version 130

View file

@ -25,6 +25,7 @@ OTHER DEALINGS IN THE SOFTWARE.
shader_type canvas_item;
render_mode unshaded;
#include "res://src/Shaders/Effects/Rotation/CommonRotation.gdshaderinc"
//enables 2:1 slopes. otherwise only uses 45 degree slopes
#define SLOPE