From 3ae996c293ea290483f9d1b1688977e0403fa4ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Mon, 5 Sep 2022 09:20:30 +0200 Subject: Fix T100649: Regression: Environment texture is stretched when added to mesh The new code was not using the correct default attribute. Add access to `g_data.P` through `node_tex_coord_position()` to replace the old `GPU_builtin(GPU_VIEW_POSITION)` which was used before. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D15862 --- .../shaders/material/gpu_shader_material_texture_coordinates.glsl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/gpu') diff --git a/source/blender/gpu/shaders/material/gpu_shader_material_texture_coordinates.glsl b/source/blender/gpu/shaders/material/gpu_shader_material_texture_coordinates.glsl index 204f134dfa6..c849553ae4c 100644 --- a/source/blender/gpu/shaders/material/gpu_shader_material_texture_coordinates.glsl +++ b/source/blender/gpu/shaders/material/gpu_shader_material_texture_coordinates.glsl @@ -1,4 +1,9 @@ +void node_tex_coord_position(out vec3 out_pos) +{ + out_pos = g_data.P; +} + void node_tex_coord(mat4 obmatinv, vec3 attr_orco, vec4 attr_uv, -- cgit v1.2.3