| 243 | } |
| 244 | |
| 245 | void ThreadFunctions::read_envmap(Image32Bit& hdr_image_out, const std::string& filepath, int wanted_channel_count, bool flip_Y) |
| 246 | { |
| 247 | if (filepath.ends_with(".hdr")) |
| 248 | hdr_image_out = Image32Bit::read_image_hdr(filepath, wanted_channel_count, flip_Y); |
| 249 | else if (filepath.ends_with(".exr")) |
| 250 | hdr_image_out = Image32Bit::read_image_exr(filepath, flip_Y); |
| 251 | |
| 252 | if (hdr_image_out.width == 0 || hdr_image_out.height == 0) |
| 253 | g_imgui_logger.add_line(ImGuiLoggerSeverity::IMGUI_LOGGER_WARNING, "Could not read envmap file: %s", filepath.c_str()); |
| 254 | } |