MCPcopy Create free account
hub / github.com/RenderKit/embree / Lights_eval

Function Lights_eval

tutorials/pathtracer/pathtracer_device.cpp:72–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72Light_EvalRes Lights_eval(const Light* self,
73 const DifferentialGeometry& dg,
74 const Vec3fa& dir)
75{
76 TutorialLightType ty = self->type;
77 switch (ty) {
78 case LIGHT_AMBIENT : return AmbientLight_eval(self,dg,dir);
79 case LIGHT_POINT : return PointLight_eval(self,dg,dir);
80 case LIGHT_DIRECTIONAL : return DirectionalLight_eval(self,dg,dir);
81 case LIGHT_SPOT : return SpotLight_eval(self,dg,dir);
82 case LIGHT_QUAD : return QuadLight_eval(self,dg,dir);
83 default: {
84 Light_EvalRes res;
85 res.value = Vec3fa(0,0,0);
86 res.dist = inf;
87 res.pdf = 0.f;
88 return res;
89 }
90 }
91}
92
93
94////////////////////////////////////////////////////////////////////////////////

Callers 1

renderPixelFunctionFunction · 0.85

Calls 1

Vec3faClass · 0.50

Tested by

no test coverage detected