diff options
Diffstat (limited to 'servers/visual/shader_language.h')
-rw-r--r-- | servers/visual/shader_language.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/servers/visual/shader_language.h b/servers/visual/shader_language.h index 67c273d267..934dc2c403 100644 --- a/servers/visual/shader_language.h +++ b/servers/visual/shader_language.h @@ -80,6 +80,7 @@ public: TK_TYPE_SAMPLERCUBE, TK_INTERPOLATION_FLAT, TK_INTERPOLATION_SMOOTH, + TK_CONST, TK_PRECISION_LOW, TK_PRECISION_MID, TK_PRECISION_HIGH, @@ -440,6 +441,13 @@ public: }; struct ShaderNode : public Node { + + struct Constant { + DataType type; + DataPrecision precision; + ConstantNode *initializer; + }; + struct Function { StringName name; FunctionNode *function; @@ -492,6 +500,7 @@ public: } }; + Map<StringName, Constant> constants; Map<StringName, Varying> varyings; Map<StringName, Uniform> uniforms; Vector<StringName> render_modes; @@ -632,6 +641,7 @@ private: IDENTIFIER_FUNCTION_ARGUMENT, IDENTIFIER_LOCAL_VAR, IDENTIFIER_BUILTIN_VAR, + IDENTIFIER_CONSTANT, }; bool _find_identifier(const BlockNode *p_block, const Map<StringName, BuiltInInfo> &p_builtin_types, const StringName &p_identifier, DataType *r_data_type = NULL, IdentifierType *r_type = NULL); |