Fixed issues #5 and #7

This commit is contained in:
RodZill4 2019-01-27 09:00:30 +01:00
parent 4baba77243
commit 0b7a36282e
3 changed files with 4 additions and 4 deletions

View File

@ -22,7 +22,7 @@
{
"tree_item":"Generators/Image",
"type":"image",
"file_path":"res://addons/material_maker/nodes/godot_logo.png"
"file_path":"res://addons/material_maker/nodes/image/godot_logo.png"
},
{
"tree_item":"Generators/Pattern",

View File

@ -45,12 +45,12 @@ func get_textures():
list[name] = final_texture
return list
func _get_shader_code(uv):
func _get_shader_code(uv, slot = 0):
var rv = { defs="", code="" }
var src = get_source()
if src == null:
return rv
input_shader = get_parent().generate_shader(src.get_shader_code_get_globals("UV"))
input_shader = get_parent().renderer.generate_shader(src.get_shader_code_with_globals("UV"))
_rerender()
if generated_variants.empty():
rv.defs = "uniform sampler2D %s_tex;\n" % [ name ]

View File

@ -19,7 +19,7 @@ func get_textures():
list[name] = $TextureButton.texture_normal
return list
func _get_shader_code(uv):
func _get_shader_code(uv, slot = 0):
var rv = { defs="", code="" }
if generated_variants.empty():
rv.defs = "uniform sampler2D %s_tex;\n" % [ name ]