THREE.Points sprites are not scaled correctly by THREE.Water shader

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:
webgl_shaders_ocean_screenshot

Screenshot from Freeciv WebGL where the reflected trees in the water are too large:
freeciv-web-screenshot

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

Author: Fantashit

1 thought on “THREE.Points sprites are not scaled correctly by THREE.Water shader

Comments are closed.