# Ocean node material

**URL:** https://forum.babylonjs.com/t/ocean-node-material/13554
**Category:** Demos and projects
**Tags:** material, nme
**Created:** [August 20, 2020, 7:08pm UTC](https://forum.babylonjs.com/t/ocean-node-material/13554 "2020-08-20T19:08:28Z")
**Posts on this page:** 10
**Page:** 2

<div class="post-metadata">

### Author: ![simon](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/simon/32/45590_2.png) [@simon](https://forum.babylonjs.com/u/simon)
#### Post date: [June 26, 2021, 7:46am UTC](https://forum.babylonjs.com/t/ocean-node-material/13554/24 "2021-06-26T07:46:27Z")

</div>

I thought about using parallax with ocean shader and most likely parallax can’t improve quality of water, because we need to use dynamically changed surface and i don`t think that uses of one gif is enough. Maybe i try to do anything later 🙂

---

<div class="post-metadata">

### Author: ![simon](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/simon/32/45590_2.png) [@simon](https://forum.babylonjs.com/u/simon)
#### Post date: [June 26, 2021, 8:27am UTC](https://forum.babylonjs.com/t/ocean-node-material/13554/26 "2021-06-26T08:27:17Z")

</div>

Got that!)

---

<div class="post-metadata">

### Author: ![Dok11](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dok11/32/25754_2.png) [@Dok11](https://forum.babylonjs.com/u/Dok11)
#### Post date: [May 8, 2023, 7:35am UTC](https://forum.babylonjs.com/t/ocean-node-material/13554/27 "2023-05-08T07:35:32Z")

</div>

@simon hey, that’s amazing work!  
I note, this material does not working with the fog. To fix it, as I know we can add these nodes:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/2/3/234ec97e079f7484e6e71074d456449e6c265b8f.png)

But I still have a question. How to change flat shading into smooth?  
Maybe @Deltakosh or @Evgeni_Popov could point for me?

---

<div class="post-metadata">

### Author: ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)
#### Post date: [May 8, 2023, 8:49am UTC](https://forum.babylonjs.com/t/ocean-node-material/13554/28 "2023-05-08T08:49:44Z")

</div>

I’m not sure what you call flat shading? It seems quite smooth to me.

---

<div class="post-metadata">

### Author: ![Dok11](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dok11/32/25754_2.png) [@Dok11](https://forum.babylonjs.com/u/Dok11)
#### Post date: [May 8, 2023, 9:05am UTC](https://forum.babylonjs.com/t/ocean-node-material/13554/29 "2023-05-08T09:05:48Z")

</div>

I mean Shade Smooth from Blender:  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/6/5/65bb8da45048be55320735401a997276f8d7e072.png)

> [@Evgeni\_Popov](#):
>
> It seems quite smooth to me.

On large scale it’s not smooth:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/5/9/59c246d5365de5475c9eb25c35e97d51361f7e25.jpeg)

---

<div class="post-metadata">

### Author: ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)
#### Post date: [May 8, 2023, 9:18am UTC](https://forum.babylonjs.com/t/ocean-node-material/13554/30 "2023-05-08T09:18:27Z")

</div>

I see, maybe @simon will know what to do about it.

---

<div class="post-metadata">

### Author: ![Dok11](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dok11/32/25754_2.png) [@Dok11](https://forum.babylonjs.com/u/Dok11)
#### Post date: [May 8, 2023, 9:29am UTC](https://forum.babylonjs.com/t/ocean-node-material/13554/31 "2023-05-08T09:29:35Z")

</div>

Do you think that it’s relative to this shader only? I thought it neccessary to add some “smooth normals” node, or smth like this =)

---

<div class="post-metadata">

### Author: ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)
#### Post date: [May 8, 2023, 9:35am UTC](https://forum.babylonjs.com/t/ocean-node-material/13554/32 "2023-05-08T09:35:47Z")

</div>

Yes, this is relative to the shader. In a node material shader, everything is done in the shader, there’s no “external” shader code (the normal for each pixel is computed in the shader).

---

<div class="post-metadata">

### Author: ![simon](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/simon/32/45590_2.png) [@simon](https://forum.babylonjs.com/u/simon)
#### Post date: [May 10, 2023, 6:52pm UTC](https://forum.babylonjs.com/t/ocean-node-material/13554/33 "2023-05-10T18:52:47Z")

</div>

Hi Dok11! Thank you)

This is topic about flat shaded normals

> [@How to smooth normals useing NME?](https://forum.babylonjs.com/t/how-to-smooth-normals-useing-nme/30918):
>
> Hello! When we use an a displacement for vertex shader positions is changing but normals isn’t. For some cases i can get normal data like i did that here: But i don’ t know how i can smooth this normals. I think this is an important question because i faced with this too many cases and it can be an bottleneck for large spectre of shaders.

---

<div class="post-metadata">

### Author: ![derpdewp](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/derpdewp/32/29245_2.png) [@derpdewp](https://forum.babylonjs.com/u/derpdewp)
#### Post date: [May 10, 2023, 8:56pm UTC](https://forum.babylonjs.com/t/ocean-node-material/13554/34 "2023-05-10T20:56:59Z")

</div>

@simon I know this is an old post but I just want to express my appreciation on how minimal the code is in your playground. It’s very easy to look over and play around with. great job!

[Previous page](https://forum.babylonjs.com/t/ocean-node-material/13554.md?page=1)
