diff --git a/renderer/opengl.go b/renderer/opengl.go index d5b21b0..fe09901 100644 --- a/renderer/opengl.go +++ b/renderer/opengl.go @@ -143,6 +143,11 @@ func (r *interactiveGLRenderer) Render() error { // Render frame unless we have reached our target SPP if r.options.SamplesPerPixel == 0 || (r.options.SamplesPerPixel != 0 && r.accumulatedSamples < r.defaultRenderer.options.SamplesPerPixel) { err := r.renderFrame(r.accumulatedSamples) + if r.options.SamplesPerPixel == 0 { + r.accumulatedSamples++ + } else { + r.accumulatedSamples += r.options.SamplesPerPixel + } if err != nil { r.Unlock() return err