Skip to content

Commit 7ac19f9

Browse files
committed
Remove extraneous normalization
1 parent 9d138be commit 7ac19f9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/celengine/shadermanager.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2905,14 +2905,13 @@ ShaderManager::buildAtmosphereFragmentShader(const ShaderProperties& props)
29052905

29062906
// Sum the contributions from each light source
29072907
source += "vec3 color = vec3(0.0);\n";
2908-
source += "vec3 V = normalize(eyeDir);\n";
29092908

29102909
// Only do scattering calculations for the primary light source
29112910
// TODO: Eventually handle multiple light sources, and removed the 'min'
29122911
// from the line below.
29132912
for (unsigned i = 0; i < std::min(static_cast<unsigned int>(props.nLights), 1u); i++)
29142913
{
2915-
source += " float cosTheta = dot(V, " + LightProperty(i, "direction") + ");\n";
2914+
source += " float cosTheta = dot(eyeDir, " + LightProperty(i, "direction") + ");\n";
29162915
source += ScatteringPhaseFunctions(props);
29172916

29182917
// TODO: Consider premultiplying by invScatterCoeffSum

0 commit comments

Comments
 (0)