From 971372cf6350533e36db0404afedb1a36817037c Mon Sep 17 00:00:00 2001 From: Sakarias Johansson Date: Fri, 17 Feb 2023 17:48:41 +0100 Subject: =?UTF-8?q?=F0=9F=A7=B9=20Refactor=20rendering=20&=20Cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refactored how the threading worked. Before it just keept up splitting the screen recursively for x number of times. Felt like using recursion was unnecessary. It's now just done in a loop instead. The user can control the behaviour by setting `num_threads_width` and `num_threads_height` which will split the image x number of times and run a thread for each. Split up the rendering function for one that does scaling and one that doesn't. I just don't want to deal with any kind of scaling when actually rendering the image. The code shouldn't change much so maintaining is going to be ok. - Fixed scaling issues where black bars would appear if the subimage size wasn't divisible by the scale. - Cleaned up a bunch of arcs and other things that wasn't neccesary any more. --- racer-tracer/config.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'racer-tracer/config.yml') diff --git a/racer-tracer/config.yml b/racer-tracer/config.yml index f32f991..66af4a6 100644 --- a/racer-tracer/config.yml +++ b/racer-tracer/config.yml @@ -1,14 +1,16 @@ preview: samples: 2 max_depth: 4 - recurse_depth: 4 - scale: 4 + scale: 2 + num_threads_width: 10 + num_threads_height: 10 render: - samples: 1000 - max_depth: 40 - recurse_depth: 4 + samples: 100 + max_depth: 20 scale: 1 + num_threads_width: 10 + num_threads_height: 10 screen: width: 1280 -- cgit v1.2.3