1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #94785 from Chaosus/shader_fix_samplers_order

Fix texture samplers to not being last in the property list
This commit is contained in:
Rémi Verschelde
2024-08-19 16:05:21 +02:00
6 changed files with 18 additions and 21 deletions

View File

@@ -648,6 +648,7 @@ public:
};
int order = 0;
int prop_order = 0;
int texture_order = 0;
int texture_binding = 0;
DataType type = TYPE_VOID;
@@ -664,6 +665,11 @@ public:
String group;
String subgroup;
_FORCE_INLINE_ bool is_texture() const {
// Order is assigned to -1 for texture uniforms.
return order < 0;
}
Uniform() {
hint_range[0] = 0.0f;
hint_range[1] = 1.0f;