Browse Source

Small improvements in postprocessing example.

Alternating convolution pass textures aspect ratio and using linear magnification filtering leads to less artefacts.
alteredq 14 years ago
parent
commit
d50863908c
1 changed files with 4 additions and 2 deletions
  1. 4 2
      examples/postprocessing.html

+ 4 - 2
examples/postprocessing.html

@@ -250,8 +250,8 @@
 				sceneRTT.addLight( directionalLight );
 
                 rtTexture1 = new THREE.RenderTarget( window.innerWidth, window.innerHeight, { min_filter: THREE.LinearFilter, mag_filter: THREE.NearestFilter } );
-                rtTexture2 = new THREE.RenderTarget( 512, 256, { min_filter: THREE.LinearFilter, mag_filter: THREE.NearestFilter } );
-                rtTexture3 = new THREE.RenderTarget( 512, 256, { min_filter: THREE.LinearFilter, mag_filter: THREE.NearestFilter } );
+                rtTexture2 = new THREE.RenderTarget( 256, 512, { min_filter: THREE.LinearFilter, mag_filter: THREE.LinearFilter } );
+                rtTexture3 = new THREE.RenderTarget( 512, 256, { min_filter: THREE.LinearFilter, mag_filter: THREE.LinearFilter } );
 
                 materialColor = new THREE.MeshShaderMaterial( {
 
@@ -460,6 +460,8 @@
 				materialScreen.uniforms.opacity.value = 1.0;
 				renderer.render( sceneScreen, cameraOrtho, rtTexture1, false );
 
+				// Render final scene to the screen with film shader
+
 				materialFilm.uniforms.tDiffuse.texture = rtTexture1;
 				quadScreen.materials = [ materialFilm ];
 				renderer.render( sceneScreen, cameraOrtho );