* Sky shader now normalizes direction in fragment shader instead of vertex shader

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9533 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..rd 13 years ago
parent c498e79511
commit 8d7b054b31
  1. 2
      engine/src/core-data/Common/MatDefs/Misc/Sky.frag
  2. 2
      engine/src/core-data/Common/MatDefs/Misc/Sky.vert

@ -6,6 +6,6 @@ varying vec3 direction;
void main() {
vec3 dir = normalize(direction);
gl_FragColor = Optics_GetEnvColor(m_Texture, direction);
gl_FragColor = Optics_GetEnvColor(m_Texture, dir);
}

@ -21,5 +21,5 @@ void main(){
gl_Position = g_ProjectionMatrix * pos;
vec4 normal = vec4(inNormal * m_NormalScale, 0.0);
direction = normalize( (g_WorldMatrix * normal).xyz );
direction = (g_WorldMatrix * normal).xyz;
}

Loading…
Cancel
Save