diff --git a/src/models/icosahedron/components/Icosahedron.gd b/src/models/icosahedron/components/Icosahedron.gd index 9e0bec1..839c9e9 100644 --- a/src/models/icosahedron/components/Icosahedron.gd +++ b/src/models/icosahedron/components/Icosahedron.gd @@ -87,9 +87,6 @@ func _ready() -> void: Utils.set_shader_param(mesh_icosahedron, "enable", false, 2) Utils.set_shader_param(mesh_icosahedron, "enable", false, 3) - if Utils.get_platform() == Utils.Platform.WEB: - Utils.set_shader_param(mesh_icosahedron, "use_web_colors", true) - Utils.set_shader_param(mesh_icosahedron, "use_web_colors", true, 1) set_color(G.theme.figure_variants.get(variant.name, G.theme.base_color)) if inital_transfrm: diff --git a/src/models/icosahedron/shaders/icosahedron_shader_v1.gdshader b/src/models/icosahedron/shaders/icosahedron_shader_v1.gdshader index 3e3d541..fb7fd15 100644 --- a/src/models/icosahedron/shaders/icosahedron_shader_v1.gdshader +++ b/src/models/icosahedron/shaders/icosahedron_shader_v1.gdshader @@ -7,7 +7,6 @@ render_mode cull_disabled; uniform bool pulse_enabled = false; uniform bool colorflow_enbled = false; uniform bool cutplate_visible = true; -uniform bool use_web_colors = false; // to get vac coord a= sin^2(angle), b = sin(angle)*cos(angle) uniform vec4 cutplane = vec4(-0.577, -0.577, 0.577, 0.794); @@ -27,11 +26,7 @@ void fragment() { discard; } } - if (use_web_colors) { - ALBEDO = linear_to_srgb(color.rgb); - } else { - ALBEDO = color.rgb; - } + ALBEDO = OUTPUT_IS_SRGB ? linear_to_srgb(color.rgb) : color.rgb; } // void light() {