# The refraction effect of Water2 is not ideal enough

**URL:** <https://discourse.threejs.org/t/the-refraction-effect-of-water2-is-not-ideal-enough/28845>\
**Category:** Questions\
**Tags:** refraction, water\
**Created:** [August 12, 2021, 3:27am UTC](https://discourse.threejs.org/t/the-refraction-effect-of-water2-is-not-ideal-enough/28845 "2021-08-12T03:27:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jingru](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/jingru/32/18755_2.png) [@Jingru](https://discourse.threejs.org/u/Jingru)\
**Post date:** [August 12, 2021, 3:27am UTC](https://discourse.threejs.org/t/the-refraction-effect-of-water2-is-not-ideal-enough/28845/1 "2021-08-12T03:27:56Z")

</div>

I implemented a water surface using Water2 above a pool-like model. And the the edge of water surface show some color that are not the refraction of pool but the thing out of the pool. How to solve this problem. I would be super grateful if someone could help me.

 ![捕获.PNG](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/d/6/d6e4296f91bf1b5762d6ffeffdc9d279cd3d003a.jpeg)

---

<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:** [August 12, 2021, 8:11am UTC](https://discourse.threejs.org/t/the-refraction-effect-of-water2-is-not-ideal-enough/28845/2 "2021-08-12T08:11:29Z")

</div>

`Water2` uses a combination of the `Refractor` and `Reflector` class. To me, the first step in investigating this issue is to find out whether `Refractor` or `Reflector` produces this glitch. So I suggest you remove `Water2` and make a test with both classes.

[https://threejs.org/examples/webgl\_refraction](https://threejs.org/examples/webgl_refraction)  
[https://threejs.org/examples/webgl\_mirror](https://threejs.org/examples/webgl_mirror)

---

<div class="post-metadata">

**Author:** ![Jingru](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/jingru/32/18755_2.png) [@Jingru](https://discourse.threejs.org/u/Jingru)\
**Post date:** [August 12, 2021, 10:50am UTC](https://discourse.threejs.org/t/the-refraction-effect-of-water2-is-not-ideal-enough/28845/3 "2021-08-12T10:50:49Z")

</div>

Thanks for your reply. According your advice, I test `Refractor` and `Reflector` class. The followed pictures are results.  
Reflection result

 ![reflection.PNG](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/f/1/f100622019d5965648d59014a48f6b89643da0fe.jpeg)  
Refraction result  
 ![refractor.PNG](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/c/0/c06b07f0122d5706e468434db7361f9f0df97e13.jpeg)  
 ![refractor2.PNG](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/7/a/7abc9533ae8f44891b93d51c9c24018a65febb76.jpeg)  
The effect of Reflection is correct, but the effect of Refraction is incorrect. And I considered that the complexity of model may influence the effect. So I replaced the model with a simple box, and the effect is not ideal too. The edge of refractor are incorrect.  
 ![refraction3.PNG](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/5/1/51e38c981dc294175b2cb1b757e29585bcbc6fbd.jpeg)
