| 41 | } |
| 42 | |
| 43 | Float3 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 | |
| 59 | SH9 ProjectOntoSH9(const Float3& dir) |
nothing calls this directly
no test coverage detected