# outputEncoding, and water shader

**URL:** <https://discourse.threejs.org/t/outputencoding-and-water-shader/22400>\
**Category:** Questions\
**Tags:** ocean, webgl, materials, shaders\
**Created:** [January 13, 2021, 8:06pm UTC](https://discourse.threejs.org/t/outputencoding-and-water-shader/22400 "2021-01-13T20:06:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hoodgail\_Benjamin](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/hoodgail_benjamin/32/20769_2.png) [@Hoodgail\_Benjamin](https://discourse.threejs.org/u/Hoodgail_Benjamin)\
**Post date:** [January 13, 2021, 8:06pm UTC](https://discourse.threejs.org/t/outputencoding-and-water-shader/22400/1 "2021-01-13T20:06:35Z")

</div>

When i set the outputEncoding to sRGBEncoding the ocean material looks dark  
but when i remove it it looks normal

this is what it looks like now

 ![unknown](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/8/88dda06e8e095cbb1804d21c0d432781cb6e943f.jpeg)

is there anyway i can fix it with sRGBEncoding ?  
ty

---

<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:** [January 14, 2021, 1:41pm UTC](https://discourse.threejs.org/t/outputencoding-and-water-shader/22400/2 "2021-01-14T13:41:03Z")

</div>

Unfortunately, the class `Water` does only support the default (linear) output encoding.

If you configure sRGB as final color space, you also have to set the encoding of the internal water render target to `sRGBEncoding` and it’s required to include the `encodings_fragment` into the fragment shader.

---

<div class="post-metadata">

**Author:** ![Hoodgail\_Benjamin](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/hoodgail_benjamin/32/20769_2.png) [@Hoodgail\_Benjamin](https://discourse.threejs.org/u/Hoodgail_Benjamin)\
**Post date:** [February 17, 2021, 1:31pm UTC](https://discourse.threejs.org/t/outputencoding-and-water-shader/22400/3 "2021-02-17T13:31:18Z")

</div>

Thank you for your response.
