This page looks best with JavaScript enabled

Squishy Sphere - Deforming Vertex Shader - Part 1

 ·   ·  ☕ 2 min read

Today we’re going to be working with vertex shaders, specifically we’re going to be developing what I’m calling Squishy Sphere. A sphere that you can smash against a wall and watch it deform. Sort of a poor mans soft body simulator (but not really).

This is also the first video I’ve done which digs into vertex shaders and what they do. It’s a little expansion beyond what a standard surface shader will offer you. Specifically, a vertex shader lets you (suitably enough) manipulate vertices. This is what we’ll be using to squish our cube, but it can also be used for a whole slew of other very cool things. It represents one of the core features of a shader program with the other being the fragment shader which will actually render the image to the screen.

Despite all the cool stuff mentioned in this video, the shader still isn’t done. So subscribe to catch Part 2 when that is released later this week and comment with what else you think we should do to explore the power of vertex shaders!

Based upon this Twitter post by Chris Wade:

Curious about that mention of Barycentric Coordinates? Read more about them here:

The simple answer if Wikipedia isn’t your style is that they are a coordinate system that allows you to interpolate between 3 values with each value representing the weight of the triangles vertex at that point.

Sam Wronski
Sam Wronski
Maker of things, currently helping build cloud things @ Microsoft. World of Zero is a personal project disconnected from my professional work. Lets make something awesome together!