new outline shader

This commit is contained in:
Nikolai Fesenko
2025-08-16 18:34:52 +02:00
parent d62d34c871
commit c473c0a2fb
13 changed files with 165 additions and 14 deletions

25
Shaders/outline.gdshader Normal file
View File

@@ -0,0 +1,25 @@
shader_type spatial;
render_mode cull_front, unshaded;
uniform bool is_active;
const vec3 color = vec3(0.95, 0.71, 0.01);
const float thickness = 0.1;
void vertex() {
if(is_active) {
VERTEX += NORMAL * thickness;
}
}
void fragment() {
if (is_active) {
ALBEDO = color;
ALPHA = 0.5;
}
}
//void light() {
// // Called for every pixel for every light affecting the material.
// // Uncomment to replace the default light processing function with this one.
//}