Skip to content

Commit

Permalink
luxcore::KernelCacheFill() now supports opencl.devices.select, scene.…
Browse files Browse the repository at this point in the history
…epsilon.min and scene.epsilon.max properties (issue #374)
  • Loading branch information
Dade916 committed May 20, 2020
1 parent 3805cbe commit 9e00f25
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 18 deletions.
1 change: 1 addition & 0 deletions release-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
* Added thin film interference option for many materials
* Added the support for a new color re-mapping image pipeline plug-in using .cube files (issue #81)
* LuxCore API now support unicode UTF-8 strings and files
* luxcore::KernelCacheFill() now supports opencl.devices.select, scene.epsilon.min and scene.epsilon.max properties (issue #374)

### Fixed Bugs

Expand Down
19 changes: 3 additions & 16 deletions samples/luxcoreui/uimenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,22 +170,9 @@ void LuxCoreApp::MenuRendering() {

Properties props;
/*props <<
Property("opencl.devices.select")("010") <<
Property("opencl.code.alwaysenabled")(
"MATTE MIRROR GLASS ARCHGLASS MATTETRANSLUCENT GLOSSY2 "
"METAL2 ROUGHGLASS ROUGHMATTE ROUGHMATTETRANSLUCENT "
"GLOSSYTRANSLUCENT "
"GLOSSY2_ABSORPTION GLOSSY2_MULTIBOUNCE "
"HOMOGENEOUS_VOL CLEAR_VOL "
"IMAGEMAPS_BYTE_FORMAT IMAGEMAPS_HALF_FORMAT "
"IMAGEMAPS_1xCHANNELS IMAGEMAPS_3xCHANNELS "
"HAS_BUMPMAPS "
"INFINITE TRIANGLELIGHT") <<
Property("kernelcachefill.renderengine.types")("PATHOCL") <<
Property("kernelcachefill.sampler.types")("SOBOL") <<
Property("kernelcachefill.camera.types")("perspective") <<
Property("kernelcachefill.light.types")("infinite", "trianglelight") <<
Property("kernelcachefill.texture.types")("checkerboard2d", "checkerboard3d");*/
Property("opencl.devices.select")("100") <<
Property("scene.epsilon.min")(0.000123f) <<
Property("scene.epsilon.max")(0.123f);*/
KernelCacheFill(props, KernelCacheFillProgressHandler);
}

Expand Down
9 changes: 7 additions & 2 deletions src/luxcore/kernelcachefill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ static void KernelCacheFillImpl(const Properties &config, void (*ProgressHandler
// Extract the render engines
const Property renderEngines = config.Get(Property("kernelcachefill.renderengine.types")("PATHOCL", "TILEPATHOCL", "RTPATHOCL"));
const size_t count = renderEngines.GetSize();

// For each render engine type
for (u_int renderEngineIndex = 0; renderEngineIndex < renderEngines.GetSize(); ++renderEngineIndex) {
const string renderEngineType = renderEngines.Get<string>(renderEngineIndex);
Expand All @@ -284,7 +284,12 @@ static void KernelCacheFillImpl(const Properties &config, void (*ProgressHandler
Properties cfgProps;
cfgProps <<
Property("renderengine.type")(renderEngineType) <<
Property("sampler.type")(samplerType);
Property("sampler.type")(samplerType) <<
config.Get(Property("scene.epsilon.min")(DEFAULT_EPSILON_MIN)) <<
config.Get(Property("scene.epsilon.max")(DEFAULT_EPSILON_MAX));

if (config.IsDefined("opencl.devices.select"))
cfgProps << config.Get("opencl.devices.select");

// Run the rendering
LC_LOG("====================================================================");
Expand Down

0 comments on commit 9e00f25

Please sign in to comment.