From cdb216f4e4096dd45973cb9fd3b9b00d50789e35 Mon Sep 17 00:00:00 2001 From: reduz Date: Tue, 5 Jan 2021 20:01:50 -0300 Subject: Added ability to visualize native shaders --- servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp') diff --git a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp index 05ffc0086d..5b3c3c703f 100644 --- a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp @@ -2239,6 +2239,11 @@ Variant RendererCanvasRenderRD::ShaderData::get_default_parameter(const StringNa return Variant(); } +RS::ShaderNativeSourceCode RendererCanvasRenderRD::ShaderData::get_native_source_code() const { + RendererCanvasRenderRD *canvas_singleton = (RendererCanvasRenderRD *)RendererCanvasRender::singleton; + return canvas_singleton->shader.canvas_shader.version_get_native_source_code(version); +} + RendererCanvasRenderRD::ShaderData::ShaderData() { valid = false; uses_screen_texture = false; -- cgit v1.2.3