MCPcopy Create free account
hub / github.com/OpenPathGuidingLibrary/openpgl / init

Method init

openpgl/directional/vmm/VMMPhaseFunctions.cpp:11–2455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9int VMMSingleLobeHenyeyGreensteinOracle::numRepresentations;
10
11void VMMSingleLobeHenyeyGreensteinOracle::init()
12{
13 /* VMM representations of the single lobe HG phase function.
14 The 3-lobe VMMs are fitted using a least squares optimization framework
15 as described by S. Herholz:
16 - "Path Guiding in Production"
17 - - "Volumetric Zero-variance Based Path Guiding" (Chapter 11.5)
18 */
19
20 minMeanCosine = 0.0f;
21 maxMeanCosine = 0.99f;
22 numRepresentations = 128;
23
24 representations[0].K = 3;
25 representations[0].g = 0.0f;
26 representations[0].weights[0] = 0.01688512612073299f;
27 representations[0].meanCosines[0] = 0.0f;
28 representations[0].kappas[0] = 0.0f;
29 representations[0].normalizations[0] = 0.07957747154594767f;
30 representations[0].weights[1] = 0.34940739552081895f;
31 representations[0].meanCosines[1] = 0.0f;
32 representations[0].kappas[1] = 0.0f;
33 representations[0].normalizations[1] = 0.07957747154594767f;
34 representations[0].weights[2] = 0.6337074783584481f;
35 representations[0].meanCosines[2] = 0.0f;
36 representations[0].kappas[2] = 0.0f;
37 representations[0].normalizations[2] = 0.07957747154594767f;
38 representations[0].weights[3] = 0.0f;
39 representations[0].meanCosines[3] = 0.0f;
40 representations[0].kappas[3] = 0.0f;
41 representations[0].normalizations[3] = 0.0f;
42
43 representations[1].K = 3;
44 representations[1].g = 0.007795275590551181f;
45 representations[1].weights[0] = 0.01688512612254555f;
46 representations[1].meanCosines[0] = 0.03588398182493312f;
47 representations[1].kappas[0] = 0.10774447737138962f;
48 representations[1].normalizations[0] = 0.08845920147738665f;
49 representations[1].weights[1] = 0.34940739552017397f;
50 representations[1].meanCosines[1] = 0.014362686373439479f;
51 representations[1].kappas[1] = 0.043093986007026464f;
52 representations[1].normalizations[1] = 0.08305603677895068f;
53 representations[1].weights[2] = 0.6337074783572806f;
54 representations[1].meanCosines[2] = 0.003425584458792068f;
55 representations[1].kappas[2] = 0.010276833773244303f;
56 representations[1].normalizations[2] = 0.08039807745351672f;
57 representations[1].weights[3] = 0.0f;
58 representations[1].meanCosines[3] = 0.0f;
59 representations[1].kappas[3] = 0.0f;
60 representations[1].normalizations[3] = 0.0f;
61
62 representations[2].K = 3;
63 representations[2].g = 0.015590551181102362f;
64 representations[2].weights[0] = 0.01688437903886321f;
65 representations[2].meanCosines[0] = 0.07165186574299764f;
66 representations[2].kappas[0] = 0.21569511380458395f;
67 representations[2].normalizations[0] = 0.09797223006527885f;
68 representations[2].weights[1] = 0.34940741896923394f;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected