2018-07-22 17:20:27 +02:00
|
|
|
tool
|
|
|
|
extends "res://addons/procedural_material/node_base.gd"
|
|
|
|
|
|
|
|
func _ready():
|
|
|
|
set_slot(0, true, 0, Color(0.5, 0.5, 1), false, 0, Color(0.5, 0.5, 1))
|
2018-07-25 06:20:36 +02:00
|
|
|
set_slot(1, true, 0, Color(0.5, 0.5, 1), false, 0, Color(0.5, 0.5, 1))
|
2018-07-22 17:20:27 +02:00
|
|
|
|
2018-07-26 08:31:28 +02:00
|
|
|
func _get_shader_code(uv):
|
2018-07-25 06:20:36 +02:00
|
|
|
var rv = { defs="", code="", f="0.0" }
|
2018-07-22 17:20:27 +02:00
|
|
|
var src = get_source()
|
2018-07-24 08:04:25 +02:00
|
|
|
if src != null:
|
|
|
|
rv = src.get_shader_code(uv)
|
2018-07-25 06:20:36 +02:00
|
|
|
rv.albedo = get_source_rgb(rv)
|
|
|
|
src = get_source(1)
|
|
|
|
if src != null:
|
|
|
|
var src_code = src.get_shader_code(uv)
|
|
|
|
rv.defs += src_code.defs
|
|
|
|
rv.code += src_code.code
|
|
|
|
rv.normal_map = get_source_rgb(src_code)
|
2018-07-22 23:25:05 +02:00
|
|
|
return rv
|
|
|
|
|
|
|
|
func _get_state_variables():
|
|
|
|
return [ ]
|