Set pixel ratio on render target of Water example to improve performance

I’m trying to modify Water example code so I can squeeze out some more performance, and one way I thought of is to lower the pixel ratio of the render target that used to “mirror” the scene, create reflection. I tried to modify here in the Water code: three.js/examples/jsm/objects/Water.js at f6c9ce62a5374a9611afab04f03b059bf5fb4911 · mrdoob/three.js · GitHub

...
const renderTarget = new WebGLRenderTarget(
  textureWidth * 0.2,
  textureHeight * 0.2,
);

This does gives me a lower resolution reflections, but does not improve performance, namely FPS. I wonder whether I’m doing it wrong, and how can I modify to gain more performance from Water code?

How much meshes into scene ?
Disable mirror and calculate performance of scene, look at browser console:

render(){
requestAnimationFrame(render);
let s=performance.now();
your other code...
renderer.render(scene,camera);
console.log(performance.now()-s);
}
1 Like