From 3fb2877b7315834948bfaed5b618541f8ae8ad0a Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas Date: Sun, 10 Mar 2024 14:59:55 +0200 Subject: [PATCH] Fix pattern sampler2D in shaders not repeating When using the Bucket tool to fill with pattern in "Similar colors" and "Whole selection" modes, the pattern was not being repeated. --- src/Shaders/ColorReplace.gdshader | 2 +- src/Shaders/PatternFill.gdshader | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Shaders/ColorReplace.gdshader b/src/Shaders/ColorReplace.gdshader index 472bb2471..73ac9a80c 100644 --- a/src/Shaders/ColorReplace.gdshader +++ b/src/Shaders/ColorReplace.gdshader @@ -12,7 +12,7 @@ uniform float similarity_percent : hint_range(0.0, 100.0); uniform sampler2D selection; uniform bool has_pattern; -uniform sampler2D pattern; +uniform sampler2D pattern: repeat_enable; uniform vec2 pattern_size; uniform vec2 pattern_uv_offset; diff --git a/src/Shaders/PatternFill.gdshader b/src/Shaders/PatternFill.gdshader index 819571567..586b27ed2 100644 --- a/src/Shaders/PatternFill.gdshader +++ b/src/Shaders/PatternFill.gdshader @@ -2,7 +2,7 @@ shader_type canvas_item; render_mode unshaded; uniform sampler2D selection; -uniform sampler2D pattern; +uniform sampler2D pattern: repeat_enable; uniform vec2 size; uniform vec2 pattern_size; uniform vec2 pattern_uv_offset;