Browse Source

Testing rendering to full-screen texture.

Requires to turn off mipmapping to be able to use non-power of two texture.

Effect of texture size on performance is noticeable, also there is no antialiasing (default in Chrome is I think 4x multisampling).

So I guess full-screen postprocessing will be quite costly :(. That's the price of WebGL always running at full-blown high resolution.

This could be somehow mitigated by faking lower resolutions via smaller texture, though I guess it still wouldn't be the same as having lower resolution set by GPU driver (this is a major help with performance in games - I never run full 1680 x 1050).
alteredq 14 years ago
parent
commit
6cc1016477
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/render_to_texture.html

+ 1 - 1
examples/render_to_texture.html

@@ -124,7 +124,7 @@
 				light.position.normalize();
 				light.position.normalize();
 				scene.addLight( light );
 				scene.addLight( light );
 
 
-                rtTexture = new THREE.RenderTarget( 512, 512 /*, { min_filter: THREE.NearestFilter, mag_filter: THREE.NearestFilter } */ );
+                rtTexture = new THREE.RenderTarget( window.innerWidth, window.innerHeight, { min_filter: THREE.LinearFilter, mag_filter: THREE.NearestFilter } );
 
 
                 material = new THREE.MeshShaderMaterial( {
                 material = new THREE.MeshShaderMaterial( {