From 6cc10164775aac8e15ba562d98d0fd660df95414 Mon Sep 17 00:00:00 2001 From: alteredq Date: Fri, 14 Jan 2011 15:16:14 +0100 Subject: [PATCH] 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). --- examples/render_to_texture.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/render_to_texture.html b/examples/render_to_texture.html index 7374869889..bd51a614d0 100644 --- a/examples/render_to_texture.html +++ b/examples/render_to_texture.html @@ -124,7 +124,7 @@ light.position.normalize(); 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( { -- GitLab