From 4994a23a8a84ccd602969bb813aba5481bfcb319 Mon Sep 17 00:00:00 2001 From: Maximilian Giller Date: Sun, 29 Jan 2023 22:07:21 +0100 Subject: [PATCH] Some adjustments --- beautifulSceneEpic.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/beautifulSceneEpic.cpp b/beautifulSceneEpic.cpp index 455be72..31ff3ce 100644 --- a/beautifulSceneEpic.cpp +++ b/beautifulSceneEpic.cpp @@ -74,17 +74,15 @@ int main() // initialize renderer: aperture = lens thickness, secondaryRayCount = how many rays per pixel are created float focalLength = length(camera.getPosition() - planePosition + Vector3d(0, 0, 2.6f)); DOFRenderer renderer(0.02, 100, focalLength); - float imageScalar = 2; + float imageScalar = 1; Texture image = renderer.renderImage(scene, camera, 1920 * imageScalar, 1080 * imageScalar); - // Use post-processing Bloom effect - Bloom bloomEffect = Bloom(image.getImage()); - Texture imageWithBloom = image; - imageWithBloom.setTexture(bloomEffect.bloom(0.55f, 5, 10.0f, 0.06f)); - - // save images image.save("result.png"); - imageWithBloom.save("resultWithBloom.png"); + + // Use post-processing Bloom effect + Bloom bloomEffect = Bloom(image.getImage(), 0.88f, image); + image.setTexture(bloomEffect.bloom(50, 20.0f, 0.5f)); + image.save("resultWithBloom.png"); return 0; }