Skip to content

Commit

Permalink
Fixed rendering 2D preview to reference
Browse files Browse the repository at this point in the history
  • Loading branch information
RodZill4 committed Nov 5, 2023
1 parent b6ca53b commit c15e9ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion material_maker/panels/preview_2d/preview_2d.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c15e9ae

Please sign in to comment.