Skip to content

Commit

Permalink
Fix incorrectly updated condition
Browse files Browse the repository at this point in the history
  • Loading branch information
375gnu authored and levinli303 committed Oct 19, 2021
1 parent 722e6a5 commit d39d47b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/celengine/shadermanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,7 @@ AddDirectionalLightContrib(unsigned int i, const ShaderProperties& props)
source += "diff.rgb += " + LightProperty(i, "diffuse") + " * d;\n";
}
}
else if ((props.lightModel == ShaderProperties::LunarLambertModel) != 0)
else if ((props.lightModel & ShaderProperties::LunarLambertModel) != 0)
{
source += AssignDiffuse(i, props) + " mix(NL, NL / (max(NV, 0.001) + NL), lunarLambert);\n";
}
Expand Down

0 comments on commit d39d47b

Please sign in to comment.