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

Function EvalSH4Cosine

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

Source from the content-addressed store, hash-verified

41}
42
43Float3 EvalSH4Cosine(const Float3& dir, const SH4Color& sh)
44{
45 SH4 dirSH = ProjectOntoSH4(dir);
46 dirSH.Coefficients[0] *= CosineA0;
47 dirSH.Coefficients[1] *= CosineA1;
48 dirSH.Coefficients[2] *= CosineA1;
49 dirSH.Coefficients[3] *= CosineA1;
50
51 Float3 result;
52 for(uint64 i = 0; i < 4; ++i)
53 result += dirSH.Coefficients[i] * sh.Coefficients[i];
54
55 return result;
56}
57
58
59SH9 ProjectOntoSH9(const Float3& dir)

Callers

nothing calls this directly

Calls 1

ProjectOntoSH4Function · 0.85

Tested by

no test coverage detected