public Vector3 Sample(float u, float v, RenderSettings settings) { var d = _camera.CreateEyeRay(u, v); var hp = _spheres.GetHitPoint(d, _camera.Eye); var color = CalcColor(hp, settings); if (settings.Reflection) { color += CalcReflection(hp, _camera.Eye, settings, 0, REFLECTION_DECAY); } return(color); }
public Vector3 Sample(float u, float v) { return(CalcColor(_spheres.GetHitPoint(_camera.CreateEyeRay(u, v), _camera.Eye))); }