Fix T57489 Eevee: Texture coordinate object reference not working for world
authorClément Foucault <foucault.clem@gmail.com>
Wed, 10 Jul 2019 11:46:23 +0000 (13:46 +0200)
committerClément Foucault <foucault.clem@gmail.com>
Wed, 10 Jul 2019 11:46:28 +0000 (13:46 +0200)
source/blender/gpu/shaders/gpu_shader_material.glsl

index 1750e124c298ad106fce6778b7caebf339fcb4f8..6149409774aea8e715c81994c1706b533acfa9fc 100644 (file)
@@ -2224,7 +2224,7 @@ void node_tex_coord_background(vec3 I,
   generated = coords;
   normal = -coords;
   uv = vec3(attr_uv.xy, 0.0);
-  object = coords;
+  object = (obmatinv * vec4(coords, 1.0)).xyz;
 
   camera = vec3(co.xy, -co.z);
   window = vec3(mtex_2d_mapping(I).xy * camerafac.xy + camerafac.zw, 0.0);