Muryan

Ephemeral 2.2.0

Posted on 2018-11-23 at 19:19

This version of Ephemeral might look virtually unchanged on the outside, but on the inside I’ve converted it to render using Metal instead of OpenGL/OpenCL (on compatible Macs). This is in preparation for the future: a while back Apple announced that OpenGL and OpenCL were both deprecated in favour of Metal, meaning that they’ll be removed in a future version of macOS.

Another benefit of Metal is that it is much easier to use (to write and maintain code). In contrast, I’ve always found OpenCL to be quite difficult and fragile. And given that Metal is Apple’s favourite (OpenGL has languished unchanged by Apple for years), Metal should give the best possible performance.

The full set of changes in this release are:

Download Ephemeral here.

Using Metal in macOS Screen Savers

Posted on 2018-11-17 at 18:58

In my last post I was glowing in my praise for Apple’s Metal technology. Since then my love affair with Metal has cooled just a little. The underlying technology is great, but I just couldn’t get the recommended way of handling Metal graphics (MTKView) to play nice in a screen saver. It works fine in normal apps such the test harness I use for Ephemeral development, but there’s something about living inside a screen saver that makes it exhibit some odd behaviour, primarily visual glitches on start up.

So I ended up dropping down one level in the technology stack, getting rid of MTKView in favour of using CAMetalLayer and CVDisplayLink. Now I have a Metal screen saver that is free of glitches, and works exactly the way I want it to. Despite the switch in technology the bulk of my code didn’t need to change, which was a relief. And for a bonus I’m now using the new timer to run the OpenGL/OpenCL variant of Ephemeral, which is now drawing more smoothly than ever before.

There’s one more issue with Metal that’s cost me a huge amount of time, which is a rare problem which causes visual corruptions. The symptom is that every second frame of animation is garbled, but only ever when running from System Preferences in preview mode. I tried everything I could think of to fix it, but just couldn’t get it to go away.

And then I had the idea of looking at Metal screen savers written by other developers. I found three, and managed to get all of them to draw with the same style of corruption. So I think I can put this down to a problem with macOS: it seems very unlikely to me that all these Metal–based screen savers, independently created by different developers and using different methods for drawing, contain the exact same bug. Coupled with occasional visual corruptions I see on the macOS lock screen and desktop, and I feel even more certain that macOS that’s at fault.

With all that out of the way, the new Metal version of Ephemeral is almost ready to go…

Going Metal

Posted on 2018-08-28 at 21:20

A few months ago Apple announced the deprecation of OpenGL and OpenCL. These technologies are the basis for my Ephemeral screen saver, so this announcement was a great excuse to learn Metal, Apple’s replacement.

My early impression of Metal is that it’s far easier to use: it was relatively straightforward to get it to draw the IFS fractals, whereas with OpenCL it was an absolute nightmare. In fact Metal makes things so easy, I’m seriously considering turning some of my other ideas into screen savers. Anyway, the conversion of Ephemeral is progressing well, and I hope to have a release ready soon.

In other news, I recently moved my web hosting to a new provider, which has allowed me to start using https for added security. At the same time I made a few other small changes to the website, including retiring the RSS feed — it just wasn’t worth the trouble.

Ephemeral 2.1.0

Posted on 2016-09-25 at 11:20

Another big update to Ephemeral, but this time mostly under the hood. The biggest change is that I’ve reworked the rendering engine so that Ephemeral never needs to fall back to using the CPU for drawing, which means it will always draw with the new blur effect. The other changes are:

As with the last version, Ephemeral 2.1.0 (Felix Feles) now requires Mac 10.8 or later. But if you’re running 10.6 or 10.7, the old 1.1.2 release is still available.

Download Ephemeral here.

Ephemeral 2.0.0

Posted on 2016-08-28 at 20:12

With some spare time on my hands, I’ve turned my attention to updating my Mac screen saver Ephemeral. This release is a huge update from the old version. The main changes are:

As this version of Ephemeral is a major rewrite, any feedback about how it performs for you would be great.

I’ve got more ideas for improvements, so stay tuned!

Download Ephemeral here.

psxdmh 2.0.0

Posted on 2016-07-25 at 15:50

psxdmh is my PlayStation Doom Music Hack — a command line tool to extract music and sound effects from the PlayStation versions of the Doom and Final Doom games. Pre–built executables are available for Mac and Windows, along with a collection of the Doom music generated by psxdmh.

The source code for psxdmh is available under the GPL v3 license. This means you can have a look at how psxdmh works, produce a modified version, or use parts of it in your own project.

Full details and downloads for psxdmh are here.

Older news items are available in the archive.