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

Function ProjectOntoSH4Color

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

Source from the content-addressed store, hash-verified

32}
33
34SH4Color ProjectOntoSH4Color(const Float3& dir, const Float3& color)
35{
36 SH4 sh = ProjectOntoSH4(dir);
37 SH4Color shColor;
38 for(uint64 i = 0; i < 4; ++i)
39 shColor.Coefficients[i] = color * sh.Coefficients[i];
40 return shColor;
41}
42
43Float3 EvalSH4Cosine(const Float3& dir, const SH4Color& sh)
44{

Callers 1

AddSampleMethod · 0.85

Calls 1

ProjectOntoSH4Function · 0.85

Tested by

no test coverage detected