Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions docs/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,24 @@ @inproceedings{Sutskever2013Importance
pages={1139--1147},
year={2013}
}

@article{Hosek2012Analytic,
author = {{Luk\'a\v{s} Ho\v{s}ek and Alexander Wilkie}},
title = {An Analytic Model for Full Spectral Sky-Dome Radiance},
journal = {ACM Transactions on Graphics (Proceedings of ACM SIGGRAPH 2012)},
year = {2012},
volume = {31},
number = {4},
month = {July}
}

@article{Blanco2001Computing,
title = {Computing the solar vector},
author = {Blanco-Muriel, M. and Alarc{\'o}n-Padilla, D.C. and L{\'o}pez-Moratalla, T. and Lara-Coira, M.},
journal = {Solar Energy},
volume = {70},
number = {5},
pages = {431--441},
year = {2001},
publisher = {Elsevier}
}
1 change: 1 addition & 0 deletions src/emitters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ add_plugin(point point.cpp)
add_plugin(constant constant.cpp)
add_plugin(envmap envmap.cpp)
add_plugin(directional directional.cpp)
add_plugin(sky sky.cpp sunsky/skymodel.cpp)

# Register the test directory
add_tests(${CMAKE_CURRENT_SOURCE_DIR}/tests)
2 changes: 1 addition & 1 deletion src/emitters/directional.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class DirectionalEmitter final : public Emitter<Float, Spectrum> {

ScalarBoundingBox3f bbox() const override {
/* This emitter does not occupy any particular region
of space, return an invalid bounding box */
of space, return an invalid bounding box */
return ScalarBoundingBox3f();
}

Expand Down
11 changes: 7 additions & 4 deletions src/emitters/envmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,18 @@ class EnvironmentMapEmitter final : public Emitter<Float, Spectrum> {
about the scene and default to the unit bounding sphere. */
m_bsphere = ScalarBoundingSphere3f(ScalarPoint3f(0.f), 1.f);

FileResolver *fs = Thread::thread()->file_resolver();
fs::path file_path = fs->resolve(props.string("filename"));
ref<Bitmap> bitmap = (Bitmap*) props.pointer("bitmap", nullptr);
if (!bitmap) {
FileResolver *fs = Thread::thread()->file_resolver();
fs::path file_path = fs->resolve(props.string("filename"));

ref<Bitmap> bitmap = new Bitmap(file_path);
bitmap = new Bitmap(file_path);
m_filename = file_path.filename().string();
}

/* Convert to linear RGBA float bitmap, will undergo further
conversion into coefficients of a spectral upsampling model below */
bitmap = bitmap->convert(Bitmap::PixelFormat::RGBA, struct_type_v<ScalarFloat>, false);
m_filename = file_path.filename().string();

std::unique_ptr<ScalarFloat[]> luminance(new ScalarFloat[bitmap->pixel_count()]);

Expand Down
Loading