diff options
author | Clément Foucault <fclem> | 2022-09-05 10:20:30 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-09-05 10:21:02 +0300 |
commit | 3ae996c293ea290483f9d1b1688977e0403fa4ba (patch) | |
tree | cb1899b00c10b642ea03ae2aaaf3b7d985f7534f /source/blender/nodes | |
parent | f0166bc168ed637a1ab74c90ad6b63e89ca6da8e (diff) |
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
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_tex_environment.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_environment.cc b/source/blender/nodes/shader/nodes/node_shader_tex_environment.cc index df5fbac3ab5..2739a75ed21 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_environment.cc +++ b/source/blender/nodes/shader/nodes/node_shader_tex_environment.cc @@ -50,7 +50,11 @@ static int node_shader_gpu_tex_environment(GPUMaterial *mat, return GPU_stack_link(mat, node, "node_tex_environment_empty", in, out); } - node_shader_gpu_default_tex_coord(mat, node, &in[0].link); + if (!in[0].link) { + GPU_link(mat, "node_tex_coord_position", &in[0].link); + node_shader_gpu_bump_tex_coord(mat, node, &in[0].link); + } + node_shader_gpu_tex_mapping(mat, node, in, out); /* Compute texture coordinate. */ |