Skip to content

Commit

Permalink
Fix some image effects resulting in wrong colors when the image has n…
Browse files Browse the repository at this point in the history
…on-opaque pixels
  • Loading branch information
OverloadedOrama committed Jul 30, 2024
1 parent c59ce34 commit 7d30aed
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Shaders/Effects/OffsetPixels.gdshader
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
shader_type canvas_item;
render_mode unshaded;

uniform sampler2D selection : filter_nearest;
uniform vec2 offset = vec2(0.0); // In pixels
Expand Down
1 change: 1 addition & 0 deletions src/Shaders/Effects/Palettize.gdshader
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/Shaders/Effects/Pixelize.gdshader
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/Shaders/Effects/Posterize.gdshader
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/Shaders/Effects/Rotation/OmniScale.gdshader
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 1 addition & 0 deletions src/Shaders/Effects/Rotation/cleanEdge.gdshader
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7d30aed

Please sign in to comment.