|
float3 radiance = g_ScreenProbes_ProbeBuffer[probe_pos].xyz / g_ScreenProbesConstants.probe_size; |
The line of code above weights the number of hemispherical samples by 1/probe_size when computing SH coefficients for later shading, however the number of samples is probe_size*probe_size. The normalization seems incorrect however if i change the weight to 1/(probe_size*probe_size) the scene seems to be too dark compared to the ray-traced reference.