* 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
This commit is contained in:
parent
c498e79511
commit
8d7b054b31
@ -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…
x
Reference in New Issue
Block a user