Example #1
0
				SPROUT_CONSTEXPR color_type
				shade_2(Color1 const& col1, Color2 const& col2, Tail const&... tail) const {
					return shade_2(
						sprout::darkroom::colors::add(col1, col2),
						tail...
						);
				}
Example #2
0
				SPROUT_CONSTEXPR color_type
					shade_1(
					Intersection const& inter, Objects const& objs,
					sprout::index_tuple<Indexes...>
					) const
				{
					return shade_2(sprout::darkroom::access::get<Indexes>(lights_).template operator()(inter, objs)...);
				}
Example #3
0
				SPROUT_CONSTEXPR color_type
				shade_1(Intersection const& inter, Objects const& objs, position_type const& diff) const {
					return shade_2(
						inter,
						objs,
						diff,
						sprout::darkroom::coords::normalize(diff)
						);
				}
Example #4
0
				SPROUT_CONSTEXPR color_type
				shade_1(Intersection const& inter, LightRayIntersection const& light_ray_inter) const {
					return shade_2(
						inter,
						!sprout::darkroom::intersects::does_intersect(light_ray_inter)
							|| sprout::darkroom::intersects::distance(light_ray_inter)
								< sprout::numeric_limits<unit_type>::epsilon()
							? NS_SSCRISK_CEL_OR_SPROUT::max(
								sprout::numeric_limits<unit_type>::epsilon(),
								sprout::darkroom::coords::dot(
									dir_,
									sprout::darkroom::intersects::normal(inter)
									)
								)
							: 0
						);
				}