Revision: 50301
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50301
Author:   dingto
Date:     2012-08-31 19:59:50 +0000 (Fri, 31 Aug 2012)
Log Message:
-----------
Cycles / OSL:
* Fixes for changes in r40163. Removed unused code and fixed emissive_eval 
function. 

Revision Links:
--------------
    
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40163

Modified Paths:
--------------
    trunk/blender/intern/cycles/kernel/osl/osl_shader.cpp

Modified: trunk/blender/intern/cycles/kernel/osl/osl_shader.cpp
===================================================================
--- trunk/blender/intern/cycles/kernel/osl/osl_shader.cpp       2012-08-31 
19:57:03 UTC (rev 50300)
+++ trunk/blender/intern/cycles/kernel/osl/osl_shader.cpp       2012-08-31 
19:59:50 UTC (rev 50301)
@@ -137,11 +137,9 @@
                                        /* sample weight */
                                        float albedo = 
bsdf->albedo(TO_VEC3(sd->I));
                                        float sample_weight = 
fabsf(average(weight)) * albedo;
-                                       float sample_sum = 
sd->osl_closure.bsdf_sample_sum + sample_weight;
 
                                        sc.sample_weight = sample_weight;
                                        sc.type = CLOSURE_BSDF_ID;
-                                       sd->osl_closure.bsdf_sample_sum = 
sample_sum;
 
                                        /* scattering flags */
                                        if (scattering == OSL::Labels::DIFFUSE)
@@ -161,11 +159,9 @@
 
                                        /* sample weight */
                                        float sample_weight = 
fabsf(average(weight));
-                                       float sample_sum = 
sd->osl_closure.emissive_sample_sum + sample_weight;
 
                                        sc.sample_weight = sample_weight;
                                        sc.type = CLOSURE_EMISSION_ID;
-                                       sd->osl_closure.emissive_sample_sum = 
sample_sum;
 
                                        /* flag */
                                        sd->flag |= SD_EMISSION;
@@ -307,11 +303,9 @@
 
                                        /* sample weight */
                                        float sample_weight = 
fabsf(average(weight));
-                                       float sample_sum = 
sd->osl_closure.volume_sample_sum + sample_weight;
 
                                        sc.sample_weight = sample_weight;
                                        sc.type = CLOSURE_VOLUME_ID;
-                                       sd->osl_closure.volume_sample_sum = 
sample_sum;
 
                                        /* add */
                                        sd->closure[sd->num_closure++] = sc;
@@ -357,11 +351,6 @@
        if (kg->osl.volume_state[shader])
                ctx->execute(OSL::pvt::ShadUseSurface, 
*(kg->osl.volume_state[shader]), *globals);
 
-       /* retrieve resulting closures */
-       sd->osl_closure.volume_sample_sum = 0.0f;
-       sd->osl_closure.num_volume = 0;
-       sd->osl_closure.randb = randb;
-
        if (globals->Ci)
                flatten_volume_closure_tree(sd, globals->Ci);
 }
@@ -458,9 +447,8 @@
 {
        OSL::EmissiveClosure *emissive = (OSL::EmissiveClosure *)sc->prim;
        OSL::Color3 emissive_eval = emissive->eval(TO_VEC3(sd->Ng), 
TO_VEC3(sd->I));
-       eval += TO_FLOAT3(emissive_eval);
 
-       return eval;
+       return TO_FLOAT3(emissive_eval);
 }
 
 /* Volume Closure */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to