# The refraction of water2 is not correct. Who can help me?

**URL:** <https://discourse.threejs.org/t/the-refraction-of-water2-is-not-correct-who-can-help-me/51306>\
**Category:** Questions\
**Tags:** water, geometry\
**Created:** [May 8, 2023, 8:38am UTC](https://discourse.threejs.org/t/the-refraction-of-water2-is-not-correct-who-can-help-me/51306 "2023-05-08T08:38:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![17603873610](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/17603873610/32/34537_2.png) [@17603873610](https://discourse.threejs.org/u/17603873610)\
**Post date:** [May 8, 2023, 8:38am UTC](https://discourse.threejs.org/t/the-refraction-of-water2-is-not-correct-who-can-help-me/51306/1 "2023-05-08T08:38:01Z")

</div>

I am a rookie who uses threejs. There will be a lot of places to use water at work, but there will be refraction errors when using water2, which makes me very distressed, like below.

 ![截屏2023-05-08 16.31.59](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/d/b/db0e947a82624460d67f1da903a53fdca5adab9c.jpeg)  
On the left is the glb file exported with blender, there will be a refraction error, and on the right is created with THREE.PlaneGeometry. This situation will become more and more serious when I rotate the camera perspective.

```javascript
glbLoader.load(`${OSS_PATH}/flowMap_test.glb`, (gltf: { scene: any }) => {
      const mesh = gltf.scene.children[0];

      const waterParams = {
        color: 0x66f99f,
        // color: 0x0000ff,
        scale: 2,
        flowX: 1,
        flowY: 1,
        alpha: 1.0,
        clipBias: 1,
        refractionRatio: 2,
        reflectivity: 0.8,
      };

      const water = new Water(mesh.geometry, {
        textureWidth: 512,
        textureHeight: 512,
        color: waterParams.color,
        fog: scene.fog !== undefined,
        clipBias: waterParams.clipBias,
        scale: waterParams.scale,
        depthWrite: true,
        depthTest: true,
      });
      water.material.refractionRatio = waterParams.refractionRatio;
      water.material.reflectivity = waterParams.reflectivity;

      const water_p = new THREE.Vector3(60, 1, 0).add(mesh.position);
      water.position.copy(water_p);
      water.rotation.copy(mesh.rotation);
      water.scale.copy(new THREE.Vector3(50, 0, 50).add(mesh.scale));
      scene.add(track(water));
})

```

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [May 9, 2023, 2:04pm UTC](https://discourse.threejs.org/t/the-refraction-of-water2-is-not-correct-who-can-help-me/51306/2 "2023-05-09T14:04:35Z")

</div>

Do you mind sharing the glTF asset in this topic?

---

<div class="post-metadata">

**Author:** ![17603873610](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/17603873610/32/34537_2.png) [@17603873610](https://discourse.threejs.org/u/17603873610)\
**Post date:** [May 10, 2023, 5:40am UTC](https://discourse.threejs.org/t/the-refraction-of-water2-is-not-correct-who-can-help-me/51306/3 "2023-05-10T05:40:14Z")

</div>

There is nothing special, just a plane exported with blender.

---

<div class="post-metadata">

**Author:** ![17603873610](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/17603873610/32/34537_2.png) [@17603873610](https://discourse.threejs.org/u/17603873610)\
**Post date:** [May 10, 2023, 5:51am UTC](https://discourse.threejs.org/t/the-refraction-of-water2-is-not-correct-who-can-help-me/51306/4 "2023-05-10T05:51:53Z")

</div>

[plane\_text.glb](https://discourse.threejs.org/uploads/short-url/41JLEBbvZxL9VbbrqyRjizzf6ZB.glb) (1.1 KB)  
Just like this

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [May 10, 2023, 8:38am UTC](https://discourse.threejs.org/t/the-refraction-of-water2-is-not-correct-who-can-help-me/51306/5 "2023-05-10T08:38:27Z")

</div>

The texture coordinates of the Blender mesh are slightly different as well as the default forward direction which might have an impact on water effect (which was only tested with built-in geometries so far).
