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

Function ProjectOntoSH9Color

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

Source from the content-addressed store, hash-verified

39}
40
41SH9Color ProjectOntoSH9Color(const Float3& dir, const Float3& color)
42{
43 SH9 sh = ProjectOntoSH9(dir);
44 SH9Color shColor;
45 for(uint64 i = 0; i < 9; ++i)
46 shColor.Coefficients[i] = color * sh.Coefficients[i];
47 return shColor;
48}
49
50Float3 EvalSH9Irradiance(const Float3& dir, const SH9Color& sh)
51{

Callers 2

ProjectCubemapToSHFunction · 0.85
InitMethod · 0.85

Calls 1

ProjectOntoSH9Function · 0.85

Tested by

no test coverage detected