### Godot version

9f9210e60cddb2fa82ce5f7d71fcba340f2edbd1

### System information

Windows 11

### Issue description

I found that one of particles shaders in my project begin working incorrectly after the recent fixes. I've bisected it to 9f9210e60cddb2fa82ce5f7d71fcba340f2edbd1.

Before:
![image](https://github.com/godotengine/godot/assets/3036176/556bb0ed-6214-42ce-b194-8b54b0349b18)


After:
![image](https://github.com/godotengine/godot/assets/3036176/b3fa0b8a-20a6-4c5a-aea7-3e1ec465ea3e)


### Steps to reproduce

Download the provided test project and compare changes with different version.

### Minimal reproduction project

[bug.zip](https://github.com/godotengine/godot/files/12476303/bug.zip)

return use_hdr;
}
void GradientTexture2D::set_fill_from(Vector2 p_fill_from) {
	fill_from = p_fill_from;
	_queue_update();
	emit_changed();
}
Vector2 GradientTexture2D::get_fill_from() const {
	return fill_from;
}
void GradientTexture2D::set_fill_to(Vector2 p_fill_to) {
	fill_to = p_fill_to;
	_queue_update();
	emit_changed();
}
Vector2 GradientTexture2D::get_fill_to() const {
	return fill_to;
}
void GradientTexture2D::set_fill(Fill p_fill) {
	fill = p_fill;
	_queue_update();
	emit_changed();
}
GradientTexture2D::Fill GradientTexture2D::get_fill() const {
	return fill;
}
void GradientTexture2D::set_repeat(Repeat p_repeat) {