Implement motion blur

This commit is contained in:
CJSatnarine
2024-07-03 20:28:58 -04:00
parent 6f88b1cd39
commit e24df2228f
9 changed files with 354015 additions and 803951 deletions

View File

@@ -99,8 +99,8 @@ class camera {
auto rayOrigin = (defocusAngle <= 0) ? centre : defocusDiskSample();
auto rayDirection = pixelSample - rayOrigin;
return ray(rayOrigin, rayDirection);
auto rayTime = randomDouble();
return ray(rayOrigin, rayDirection, rayTime);
}
vec3 sampleSquare() const {