Browse Source

better comments.

Ben Houston 9 years ago
parent
commit
a805216c4d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      examples/js/postprocessing/MSAAPass.js

+ 3 - 1
examples/js/postprocessing/MSAAPass.js

@@ -89,19 +89,21 @@ THREE.MSAAPass.prototype = {
       // only jitters perspective cameras.  TODO: add support for jittering orthogonal cameras
       if( camera.setViewOffset ) camera.setViewOffset( readBuffer.width, readBuffer.height, jitterOffsets[i].x, jitterOffsets[i].y, readBuffer.width, readBuffer.height );
 
+      // on first sample, no need to accumulate
       if( i == 0 ) {
 
         renderer.render( this.scene, camera, writeBuffer, true );
 
       }
       else {
+
         renderer.render( this.scene, camera, this.sampleRenderTarget, true );
 
         // this accumulation strategy is used to prevent decimation at low bit depths with lots of samples.
         this.uniforms[ "scale" ].value = 1.0 / ( i + 1 );
 
-      // clear on the first render, accumulate the others
         renderer.render( this.scene2, this.camera2, writeBuffer, false );
+
       }
 
     }