提交 6cc10164 编写于 作者: A alteredq

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).
上级 7c9fe8ff
......@@ -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( {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册