MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / sh_windowing

Function sh_windowing

StereoKitC/spherical_harmonics.cpp:20–28  ·  view source on GitHub ↗

Reference here: https://github.com/kayru/Probulator/blob/master/Source/Probulator/SphericalHarmonics.h#L317

Source from the content-addressed store, hash-verified

18// Reference here:
19// https://github.com/kayru/Probulator/blob/master/Source/Probulator/SphericalHarmonics.h#L317
20void sh_windowing(spherical_harmonics_t &harmonics, float window_width) {
21 int i = 0;
22 for(int band = 0; band <= 2; band++) {
23 float s = 1.0f / (1.0f + window_width * band * band * (band + 1.0f) * (band + 1.0f));
24 for(int m = -band; m <= band; m++) {
25 harmonics.coefficients[i++] *= s;
26 }
27 }
28}
29
30///////////////////////////////////////////
31

Callers 2

sh_createFunction · 0.85
sh_calculateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected