first examples

This commit is contained in:
Luca 2024-12-19 14:04:09 +01:00
parent a01a7a7acc
commit 2219e943da
33 changed files with 785 additions and 6 deletions

View file

@ -0,0 +1,14 @@
shader_type spatial;
// To send data from the vertex to the fragment (or light) processor function,
// varyings are used. They are set for every primitive vertex in the vertex processor,
// and the value is interpolated for every pixel in the fragment processor.
varying vec3 color;
void vertex() {
color = NORMAL;
}
void fragment() {
ALBEDO = color;
}

View file

@ -0,0 +1,15 @@
[gd_scene load_steps=4 format=3 uid="uid://bjoxcmy6sy8lb"]
[ext_resource type="Shader" path="res://shaders/008_normals/normals.gdshader" id="1_bpfbn"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ktxik"]
render_priority = 0
shader = ExtResource("1_bpfbn")
[sub_resource type="SphereMesh" id="SphereMesh_288vy"]
material = SubResource("ShaderMaterial_ktxik")
[node name="Normals" type="Node3D"]
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
mesh = SubResource("SphereMesh_288vy")