summaryrefslogtreecommitdiff
path: root/servers/rendering/shader_language.h
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2021-06-09 12:33:41 +0300
committerYuri Roubinsky <chaosus89@gmail.com>2021-10-04 13:57:44 +0300
commit6873ecaaf9b2c5ad35487b1ff1d4be17770d7aab (patch)
treede4cd78ab2cb88ef311b740fb3ace2640d85de76 /servers/rendering/shader_language.h
parenta8f53dccedd052db4d54cd90d3fc693c60c922de (diff)
Added support for uniform arrays in shaders
Diffstat (limited to 'servers/rendering/shader_language.h')
-rw-r--r--servers/rendering/shader_language.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/servers/rendering/shader_language.h b/servers/rendering/shader_language.h
index 18525e054e..7908658028 100644
--- a/servers/rendering/shader_language.h
+++ b/servers/rendering/shader_language.h
@@ -692,8 +692,10 @@ public:
int order = 0;
int texture_order = 0;
+ int texture_binding = 0;
DataType type = TYPE_VOID;
DataPrecision precision = PRECISION_DEFAULT;
+ int array_size = 0;
Vector<ConstantNode::Value> default_value;
Scope scope = SCOPE_LOCAL;
Hint hint = HINT_NONE;
@@ -776,7 +778,7 @@ public:
static bool is_scalar_type(DataType p_type);
static bool is_float_type(DataType p_type);
static bool is_sampler_type(DataType p_type);
- static Variant constant_value_to_variant(const Vector<ShaderLanguage::ConstantNode::Value> &p_value, DataType p_type, ShaderLanguage::ShaderNode::Uniform::Hint p_hint = ShaderLanguage::ShaderNode::Uniform::HINT_NONE);
+ static Variant constant_value_to_variant(const Vector<ShaderLanguage::ConstantNode::Value> &p_value, DataType p_type, int p_array_size, ShaderLanguage::ShaderNode::Uniform::Hint p_hint = ShaderLanguage::ShaderNode::Uniform::HINT_NONE);
static PropertyInfo uniform_to_property_info(const ShaderNode::Uniform &p_uniform);
static uint32_t get_type_size(DataType p_type);