pipeline.add_renderable_for_pass(layout.get_scene(), "translucent");
GL::Pipeline::Pass *pass = &pipeline.add_pass("sky");
+ pass->set_lighting(&layout.get_lighting());
pass = &pipeline.add_pass(0);
pass->set_lighting(&layout.get_lighting());
{
const GL::Vector3 &start = camera.get_position();
GL::Vector4 ray = camera.unproject(GL::Vector4(x, y, 0, 0));
- return Ray(start, Vector(ray));
+ return Ray(start, ray.slice<3>(0));
}
void View3D::compute_bounds(Vector &minp, Vector &maxp)
{
Vector minp, maxp;
compute_bounds(minp, maxp);
- shadow.set_target((minp+maxp)/2.0f, (maxp-minp).norm()/2.0f);
+ shadow.set_target((minp+maxp)/2.0f, max((maxp-minp).norm()/2.0f, 0.1f));
}
} // namespace R2C2