diff options
Diffstat (limited to 'source/blender/gpu/shaders/material')
-rw-r--r-- | source/blender/gpu/shaders/material/gpu_shader_material_tex_sky.glsl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/shaders/material/gpu_shader_material_tex_sky.glsl b/source/blender/gpu/shaders/material/gpu_shader_material_tex_sky.glsl index b2f6147b629..b6aad5904ff 100644 --- a/source/blender/gpu/shaders/material/gpu_shader_material_tex_sky.glsl +++ b/source/blender/gpu/shaders/material/gpu_shader_material_tex_sky.glsl @@ -14,7 +14,7 @@ float sky_angle_between(float thetav, float phiv, float theta, float phi) vec3 sky_spherical_coordinates(vec3 dir) { - return vec3(acos(dir.z), atan(dir.x, dir.y), 0); + return vec3(M_PI_2 - atan(dir.z, length(dir.xy)), atan(dir.x, dir.y), 0); } /* Preetham */ |