# vertex waves with GLSL

**URL:** <https://discourse.threejs.org/t/vertex-waves-with-glsl/80741>\
**Category:** Showcase\
**Created:** [April 4, 2025, 8:50pm UTC](https://discourse.threejs.org/t/vertex-waves-with-glsl/80741 "2025-04-04T20:50:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kritb](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/kritb/32/37234_2.png) [@kritb](https://discourse.threejs.org/u/kritb)\
**Post date:** [April 4, 2025, 8:50pm UTC](https://discourse.threejs.org/t/vertex-waves-with-glsl/80741/1 "2025-04-04T20:50:06Z")

</div>

Vertices on a plane are adjusted from shader code and buffers! Used a wave approximation function with a mouse click. 🙂

[**demo**](https://chrisboligprojects.pythonanywhere.com/vertexWaves)

thanks!

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/b/d/bd110e59e09a6cb109a8f8c7fca6cb1d52502f89.jpeg)  
 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/f/f/ffc1b73b6045f300bd112d8c9c162d3d06e93d62.jpeg)

---

<div class="post-metadata">

**Author:** ![vielzutun.ch](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/vielzutun.ch/32/21366_2.png) [@vielzutun.ch](https://discourse.threejs.org/u/vielzutun.ch)\
**Post date:** [April 5, 2025, 4:12am UTC](https://discourse.threejs.org/t/vertex-waves-with-glsl/80741/2 "2025-04-05T04:12:15Z")

</div>

I like how the wavefronts get reflected from the plane’s boundary and then superimpose with the generating waves 👍

---

<div class="post-metadata">

**Author:** ![kritb](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/kritb/32/37234_2.png) [@kritb](https://discourse.threejs.org/u/kritb)\
**Post date:** [April 5, 2025, 5:14am UTC](https://discourse.threejs.org/t/vertex-waves-with-glsl/80741/3 "2025-04-05T05:14:54Z")

</div>

Thanks! I was happy with the reflection or boundary conditions as well. I think it’s numerically similar to a wave in an infinite well, or like water splashing against the side of a pool. But I might be wrong. It’s also the result of letting `texture2D` from the shader just do its thing. Any other boundary conditions would require indexing the pixels, which wouldn’t be as straightforward.
