forked from bartvdbraak/blender
Cleanup: Fix a typo in world MIS.
Found by Lukas Stockner, thanks!
This commit is contained in:
parent
c58b5acefd
commit
ddeb8c595f
@ -421,16 +421,16 @@ static void background_cdf(int start,
|
|||||||
for(int i = start; i < end; i++) {
|
for(int i = start; i < end; i++) {
|
||||||
float sin_theta = sinf(M_PI_F * (i + 0.5f) / res);
|
float sin_theta = sinf(M_PI_F * (i + 0.5f) / res);
|
||||||
float3 env_color = (*pixels)[i * res];
|
float3 env_color = (*pixels)[i * res];
|
||||||
float ave_luminamce = average(env_color);
|
float ave_luminance = average(env_color);
|
||||||
|
|
||||||
cond_cdf[i * cdf_count].x = ave_luminamce * sin_theta;
|
cond_cdf[i * cdf_count].x = ave_luminance * sin_theta;
|
||||||
cond_cdf[i * cdf_count].y = 0.0f;
|
cond_cdf[i * cdf_count].y = 0.0f;
|
||||||
|
|
||||||
for(int j = 1; j < res; j++) {
|
for(int j = 1; j < res; j++) {
|
||||||
env_color = (*pixels)[i * res + j];
|
env_color = (*pixels)[i * res + j];
|
||||||
ave_luminamce = average(env_color);
|
ave_luminance = average(env_color);
|
||||||
|
|
||||||
cond_cdf[i * cdf_count + j].x = ave_luminamce * sin_theta;
|
cond_cdf[i * cdf_count + j].x = ave_luminance * sin_theta;
|
||||||
cond_cdf[i * cdf_count + j].y = cond_cdf[i * cdf_count + j - 1].y + cond_cdf[i * cdf_count + j - 1].x / res;
|
cond_cdf[i * cdf_count + j].y = cond_cdf[i * cdf_count + j - 1].y + cond_cdf[i * cdf_count + j - 1].x / res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user