Skip to content

Commit

Permalink
Fixed 2D preview export regression (#715)
Browse files Browse the repository at this point in the history
  • Loading branch information
RodZill4 committed Oct 26, 2024
1 parent 0ffd6f4 commit b4efa62
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions material_maker/panels/preview_2d/preview_2d.gd
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ 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);}")
for u in source.uniforms:
tmp_material.set_shader_parameter(u.name, u.value)
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")
Expand Down

0 comments on commit b4efa62

Please sign in to comment.