Gamma correction corrected....

This commit is contained in:
2025-08-05 22:58:21 +02:00
parent 17c3469602
commit 0736eb77b2
5 changed files with 61 additions and 9 deletions

View File

@@ -228,7 +228,9 @@ generate_member_ui_imgui :: (type: *Type_Info_Struct, builder: *String_Builder,
} else if info_struct.name == "Vector3" {
print_to_builder(builder, "\tImGui.DragFloat3(tprint_c(\"%\"), *e.%.component);\n", new_path, new_path);
} else if info_struct.name == "Color" || info_struct.name == "Vector4" {
print_to_builder(builder, "\tImGui.ColorEdit4(tprint_c(\"%\"), *e.%.component);\n", new_path, new_path);
print_to_builder(builder, "\tsrgb_color := linear_to_srgb(e.%);\n", new_path);
print_to_builder(builder, "\tImGui.ColorEdit4(tprint_c(\"%\"), *srgb_color.component);\n", new_path);
print_to_builder(builder, "\te.% = srgb_to_linear(srgb_color);\n", new_path);
} else {
generate_member_ui_imgui(info_struct, builder, new_path);
}