diff options
Diffstat (limited to 'intern/cycles/kernel/svm/svm_image.h')
-rw-r--r-- | intern/cycles/kernel/svm/svm_image.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/intern/cycles/kernel/svm/svm_image.h b/intern/cycles/kernel/svm/svm_image.h index 9948a192117..44d15e185cb 100644 --- a/intern/cycles/kernel/svm/svm_image.h +++ b/intern/cycles/kernel/svm/svm_image.h @@ -363,6 +363,10 @@ ccl_device void svm_node_tex_image(KernelGlobals *kg, ShaderData *sd, float *sta float3 co = stack_load_float3(stack, co_offset); uint use_alpha = stack_valid(alpha_offset); + if(node.w == NODE_IMAGE_PROJ_SPHERE) { + co = (co - make_float3(0.5f, 0.5f, 0.5f)) * 2.0f; + map_to_sphere(&co.x, &co.y, co.x, co.y, co.z); + } float4 f = svm_image_texture(kg, id, co.x, co.y, srgb, use_alpha); if(stack_valid(out_offset)) @@ -463,7 +467,6 @@ ccl_device void svm_node_tex_image_box(KernelGlobals *kg, ShaderData *sd, float stack_store_float(stack, alpha_offset, f.w); } - ccl_device void svm_node_tex_environment(KernelGlobals *kg, ShaderData *sd, float *stack, uint4 node) { uint id = node.y; |