diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-11-20 21:43:32 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-11-20 21:43:32 +0300 |
commit | 102d3ad595d90f20919d609d426ec98e29fd1686 (patch) | |
tree | 9c9be3899432ddb7823a18c88a0714bcfdde559e /source/blender/nodes | |
parent | 6f7b4a3a3e9acdc5ed2b37550b5e324f041e6116 (diff) |
Fix T42622, environment texture GLSL result different from rendering.
Also included mirror ball shader, which was missing.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_tex_environment.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_environment.c b/source/blender/nodes/shader/nodes/node_shader_tex_environment.c index dcb3ef3c8a0..56db9dd3b44 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_environment.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_environment.c @@ -72,8 +72,11 @@ static int node_shader_gpu_tex_environment(GPUMaterial *mat, bNode *node, bNodeE node_shader_gpu_tex_mapping(mat, node, in, out); - ret = GPU_stack_link(mat, "node_tex_environment", in, out, GPU_image(ima, iuser, isdata)); - + if (tex->projection == SHD_PROJ_EQUIRECTANGULAR) + ret = GPU_stack_link(mat, "node_tex_environment_equirectangular", in, out, GPU_image(ima, iuser, isdata)); + else + ret = GPU_stack_link(mat, "node_tex_environment_mirror_ball", in, out, GPU_image(ima, iuser, isdata)); + if (ret) { ImBuf *ibuf = BKE_image_acquire_ibuf(ima, iuser, NULL); if (ibuf && (ibuf->colormanage_flag & IMB_COLORMANAGE_IS_DATA) == 0 && |