first examples
This commit is contained in:
parent
a01a7a7acc
commit
2219e943da
33 changed files with 785 additions and 6 deletions
12
shaders/005_displacing_vertices/displacing_vertices.gdshader
Normal file
12
shaders/005_displacing_vertices/displacing_vertices.gdshader
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
shader_type spatial;
|
||||
|
||||
uniform float waves = 3.0;
|
||||
|
||||
void vertex() {
|
||||
// Changing the waves parameter changes how warped the sphere is
|
||||
VERTEX.y += 0.5 + sin(VERTEX.x * waves + TIME * 4.0) * 0.35;
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
ALBEDO = vec3(0.1, 0.2, 0.6);
|
||||
}
|
||||
16
shaders/005_displacing_vertices/displacing_vertices.tscn
Normal file
16
shaders/005_displacing_vertices/displacing_vertices.tscn
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://du06a3dwu2yy6"]
|
||||
|
||||
[ext_resource type="Shader" path="res://shaders/005_displacing_vertices/displacing_vertices.gdshader" id="1_7mier"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_c46ul"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("1_7mier")
|
||||
shader_parameter/waves = 3.0
|
||||
|
||||
[sub_resource type="SphereMesh" id="SphereMesh_l7vfg"]
|
||||
material = SubResource("ShaderMaterial_c46ul")
|
||||
|
||||
[node name="DisplacingVertices" type="Node3D"]
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
mesh = SubResource("SphereMesh_l7vfg")
|
||||
Loading…
Add table
Add a link
Reference in a new issue