Wobbling Stuff With Maths Part 2: Taming the Maths

This is the second post in a series about a shader side project of mine, so make sure you’ve read the first one or this won’t make much sense!

In this post I want to talk about the script I use to interface with this weird vertex wobbling system I’ve made. Before I wrote this script, the shader on it’s own was unruly and impossible to get usable results out of unless you got very lucky with the parameters used. The brilliant thing about shaders is that they can do a lot of maths very quickly using your GPU. The not so brilliant thing is that it can be tricky passing information between shader programs and regular CPU scripts or programs. I have no idea if the way I do it is the best way to do it, but I’ve got some pretty good results with it so far.

Continue reading


Wobbling Stuff With Maths – Part 1

This is the start of a series of blogs I intend to write about a fun little side project of mine. I’m kind of making this up as I go along so you’ll have to forgive any obvious mistakes! To understand this you’ll need a basic knowledge of what a mesh is, what vertices are, as well as some intermediate maths, although I’ll try to explain all the necessary stuff as I go along. For the mean time I’ve stripped out all the shader jargon in my code snippets so the maths is easier to read. (N.B. Please add comments if anything doesn’t make any sense and I’ll amend the blog)

Continue reading