| 39 | } |
| 40 | |
| 41 | SH9Color 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 | |
| 50 | Float3 EvalSH9Irradiance(const Float3& dir, const SH9Color& sh) |
| 51 | { |
no test coverage detected