Triangle Waves

August 30, 2017

One of my favourite little shader techniques is to take continuous linear values, and turn them into oscillating triangle waves. Oscillation is useful in all kinds of cases. It can create repetition in space, or repeating animation over time. The most common way to generate oscillation is with the trigonometry function sin, which creates the well known smooth sine wave shape. But sin can sometimes be a little expensive, and other times that smoothness and non-linearity is not exactly what you want. (more)

Sketching a logo with shaders

August 24, 2017

When twitter avatars recently went from square to circular, even though my old image had a circle in the centre, the cropping they picked meant it ended up looking even more ugly than before.

So now seemed like a good time to update it, and at the same time replace the old thndl logo with something fresher.

As usual, my go-to tool for this kind of thing is not to sketch in a drawing app, but instead to write a little shader program. You can already see the result in the top left corner of your page, but this is the short story of how it was constructed. (more)

thndl v3

May 19, 2017

It has been more than 2 years since the last post here on thndl, and the technology world has moved on noticeably during that time. When I first started writing thndl, shaders were a bit exotic, and WebGL wasn’t widely supported.

(more)

Some live coding with python

October 7, 2014

I've worked on a few different live coding environments in the past, but now I thought I would try to make something simple with Python that could later maybe form the basis for a bigger tool.

(more)

How DNG compresses raw data with lossless JPEG92

October 4, 2014

/images/22_bayer_bits.png

The Back Story

For the last year, I've been developing a cross-platform (i.e. Linux, Mac and Windows) Python-based desktop application called "MlRawViewer".

It was born out of the troubles I had working with the large raw video files produced using Magic Lantern with my Canon 7D (see Life Without Artifacts for more details).

(more)

Life Without Artifacts

September 24, 2013

Practically every film or video you watch these days is made up from thousands of 8x8 blocks of pixels described by a tiny stream of bits taking up just a fraction of the size of the original uncompressed data.

When the bitrate is high and the compression was done well (for example in a BluRay film), it can be almost impossible to tell this while the image is changing and you aren't sitting close to the screen.

(more)

RAW, a new way of recording the world

September 21, 2013

/images/0019_raw_frame_crop.png

1:1 crop from a 7D RAW video frame. Processed with RawTherapee (sharpening, noise reduction).

A while ago I bought a Canon 7D DSLR camera to use for taking pictures and making videos. It's had a good life so far, producing thousands of pictures and many videos from different events.

(more)

Filming shaders

April 5, 2013

Some of the most interesting shaders are self contained 4 dimensional worlds defined entirely by maths. With a powerful GPU rendering them in real time at 60 frames per second, they can look utterly stunning.

But what to do in case you don't have the most powerful GPU to enjoy these?

Well, if you are willing to give up on interaction, another option is to render the shader frames to a file and create a video from them.

(more)

Shader recap

November 29, 2012

So far I've posted 9 articles here covering different techniques for making OpenGL shaders.

For those of you that have been following and trying things out, I thought this might be a good place for a recap.

I introduced the different built-in functions of GLSL as we needed them to achieve different goals, but at some point you might have been wishing for a compact reference to all the available functions.

(more)