mirror of
https://github.com/Relintai/material-maker.git
synced 2024-11-13 06:27:18 +01:00
parent
4baba77243
commit
0b7a36282e
@ -22,7 +22,7 @@
|
|||||||
{
|
{
|
||||||
"tree_item":"Generators/Image",
|
"tree_item":"Generators/Image",
|
||||||
"type":"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",
|
"tree_item":"Generators/Pattern",
|
||||||
|
@ -45,12 +45,12 @@ func get_textures():
|
|||||||
list[name] = final_texture
|
list[name] = final_texture
|
||||||
return list
|
return list
|
||||||
|
|
||||||
func _get_shader_code(uv):
|
func _get_shader_code(uv, slot = 0):
|
||||||
var rv = { defs="", code="" }
|
var rv = { defs="", code="" }
|
||||||
var src = get_source()
|
var src = get_source()
|
||||||
if src == null:
|
if src == null:
|
||||||
return rv
|
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()
|
_rerender()
|
||||||
if generated_variants.empty():
|
if generated_variants.empty():
|
||||||
rv.defs = "uniform sampler2D %s_tex;\n" % [ name ]
|
rv.defs = "uniform sampler2D %s_tex;\n" % [ name ]
|
||||||
|
@ -19,7 +19,7 @@ func get_textures():
|
|||||||
list[name] = $TextureButton.texture_normal
|
list[name] = $TextureButton.texture_normal
|
||||||
return list
|
return list
|
||||||
|
|
||||||
func _get_shader_code(uv):
|
func _get_shader_code(uv, slot = 0):
|
||||||
var rv = { defs="", code="" }
|
var rv = { defs="", code="" }
|
||||||
if generated_variants.empty():
|
if generated_variants.empty():
|
||||||
rv.defs = "uniform sampler2D %s_tex;\n" % [ name ]
|
rv.defs = "uniform sampler2D %s_tex;\n" % [ name ]
|
||||||
|
Loading…
Reference in New Issue
Block a user