Skip to content

Commit

Permalink
Merge pull request #1281 from zenustech/default-hdr
Browse files Browse the repository at this point in the history
default-hdr-sky
  • Loading branch information
zhxx1987 authored Jul 27, 2023
2 parents 28c52ab + 3bd0586 commit a74625f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Binary file added hdr/studio_small_08_1k.hdr
Binary file not shown.
15 changes: 13 additions & 2 deletions zenovis/xinxinoptix/optixPathTracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
#include <zeno/utils/vec.h>
#include <zeno/utils/envconfig.h>
#include <zeno/utils/orthonormal.h>
#include <unordered_map>
#include <filesystem>

#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
Expand Down Expand Up @@ -1645,8 +1645,19 @@ void optixinit( int argc, char* argv[] )
#endif
xinxinoptix::update_procedural_sky(zeno::vec2f(-60, 45), 1, zeno::vec2f(0, 0), 0, 0.1,
1.0, 0.0, 6500.0);
xinxinoptix::using_hdr_sky(false);
xinxinoptix::using_hdr_sky(true);
xinxinoptix::show_background(false);
std::string parent_path;
auto cur_path = std::filesystem::current_path().string();
if (zeno::ends_with(cur_path, "bin")) {
parent_path = std::filesystem::current_path().parent_path().parent_path().string();
}
else {
parent_path = cur_path;
}
OptixUtil::sky_tex = parent_path + "/hdr/studio_small_08_1k.hdr";
OptixUtil::addTexture(OptixUtil::sky_tex.value());
xinxinoptix::update_hdr_sky(0, {0, 0, 0}, 0.8);
}


Expand Down

0 comments on commit a74625f

Please sign in to comment.