Skip to content

Commit

Permalink
fix: take srgb from builtins
Browse files Browse the repository at this point in the history
  • Loading branch information
akorzunin committed Aug 22, 2024
1 parent 7b9f79f commit 8e4e909
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
3 changes: 0 additions & 3 deletions src/models/icosahedron/components/Icosahedron.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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() {
Expand Down

0 comments on commit 8e4e909

Please sign in to comment.