|
|
|
|
|
|
|
|
|
|
float invPdf = D_GGX_Inverse(NdotH, roughness) * 4.0; |
|
|
|
// TODO: check the accuracy of the sample's solid angle fit for GGX. |
|
|
|
float omegaS = rcp(sampleCount) * invPdf; // Solid angle associated with the sample |
|
|
|
float omegaS = rcp(sampleCount) * invPdf; // Solid angle associated with the sample |
|
|
|
mipLevel = 0.5 * log2(omegaS * invOmegaP) + 1.0; // Clamp is not necessary as the hardware will do it |
|
|
|
mipLevel = 0.5 * log2(omegaS * invOmegaP); // Clamp is not necessary as the hardware will do it |
|
|
|
|
|
|
|
// Bias the MIP map level to compensate for the importance sampling bias. |
|
|
|
// This will blur the reflection. |
|
|
|