This commit is contained in:
Luca 2025-01-02 10:46:25 +01:00
parent 2219e943da
commit c4115b3569
40 changed files with 2035 additions and 19 deletions

View file

@ -8,9 +8,6 @@ extends Node3D
@onready var shader_material = $MeshInstance3D.mesh.material
func _ready() -> void:
print(shader_material)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass

View file

@ -1,13 +1,10 @@
shader_type spatial;
uniform float my_variable = 0.0;
render_mode cull_disabled;
void vertex() {
VERTEX.y += my_variable;
// Called for every vertex the material is visible on.
}
void fragment() {
ALBEDO = NORMAL;
// Called for every pixel the material is visible on.
}

View file

@ -3,16 +3,15 @@
[ext_resource type="Shader" path="res://shaders/000_playground/playground.gdshader" id="1_0fhw0"]
[ext_resource type="Script" path="res://shaders/000_playground/playground.gd" id="1_08keh"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_h8cto"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_fofry"]
render_priority = 0
shader = ExtResource("1_0fhw0")
shader_parameter/my_variable = 1.0
[sub_resource type="SphereMesh" id="SphereMesh_6preo"]
material = SubResource("ShaderMaterial_h8cto")
[sub_resource type="SphereMesh" id="SphereMesh_v7gb1"]
material = SubResource("ShaderMaterial_fofry")
[node name="Playground" type="Node3D"]
script = ExtResource("1_08keh")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
mesh = SubResource("SphereMesh_6preo")
mesh = SubResource("SphereMesh_v7gb1")