Revision: 45736
http://brlcad.svn.sourceforge.net/brlcad/?rev=45736&view=rev
Author: kunigami
Date: 2011-07-31 14:12:27 +0000 (Sun, 31 Jul 2011)
Log Message:
-----------
discovered how to get the object color from the closures. the next step is how
to make the closure tell me to perform reflection
Modified Paths:
--------------
brlcad/trunk/src/liboptical/liboslrend.cpp
Modified: brlcad/trunk/src/liboptical/liboslrend.cpp
===================================================================
--- brlcad/trunk/src/liboptical/liboslrend.cpp 2011-07-30 08:59:21 UTC (rev
45735)
+++ brlcad/trunk/src/liboptical/liboslrend.cpp 2011-07-31 14:12:27 UTC (rev
45736)
@@ -140,11 +140,11 @@
// Eval the reflection weight from each light source
size_t nlights = info->light_dirs.size();
- float pdf;
+ float pdf = 0.0;
for(size_t li = 0; li < nlights; li++){
info->reflect_weight += bsdf->eval_reflect(globals.I,
info->light_dirs[li], pdf);
}
- info->reflect_weight *= 1.0/nlights;
+ info->reflect_weight *= weight/nlights;
}
else if(prim->category() == OSL::ClosurePrimitive::Emissive) {
// evaluate emissive closure
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits