MCPcopy Create free account
hub / github.com/TheRealMJP/BakingLab / ProjectOntoH4

Function ProjectOntoH4

SampleFramework11/v1.02/Graphics/SH.cpp:110–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110H4 ProjectOntoH4(const Float3& dir)
111{
112 H4 result;
113
114 result[0] = (1.0f / std::sqrt(2.0f * 3.14159f));
115
116 // Band 1
117 result[1] = std::sqrt(1.5f / 3.14159f) * dir.y;
118 result[2] = std::sqrt(1.5f / 3.14159f) * (2 * dir.z - 1.0f);
119 result[3] = std::sqrt(1.5f / 3.14159f) * dir.x;
120
121 return result;
122}
123
124H4Color ProjectOntoH4Color(const Float3& dir, const Float3& color)
125{

Callers 2

ProjectOntoH4ColorFunction · 0.85
EvalH4Function · 0.85

Calls 1

sqrtFunction · 0.85

Tested by

no test coverage detected