1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-29 16:16:38 +00:00

Merge pull request #50889 from Chaosus/shader_const_array_3.x

[3.x] Implemented global const array to shaders
This commit is contained in:
Rémi Verschelde
2021-07-27 13:05:32 +02:00
committed by GitHub
3 changed files with 272 additions and 26 deletions

View File

@@ -441,6 +441,8 @@ public:
struct ConstantNode : public Node {
DataType datatype;
String struct_name = "";
int array_size = 0;
union Value {
bool boolean;
@@ -450,7 +452,9 @@ public:
};
Vector<Value> values;
Vector<ArrayDeclarationNode::Declaration> array_declarations;
virtual DataType get_datatype() const { return datatype; }
virtual String get_datatype_name() const { return struct_name; }
ConstantNode() :
Node(TYPE_CONSTANT),
@@ -570,6 +574,7 @@ public:
StringName type_str;
DataPrecision precision;
ConstantNode *initializer;
int array_size;
};
struct Function {