Skip to content

Commit

Permalink
Fix interactive rendering accumulator bug introduced by previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Achilleas Anagnostopoulos committed Oct 7, 2016
1 parent c7c186f commit 63fbcc4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions renderer/opengl.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 63fbcc4

Please sign in to comment.