material-maker/addons/procedural_material/material_preview.gd
RodZill4 10ea905090 Many changes & fixes...
- shader updates are delayed by .25 seconds to avouid UI freeze
- fixed GraphNode initialization upon loading
- started obsoleting get_source_rgb and get_source_f functions
- updated colorize node to use gradient
- image node can now be loaded/saved
- removed iqnoise node
- rewrote perlin shader to support a seed parameter (seed is calculated from the node's position, so just move it to reseed)
- Added voronoi noise node
- updated code to use % formats instead of concatenating strings (should solve type problems in shaders)
- reworked the context menu (now has submenus)
- fixes in the gradient editor
2018-07-28 09:37:51 +02:00

13 lines
354 B
GDScript

tool
extends Viewport
var material = null
func _ready():
material = ShaderMaterial.new()
material.shader = Shader.new()
material.shader.set_code("shader_type spatial;\nvoid fragment() {\n ALBEDO=vec3(0.5);\n}\n")
$Objects/Cube.set_surface_material(0, material)
$Objects/Cylinder.set_surface_material(0, material)
$AnimationPlayer.play("rotate")