Allow setting a cubemap as default parameter to shader
This commit is contained in:
@ -58,7 +58,7 @@ private:
|
||||
String code;
|
||||
String include_path;
|
||||
|
||||
HashMap<StringName, HashMap<int, Ref<Texture2D>>> default_textures;
|
||||
HashMap<StringName, HashMap<int, Ref<Texture>>> default_textures;
|
||||
|
||||
void _dependency_changed();
|
||||
void _recompile();
|
||||
@ -66,6 +66,12 @@ private:
|
||||
Array _get_shader_uniform_list(bool p_get_groups = false);
|
||||
|
||||
protected:
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
void _set_default_texture_parameter_bind_compat_95126(const StringName &p_name, const Ref<Texture2D> &p_texture, int p_index = 0);
|
||||
Ref<Texture2D> _get_default_texture_parameter_bind_compat_95126(const StringName &p_name, int p_index = 0) const;
|
||||
static void _bind_compatibility_methods();
|
||||
#endif // DISABLE_DEPRECATED
|
||||
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
@ -80,8 +86,8 @@ public:
|
||||
|
||||
void get_shader_uniform_list(List<PropertyInfo> *p_params, bool p_get_groups = false) const;
|
||||
|
||||
void set_default_texture_parameter(const StringName &p_name, const Ref<Texture2D> &p_texture, int p_index = 0);
|
||||
Ref<Texture2D> get_default_texture_parameter(const StringName &p_name, int p_index = 0) const;
|
||||
void set_default_texture_parameter(const StringName &p_name, const Ref<Texture> &p_texture, int p_index = 0);
|
||||
Ref<Texture> get_default_texture_parameter(const StringName &p_name, int p_index = 0) const;
|
||||
void get_default_texture_parameter_list(List<StringName> *r_textures) const;
|
||||
|
||||
virtual bool is_text_shader() const;
|
||||
|
||||
Reference in New Issue
Block a user