Cleanup: Remove __ANISOTROPIC__ define.
authorThomas Dinges <blender@dingto.org>
Wed, 20 Aug 2014 21:23:14 +0000 (23:23 +0200)
committerThomas Dinges <blender@dingto.org>
Wed, 20 Aug 2014 21:23:14 +0000 (23:23 +0200)
That was only needed in the beginning, when we did not had support for tangents. It's time to clean some of the defines up, it's getting a bit too much.

intern/cycles/kernel/closure/bsdf.h
intern/cycles/kernel/kernel_types.h
intern/cycles/kernel/svm/svm.h
intern/cycles/kernel/svm/svm_closure.h

index 81c239ea0c9356c8255190d8a56320ed40afc613..9961071c2acdcbd004517fba90dd864c0aaf5093 100644 (file)
@@ -23,9 +23,7 @@
 #include "../closure/bsdf_reflection.h"
 #include "../closure/bsdf_refraction.h"
 #include "../closure/bsdf_transparent.h"
-#ifdef __ANISOTROPIC__
 #include "../closure/bsdf_ashikhmin_shirley.h"
-#endif
 #include "../closure/bsdf_westin.h"
 #include "../closure/bsdf_toon.h"
 #include "../closure/bsdf_hair.h"
@@ -94,13 +92,11 @@ ccl_device int bsdf_sample(KernelGlobals *kg, const ShaderData *sd, const Shader
                        label = bsdf_microfacet_beckmann_sample(kg, sc, sd->Ng, sd->I, sd->dI.dx, sd->dI.dy, randu, randv,
                                eval, omega_in, &domega_in->dx, &domega_in->dy, pdf);
                        break;
-#ifdef __ANISOTROPIC__
                case CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ID:
                case CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ANISO_ID:
                        label = bsdf_ashikhmin_shirley_sample(sc, sd->Ng, sd->I, sd->dI.dx, sd->dI.dy, randu, randv,
                                eval, omega_in, &domega_in->dx, &domega_in->dy, pdf);
                        break;
-#endif
                case CLOSURE_BSDF_ASHIKHMIN_VELVET_ID:
                        label = bsdf_ashikhmin_velvet_sample(sc, sd->Ng, sd->I, sd->dI.dx, sd->dI.dy, randu, randv,
                                eval, omega_in, &domega_in->dx, &domega_in->dy, pdf);
@@ -190,12 +186,10 @@ ccl_device float3 bsdf_eval(KernelGlobals *kg, const ShaderData *sd, const Shade
                        case CLOSURE_BSDF_MICROFACET_BECKMANN_REFRACTION_ID:
                                eval = bsdf_microfacet_beckmann_eval_reflect(sc, sd->I, omega_in, pdf);
                                break;
-#ifdef __ANISOTROPIC__
                        case CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ID:
                        case CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ANISO_ID:
                                eval = bsdf_ashikhmin_shirley_eval_reflect(sc, sd->I, omega_in, pdf);
                                break;
-#endif
                        case CLOSURE_BSDF_ASHIKHMIN_VELVET_ID:
                                eval = bsdf_ashikhmin_velvet_eval_reflect(sc, sd->I, omega_in, pdf);
                                break;
@@ -260,12 +254,10 @@ ccl_device float3 bsdf_eval(KernelGlobals *kg, const ShaderData *sd, const Shade
                        case CLOSURE_BSDF_MICROFACET_BECKMANN_REFRACTION_ID:
                                eval = bsdf_microfacet_beckmann_eval_transmit(sc, sd->I, omega_in, pdf);
                                break;
-#ifdef __ANISOTROPIC__
                        case CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ID:
                        case CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ANISO_ID:
                                eval = bsdf_ashikhmin_shirley_eval_transmit(sc, sd->I, omega_in, pdf);
                                break;
-#endif
                        case CLOSURE_BSDF_ASHIKHMIN_VELVET_ID:
                                eval = bsdf_ashikhmin_velvet_eval_transmit(sc, sd->I, omega_in, pdf);
                                break;
@@ -348,12 +340,10 @@ ccl_device void bsdf_blur(KernelGlobals *kg, ShaderClosure *sc, float roughness)
                case CLOSURE_BSDF_MICROFACET_BECKMANN_REFRACTION_ID:
                        bsdf_microfacet_beckmann_blur(sc, roughness);
                        break;
-#ifdef __ANISOTROPIC__
                case CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ID:
                case CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ANISO_ID:
                        bsdf_ashikhmin_shirley_blur(sc, roughness);
                        break;
-#endif
                case CLOSURE_BSDF_ASHIKHMIN_VELVET_ID:
                        bsdf_ashikhmin_velvet_blur(sc, roughness);
                        break;
index 8a99dbbbb9005d42941e7e30cbfa9295d356427f..011ccd3b209e46743d882206ad7d120246a097d0 100644 (file)
@@ -106,7 +106,6 @@ CCL_NAMESPACE_BEGIN
 #define __BACKGROUND_MIS__
 #define __LAMP_MIS__
 #define __AO__
-#define __ANISOTROPIC__
 //#define __CAMERA_MOTION__
 //#define __OBJECT_MOTION__
 //#define __HAIR__
@@ -151,7 +150,6 @@ CCL_NAMESPACE_BEGIN
 #define __BACKGROUND_MIS__
 #define __LAMP_MIS__
 #define __AO__
-#define __ANISOTROPIC__
 #define __CAMERA_MOTION__
 #define __OBJECT_MOTION__
 #define __HAIR__
index d6663aae9db0af7fc6a7804f36f9213a715b654e..738a62a4dca5303bfb508a34fdd0aaf991e62401 100644 (file)
@@ -420,12 +420,10 @@ ccl_device_noinline void svm_eval_nodes(KernelGlobals *kg, ShaderData *sd, Shade
                        case NODE_LIGHT_FALLOFF:
                                svm_node_light_falloff(sd, stack, node);
                                break;
-#endif                 
-#ifdef __ANISOTROPIC__
+#endif
                        case NODE_TANGENT:
                                svm_node_tangent(kg, sd, stack, node);
-                               break;
-#endif                 
+                               break;          
 #ifdef __NORMAL_MAP__
                        case NODE_NORMAL_MAP:
                                svm_node_normal_map(kg, sd, stack, node);
index f4e2d6ebbf79fb5db80e6d8026ed6946c97c9c9d..cd6d9fc53b56d516b25bfdb09d3e2cf51e45fb56 100644 (file)
@@ -294,7 +294,6 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *
                        if(sc) {
                                sc->N = N;
 
-#ifdef __ANISOTROPIC__
                                sc->T = stack_load_float3(stack, data_node.y);
 
                                /* rotate tangent */
@@ -324,9 +323,6 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *
                                        sd->flag |= bsdf_microfacet_ggx_aniso_setup(sc);
                                else
                                        sd->flag |= bsdf_ashikhmin_shirley_aniso_setup(sc);
-#else
-                               sd->flag |= bsdf_diffuse_setup(sc);
-#endif
                        }
                        break;
                }