diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-01-06 16:28:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-06 16:28:45 +0100 |
commit | a7baf013524ccd271bd123d8aef93a73b450a888 (patch) | |
tree | f6b0f142b5b9e44805b814acb69f0be656061a11 /scene/resources/material.h | |
parent | a3b76e26f34b668993382e6c32b7d3afaca0259f (diff) | |
parent | cdb216f4e4096dd45973cb9fd3b9b00d50789e35 (diff) |
Merge pull request #44950 from reduz/shader-debugger
Added ability to visualize native shaders
Diffstat (limited to 'scene/resources/material.h')
-rw-r--r-- | scene/resources/material.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scene/resources/material.h b/scene/resources/material.h index a2183a65e4..0048b43c8b 100644 --- a/scene/resources/material.h +++ b/scene/resources/material.h @@ -47,6 +47,8 @@ class Material : public Resource { Ref<Material> next_pass; int render_priority; + void inspect_native_shader_code(); + protected: _FORCE_INLINE_ RID _get_material() const { return material; } static void _bind_methods(); @@ -66,6 +68,7 @@ public: int get_render_priority() const; virtual RID get_rid() const override; + virtual RID get_shader_rid() const = 0; virtual Shader::Mode get_shader_mode() const = 0; Material(); @@ -100,6 +103,8 @@ public: virtual Shader::Mode get_shader_mode() const override; + virtual RID get_shader_rid() const override; + ShaderMaterial(); ~ShaderMaterial(); }; @@ -736,7 +741,7 @@ public: static RID get_material_rid_for_2d(bool p_shaded, bool p_transparent, bool p_double_sided, bool p_cut_alpha, bool p_opaque_prepass, bool p_billboard = false, bool p_billboard_y = false); - RID get_shader_rid() const; + virtual RID get_shader_rid() const override; virtual Shader::Mode get_shader_mode() const override; |