MCPcopy Create free account
hub / github.com/TomClabault/HIPRT-Path-Tracer / read_envmap

Method read_envmap

src/Threads/ThreadFunctions.cpp:245–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243}
244
245void 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}

Callers

nothing calls this directly

Calls 1

add_lineMethod · 0.80

Tested by

no test coverage detected