From 482d0e311d3f0b6b9c5c75a7af6f154785b5f739 Mon Sep 17 00:00:00 2001 From: akorzunin Date: Fri, 13 Sep 2024 15:42:53 +0300 Subject: [PATCH] fix: outline shader --- src/models/icosahedron/shaders/outline_v1.gdshader | 5 +++-- src/models/icosahedron/test/variant_test.gd | 6 +++--- src/models/icosahedron/test/variant_test.tscn | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/models/icosahedron/shaders/outline_v1.gdshader b/src/models/icosahedron/shaders/outline_v1.gdshader index 0ea998c..ded4fd9 100644 --- a/src/models/icosahedron/shaders/outline_v1.gdshader +++ b/src/models/icosahedron/shaders/outline_v1.gdshader @@ -23,8 +23,9 @@ void vertex() { void fragment() { if (enable) { - ALBEDO = color.rgb; - ALPHA = 0.5; + //ALBEDO = color.rgb; + ALBEDO = vec3(0.); + ALPHA = 0.9; } else { ALPHA = 0.; } diff --git a/src/models/icosahedron/test/variant_test.gd b/src/models/icosahedron/test/variant_test.gd index b1f85e3..c36b5ea 100644 --- a/src/models/icosahedron/test/variant_test.gd +++ b/src/models/icosahedron/test/variant_test.gd @@ -5,7 +5,7 @@ var controlledNode @onready var pattern_gen: PatternGen = $PatternGen -@export var ROTATION_SPEED: float = G.settings.ROTATION_SPEED +@export var ROTATION_SPEED: float = 12 @export_category("variant settings") @export var show_face_numbers: bool = true @@ -23,9 +23,9 @@ func get_next(): var next_type: int match spawn_type: 0: next_type = pattern_gen.next_pattern() - 1: next_type = randi_range(17, 19) + 1: next_type = randi_range(0, 19) 2: next_type = variant_type - print_debug("Spawinig next figure woth type: ", next_type) + print_debug("Spawinig next figure with type: ", next_type) spawn_next(next_type) func remove_current(): diff --git a/src/models/icosahedron/test/variant_test.tscn b/src/models/icosahedron/test/variant_test.tscn index dd89f5d..0124289 100644 --- a/src/models/icosahedron/test/variant_test.tscn +++ b/src/models/icosahedron/test/variant_test.tscn @@ -25,7 +25,7 @@ shader_parameter/bg_color = Color(0.729, 0.902, 0.992, 1) [node name="VariantTest" type="Node3D"] script = ExtResource("1_4av47") -spawn_type = 2 +spawn_type = 1 [node name="Environment" type="Node3D" parent="."]