THREE.Points particle sprites are not scaled correctly by the THREE.Water shader. Freeciv WebGL uses THREE.Points with sprites to implement trees on the map, however, the trees looks too large when reflected in the ocean. I have attached a minimal test-case which is a modified webgl_shaders_ocean.html from Three.js.
Screenshot of the modified webgl_shaders_ocean.html which shows that the particle sprites are not scaled correctly when reflected in the water:
Screenshot from Freeciv WebGL where the reflected trees in the water are too large:
This is using the latest version of Three.js (r86). This can also be tested in production on play.freeciv.org.
Attached source of minimal testcase:
webgl_shaders_ocean.zip
@Mugen87 I would not even bother to try to fix it. You can’t mix units (pixels vs. world units) and expect things to work.