diff --git a/material_maker/panels/preview_2d/preview_2d.gd b/material_maker/panels/preview_2d/preview_2d.gd index 3d74537fe..2e071f3f4 100644 --- a/material_maker/panels/preview_2d/preview_2d.gd +++ b/material_maker/panels/preview_2d/preview_2d.gd @@ -186,7 +186,7 @@ func create_image(renderer_function : String, params : Array, image_size : int) var tmp_material = ShaderMaterial.new() tmp_material.shader = Shader.new() tmp_material.shader.code = MMGenBase.generate_preview_shader(source, source.output_type, "uniform vec2 mm_texture_size;\nuniform float mm_chunk_size = 1.0;\nuniform vec2 mm_chunk_offset = vec2(0.0);\nvoid fragment() {COLOR = preview_2d(mm_chunk_offset+mm_chunk_size*UV);}") - mm_deps.material_update_params(tmp_material) + mm_deps.material_update_params(MMShaderMaterial.new(tmp_material)) var renderer = await mm_renderer.request(self) renderer = await renderer.render_material(self, tmp_material, image_size, source.output_type != "rgba") renderer.callv(renderer_function, params)