The Abyss (1989)

GLSL Shadertoy Shader

Continuing the trend of making GLSL Shadertoy shaders from my favourite films, the next on my list was The Abyss (1989).

I was stretching myself a bit with this one, practising my reflection/refraction/caustics skills whilst (as always) trying to keep a decent frame rate.

I would have loved to make the ‘face’ as good as the one in the movie, but alas the effort needed to model out far outweighed my GPU.

The GLSL shader source can be found here, and a 360° VR view here.

Dune (Sand Worm)

GLSL Shadertoy Shader

There’s a new Dune movie coming out soon, so I thought I’d make a ‘Dune’ shader (based on the 1984 version).

Nothing too complex in this scene. It’s the first time I’ve used polar coordinates in an SDF (for the teeth and mouth segments), but the landscape is just a simple FBM noise. Ripples are added outside of the SDF to keep the frame rate higher.

The GLSL shader source can be found here, and a 360° VR view here.

Arduino Code – Performance

I’m currently making a self balancing robot, powered by an Arduino Nano, and decided to use NEMA 17 stepper motors to power it.

The DRV8825 motor drivers are great, but cannot be driven using a PWM signal. Consequently the Arduino code must send a ‘step’ signal to the correct pin many times per second – Easily in the thousands if you require a decent amount of speed, especially if you’re micro-stepping.

Performance is critical…

Continue reading “Arduino Code – Performance”

Arduino Code – Logging

Needing to write output to the Arduino IDE’s ‘Serial Monitor’ is something you might find yourself doing a lot. It’s one of the easiest ways of giving feedback on variables, and is invaluable when it comes to debugging.

To output content you can use code like this:

Serial.println("Hello world");

All good so far. How about if you want to output a variable? That’s slightly more work…

Continue reading “Arduino Code – Logging”