+
+ unsigned unit = renderer.allocate_effect_texunit();
+ int iunit = unit;
+ shdata.uniform("shadow_map", iunit);
+
+ Bind _bind_sampler(*sampler, unit);
+ Bind _bind_depth(depth_buf, unit);
+
+ if(const Camera *camera = renderer.get_camera())
+ /* Multiply by camera's object matrix to form a matrix that transforms
+ from eye space to shadow space. */
+ shdata.uniform("shd_eye_matrix", shadow_matrix*camera->get_object_matrix());
+ else
+ shdata.uniform("shd_eye_matrix", shadow_matrix);
+