Fix T63023: wrong Eevee window coordinates for background.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 27 Mar 2019 21:32:13 +0000 (22:32 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Wed, 27 Mar 2019 21:32:13 +0000 (22:32 +0100)
source/blender/gpu/shaders/gpu_shader_material.glsl

index b595e916aada1e6e93d31025c57401b9852f936b..c58758dd2e1202f53051a23787bfe4e527e4e33a 100644 (file)
@@ -1905,9 +1905,7 @@ void node_tex_coord_background(
        object = coords;
 
        camera = vec3(co.xy, -co.z);
-       window = (ProjectionMatrix[3][3] == 0.0) ?
-                vec3(mtex_2d_mapping(I).xy * camerafac.xy + camerafac.zw, 0.0) :
-                vec3(vec2(0.5) * camerafac.xy + camerafac.zw, 0.0);
+       window = vec3(mtex_2d_mapping(I).xy * camerafac.xy + camerafac.zw, 0.0);
 
        reflection = -coords;
 }