Skip to content

Commit 132f9c4

Browse files
committed
Fix default light0 diffuse and specular = 1,1,1,1
1 parent caa0210 commit 132f9c4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lighting.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ CImmLight::CImmLight(CGLContext& context, int lightNum)
3333
, bIsEnabled(false)
3434
, Type(kDirectional)
3535
{
36+
if (lightNum == 0) {
37+
// Light0 has different initial values
38+
Diffuse = cpu_vec_xyzw(1.0f, 1.0f, 1.0f, 1.0f);
39+
Specular = cpu_vec_xyzw(1.0f, 1.0f, 1.0f, 1.0f);
40+
}
3641
}
3742

3843
void CImmLight::CheckTypeChange(tLightType oldType)

0 commit comments

Comments
 (0)