diff --git a/src/render/mod.rs b/src/render/mod.rs index bcc538e..e27bb42 100644 --- a/src/render/mod.rs +++ b/src/render/mod.rs @@ -43,7 +43,7 @@ use std::sync::mpsc; const ATLAS_SIZE: usize = 1024; // TEMP -const NUM_SAMPLES: i32 = 2; +const NUM_SAMPLES: i32 = 0; pub struct Camera { pub pos: cgmath::Point3, diff --git a/src/render/shaders/trans_frag.glsl b/src/render/shaders/trans_frag.glsl index 123e4c3..dcf8118 100644 --- a/src/render/shaders/trans_frag.glsl +++ b/src/render/shaders/trans_frag.glsl @@ -15,6 +15,7 @@ void main() { for (int i = 1; i < samples; i++) { col += texelFetch(tcolor, C, i); } + if (samples != 0) col /= float(samples); float r = accum.a;