summaryrefslogtreecommitdiff
path: root/modules/hdr/image_loader_hdr.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-04-13 10:37:22 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-04-13 11:45:52 +0200
commit46ef52162eee2bdddb44a15fc8bf37aeb1aa3f48 (patch)
tree10204054589c63e293b415c8e5d7ecc1e85fd47b /modules/hdr/image_loader_hdr.cpp
parent8904731b8b0a8560c43a8b6680546d8f67f47bb7 (diff)
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.
Diffstat (limited to 'modules/hdr/image_loader_hdr.cpp')
-rw-r--r--modules/hdr/image_loader_hdr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/hdr/image_loader_hdr.cpp b/modules/hdr/image_loader_hdr.cpp
index 4588caf0a5..eca689e87a 100644
--- a/modules/hdr/image_loader_hdr.cpp
+++ b/modules/hdr/image_loader_hdr.cpp
@@ -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();