From 8d7b054b31b6b3d18f53c23df04023384b3ccd38 Mon Sep 17 00:00:00 2001 From: "Sha..rd" Date: Sat, 30 Jun 2012 18:01:50 +0000 Subject: [PATCH] * 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 --- engine/src/core-data/Common/MatDefs/Misc/Sky.frag | 2 +- engine/src/core-data/Common/MatDefs/Misc/Sky.vert | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/core-data/Common/MatDefs/Misc/Sky.frag b/engine/src/core-data/Common/MatDefs/Misc/Sky.frag index 3e36e0af5..9f5940304 100644 --- a/engine/src/core-data/Common/MatDefs/Misc/Sky.frag +++ b/engine/src/core-data/Common/MatDefs/Misc/Sky.frag @@ -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); } diff --git a/engine/src/core-data/Common/MatDefs/Misc/Sky.vert b/engine/src/core-data/Common/MatDefs/Misc/Sky.vert index 0426f8759..c65753d1e 100644 --- a/engine/src/core-data/Common/MatDefs/Misc/Sky.vert +++ b/engine/src/core-data/Common/MatDefs/Misc/Sky.vert @@ -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; }