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

Function ProjectOntoH4

SampleFramework12/v1.00/Graphics/SH.cpp:70–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70H4 ProjectOntoH4(const Float3& dir)
71{
72 H4 result;
73
74 result[0] = (1.0f / std::sqrt(2.0f * 3.14159f));
75
76 // Band 1
77 result[1] = std::sqrt(1.5f / 3.14159f) * dir.y;
78 result[2] = std::sqrt(1.5f / 3.14159f) * (2 * dir.z - 1.0f);
79 result[3] = std::sqrt(1.5f / 3.14159f) * dir.x;
80
81 return result;
82}
83
84float EvalH4(const H4& h, const Float3& dir)
85{

Callers 1

EvalH4Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected