Skip to content
Snippets Groups Projects
Commit 6dfcb110 authored by David Parks's avatar David Parks
Browse files

SH-2453 Fix for horizontal line when max altitude set to 0

parent 348a7018
No related branches found
No related tags found
No related merge requests found
...@@ -148,10 +148,6 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) { ...@@ -148,10 +148,6 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
vec3 P = inPositionEye; vec3 P = inPositionEye;
setPositionEye(P); setPositionEye(P);
//(TERRAIN) limit altitude
if (P.y > max_y.x) P *= (max_y.x / P.y);
if (P.y < -max_y.x) P *= (-max_y.x / P.y);
vec3 tmpLightnorm = lightnorm.xyz; vec3 tmpLightnorm = lightnorm.xyz;
vec3 Pn = normalize(P); vec3 Pn = normalize(P);
......
...@@ -28,3 +28,4 @@ void passTextureIndex() ...@@ -28,3 +28,4 @@ void passTextureIndex()
} }
...@@ -148,10 +148,6 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) { ...@@ -148,10 +148,6 @@ void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
vec3 P = inPositionEye; vec3 P = inPositionEye;
setPositionEye(P); setPositionEye(P);
//(TERRAIN) limit altitude
if (P.y > max_y.x) P *= (max_y.x / P.y);
if (P.y < -max_y.x) P *= (-max_y.x / P.y);
vec3 tmpLightnorm = lightnorm.xyz; vec3 tmpLightnorm = lightnorm.xyz;
vec3 Pn = normalize(P); vec3 Pn = normalize(P);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment