1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Color: Rename to_srgb/to_linear to include base color space

This helps reduce confusion around sRGB <> Linear conversions by making
both input and output color spaces explicit.
This commit is contained in:
Rémi Verschelde
2022-04-13 10:37:22 +02:00
parent 8904731b8b
commit 46ef52162e
15 changed files with 68 additions and 68 deletions

View File

@@ -132,7 +132,7 @@ Error ImageLoaderHDR::load_image(Ref<Image> p_image, Ref<FileAccess> f, bool p_f
ptr[2] * exp / 255.0);
if (p_force_linear) {
c = c.to_linear();
c = c.srgb_to_linear();
}
*(uint32_t *)ptr = c.to_rgbe9995();