Skip to content

Commit 734a031

Browse files
committed
Remove extraneous normalization
1 parent 2e161f6 commit 734a031

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
@@ -2319,14 +2319,13 @@ ShaderManager::buildAtmosphereFragmentShader(const ShaderProperties& props)
23192319

23202320
// Sum the contributions from each light source
23212321
source += "vec3 color = vec3(0.0);\n";
2322-
source += "vec3 V = normalize(eyeDir);\n";
23232322

23242323
// Only do scattering calculations for the primary light source
23252324
// TODO: Eventually handle multiple light sources, and removed the 'min'
23262325
// from the line below.
23272326
for (unsigned i = 0; i < std::min(static_cast<unsigned int>(props.nLights), 1u); i++)
23282327
{
2329-
source += " float cosTheta = dot(V, " + LightProperty(i, "direction") + ");\n";
2328+
source += " float cosTheta = dot(eyeDir, " + LightProperty(i, "direction") + ");\n";
23302329
source += ScatteringPhaseFunctions(props);
23312330

23322331
// TODO: Consider premultiplying by invScatterCoeffSum

0 commit comments

Comments
 (0)