MCPcopy Create free account
hub / github.com/RenderKit/ospray / set

Method set

modules/cpu/lights/HDRILight.cpp:20–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19namespace ispc {
20void HDRILight::set(bool isVisible,
21 const Instance *instance,
22 const vec3f &radianceScale,
23 const linear3f &light2world,
24 const Texture2D *map,
25 const Distribution2D *distribution)
26{
27 super.isVisible = isVisible;
28 super.instance = instance;
29#ifndef OSPRAY_TARGET_SYCL
30 super.sample =
31 reinterpret_cast<ispc::Light_SampleFunc>(ispc::HDRILight_sample_addr());
32 super.eval =
33 reinterpret_cast<ispc::Light_EvalFunc>(ispc::HDRILight_eval_addr());
34#endif
35
36 this->radianceScale = radianceScale;
37 this->map = map;
38 this->distribution = distribution;
39
40 this->rcpSize = 1.f / this->map->size;
41 this->light2world = light2world;
42
43 // Enable dynamic runtime instancing or apply static transformation
44 if (instance) {
45 if (instance->motionBlur) {
46#ifndef OSPRAY_TARGET_SYCL
47 super.sample = reinterpret_cast<ispc::Light_SampleFunc>(
48 ispc::HDRILight_sample_instanced_addr());
49 super.eval = reinterpret_cast<ispc::Light_EvalFunc>(
50 ispc::HDRILight_eval_instanced_addr());
51#endif
52 } else {
53 this->light2world = instance->xfm.l * this->light2world;
54 }
55 }
56 world2light = rcp(this->light2world);
57}
58} // namespace ispc
59
60namespace ospray {

Callers 6

createShMethod · 0.45
SunSkyLightMethod · 0.45
createShMethod · 0.45
LiveDenoiseFrameOpFunction · 0.45
updateFiltersMethod · 0.45
DenoiseFrameOpMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected