Skip to content

Commit 6ecf401

Browse files
committed
Fixed typo relfected in reflected
1 parent 92e98a4 commit 6ecf401

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

include/slg/materials/materialdefs_funcs_matte_translucent.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ OPENCL_FORCE_INLINE void MatteTranslucentMaterial_Evaluate(__global const Materi
9595
}
9696
}
9797

98-
const bool relfected = (CosTheta(lightDir) * CosTheta(eyeDir) > 0.f);
98+
const bool reflected = (CosTheta(lightDir) * CosTheta(eyeDir) > 0.f);
9999
const float weight = (lightDir.z * eyeDir.z > 0.f) ? threshold : (1.f - threshold);
100100

101101
const float directPdfW = weight * fabs(lightDir.z * M_1_PI_F);

include/slg/materials/materialdefs_funcs_roughmatte_translucent.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ OPENCL_FORCE_INLINE void RoughMatteTranslucentMaterial_Evaluate(__global const M
9797
}
9898
}
9999

100-
const bool relfected = (CosTheta(lightDir) * CosTheta(eyeDir) > 0.f);
100+
const bool reflected = (CosTheta(lightDir) * CosTheta(eyeDir) > 0.f);
101101
const float weight = (lightDir.z * eyeDir.z > 0.f) ? threshold : (1.f - threshold);
102102

103103
const float directPdfW = weight * fabs(lightDir.z * M_1_PI_F);

src/slg/materials/mattetranslucent.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ Spectrum MatteTranslucentMaterial::Evaluate(const HitPoint &hitPoint,
7272
}
7373
}
7474

75-
const bool relfected = (CosTheta(localLightDir) * CosTheta(localEyeDir) > 0.f);
76-
const float weight = relfected ? threshold : (1.f - threshold);
75+
const bool reflected = (CosTheta(localLightDir) * CosTheta(localEyeDir) > 0.f);
76+
const float weight = reflected ? threshold : (1.f - threshold);
7777

7878
if (directPdfW)
7979
*directPdfW = fabsf((hitPoint.fromLight ? CosTheta(localEyeDir) : CosTheta(localLightDir)) * (weight * INV_PI));
@@ -174,8 +174,8 @@ void MatteTranslucentMaterial::Pdf(const HitPoint &hitPoint,
174174
}
175175
}
176176

177-
const bool relfected = (Sgn(CosTheta(localLightDir)) == Sgn(CosTheta(localEyeDir)));
178-
weight = relfected ? weight : (1.f - weight);
177+
const bool reflected = (Sgn(CosTheta(localLightDir)) == Sgn(CosTheta(localEyeDir)));
178+
weight = reflected ? weight : (1.f - weight);
179179

180180
if (directPdfW)
181181
*directPdfW = fabsf((hitPoint.fromLight ? localEyeDir.z : localLightDir.z) * (weight * INV_PI));

src/slg/materials/roughmattetranslucent.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ Spectrum RoughMatteTranslucentMaterial::Evaluate(const HitPoint &hitPoint,
7272
}
7373
}
7474

75-
const bool relfected = (CosTheta(localLightDir) * CosTheta(localEyeDir) > 0.f);
76-
const float weight = relfected ? threshold : (1.f - threshold);
75+
const bool reflected = (CosTheta(localLightDir) * CosTheta(localEyeDir) > 0.f);
76+
const float weight = reflected ? threshold : (1.f - threshold);
7777

7878
if (directPdfW)
7979
*directPdfW = fabsf((hitPoint.fromLight ? CosTheta(localEyeDir) : CosTheta(localLightDir)) * (weight * INV_PI));
@@ -204,8 +204,8 @@ void RoughMatteTranslucentMaterial::Pdf(const HitPoint &hitPoint,
204204
}
205205
}
206206

207-
const bool relfected = (Sgn(CosTheta(localLightDir)) == Sgn(CosTheta(localEyeDir)));
208-
weight = relfected ? weight : (1.f - weight);
207+
const bool reflected = (Sgn(CosTheta(localLightDir)) == Sgn(CosTheta(localEyeDir)));
208+
weight = reflected ? weight : (1.f - weight);
209209

210210
if (directPdfW)
211211
*directPdfW = fabsf((hitPoint.fromLight ? localEyeDir.z : localLightDir.z) * (weight * INV_PI));

0 commit comments

Comments
 (0)