diff options
| author | Sakarias Johansson <sakarias.johansson@goodbyekansas.com> | 2023-02-17 17:48:41 +0100 |
|---|---|---|
| committer | Sakarias Johansson <sakariasjohansson@hotmail.com> | 2023-02-17 18:05:16 +0100 |
| commit | 971372cf6350533e36db0404afedb1a36817037c (patch) | |
| tree | 207dac0f9eda28b58d23761e0e384f4bd4d7f137 /racer-tracer/src/config.rs | |
| parent | 9959f90ea4b7ebd933387e6b33647fc661785d84 (diff) | |
| download | racer-tracer-971372cf6350533e36db0404afedb1a36817037c.tar.gz racer-tracer-971372cf6350533e36db0404afedb1a36817037c.tar.xz racer-tracer-971372cf6350533e36db0404afedb1a36817037c.zip | |
🧹 Refactor rendering & Cleanup
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.
Diffstat (limited to 'racer-tracer/src/config.rs')
| -rw-r--r-- | racer-tracer/src/config.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/racer-tracer/src/config.rs b/racer-tracer/src/config.rs index 79c50eb..cf747ec 100644 --- a/racer-tracer/src/config.rs +++ b/racer-tracer/src/config.rs @@ -14,7 +14,8 @@ pub struct Screen { pub struct RenderData { pub samples: usize, pub max_depth: usize, - pub recurse_depth: usize, + pub num_threads_width: usize, + pub num_threads_height: usize, pub scale: usize, } |
