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

Function Velvety__eval

tutorials/pathtracer/pathtracer_device.cpp:219–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217};
218
219inline Vec3fa Velvety__eval(const Velvety* This,
220 const Vec3fa &wo, const DifferentialGeometry &dg, const Vec3fa &wi)
221{
222 const float cosThetaO = clamp(dot(wo,dg.Ns));
223 const float cosThetaI = clamp(dot(wi,dg.Ns));
224 const float sinThetaO = sqrt(1.0f - cosThetaO * cosThetaO);
225 const float horizonScatter = powf(sinThetaO, This->f);
226 return (horizonScatter * cosThetaI * float(one_over_pi)) * This->R;
227}
228
229inline Vec3fa Velvety__sample(const Velvety* This,
230 const Vec3fa &wo,

Callers 2

Velvety__sampleFunction · 0.85
VelvetMaterial__evalFunction · 0.85

Calls 3

clampFunction · 0.50
dotFunction · 0.50
sqrtFunction · 0.50

Tested by

no test coverage detected