mirror of
https://github.com/Relintai/material-maker.git
synced 2024-11-13 06:27:18 +01:00
d1b8f12b5b
- Added a combine node that assembles channels into colors - Added an emboss node - Added an export node that generates additional file when exporting the material - Refactored convolution related code
28 lines
569 B
GDScript
28 lines
569 B
GDScript
tool
|
|
extends "res://addons/procedural_material/node_base.gd"
|
|
|
|
func _ready():
|
|
pass
|
|
|
|
func _get_shader_code(uv):
|
|
var rv = { defs="", code="", f="0.0" }
|
|
var src = get_source()
|
|
if src != null:
|
|
rv = src.get_shader_code(uv)
|
|
return rv
|
|
|
|
func export_textures(prefix):
|
|
var suffix = $Suffix.text
|
|
if suffix != "":
|
|
get_parent().export_texture(get_source(), prefix+"_"+suffix+".png", 1024)
|
|
|
|
func serialize():
|
|
var data = .serialize()
|
|
data.suffix = $Suffix.text
|
|
return data
|
|
|
|
func deserialize(data):
|
|
if data.has("suffix"):
|
|
$Suffix.text = data.suffix
|
|
.deserialize(data)
|