Eevee: SSS: Fix error in profile computation.

This commit is contained in:
Clément Foucault 2017-11-20 22:04:14 +01:00
parent 0b413e406d
commit d3fc5919f8
1 changed files with 2 additions and 2 deletions

View File

@ -640,14 +640,14 @@ static void compute_sss_kernel(GPUSssKernelData *kd, float *radii, int sample_ct
float x0, x1;
if (i == 0) {
x0 = kd->kernel[0][3] - abs(kd->kernel[0][3] - kd->kernel[1][3]) / 2.0f;
x0 = kd->kernel[0][3] - fabsf(kd->kernel[0][3] - kd->kernel[1][3]) / 2.0f;
}
else {
x0 = (kd->kernel[i - 1][3] + kd->kernel[i][3]) / 2.0f;
}
if (i == sample_ct - 1) {
x1 = kd->kernel[sample_ct - 1][3] + abs(kd->kernel[sample_ct - 2][3] - kd->kernel[sample_ct - 1][3]) / 2.0f;
x1 = kd->kernel[sample_ct - 1][3] + fabsf(kd->kernel[sample_ct - 2][3] - kd->kernel[sample_ct - 1][3]) / 2.0f;
}
else {
x1 = (kd->kernel[i][3] + kd->kernel[i + 1][3]) / 2.0f;