mirror of
https://github.com/Relintai/material-maker.git
synced 2025-01-13 07:41:14 +01:00
10ea905090
- 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
13 lines
354 B
GDScript
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")
|