Tag: programming

Sparse Virtual Textures

A technical description of my implementation of Sparse Virtual Textures in Gaia Sky

20 minute read

Real time rendering of the Earth in Gaia Sky with surface, cloud and height virtual textures.

Real time rendering of the Earth in Gaia Sky with surface, cloud and height virtual textures.

Implementing proper virtual texture support in Gaia Sky has been on my to-do list for many years. And for many years I have feared that very item, as the virtual texture mechanism is notoriously complex and hard to implement. However, once working, they are very cool and bring a lot of value to software like Gaia Sky. In this post, I describe and discuss my implementation of virtual textures in Gaia Sky in detail, and provide a thorough examination of some of its most interesting points.

Google kills JPEG XL

Why Google controlling Chrome/Blink development is bad for everyone

4 minute read

The web is currently based around the JPEG, PNG and GIF image formats. These are all very old and suboptimal formats which were never designed in the first place with the modern web in mind. A few newer competing formats have popped up recently, aiming to dethrone the original trio to postulate themselves as the standard web image format of the future. These are, essentially, WebP (.webp extension), developed by Google and hated by almost everyone else, AVIF (.avif extension), based on the AV1 container and developed by the ‘Alliance for Open Media’, a conglomerate of big tech companies that are anything but open, and JPEG XL (.jxl extension), developed by the Joint Photographic Experts Group, the same people that developed the original JPEG.

So what’s the fuss all about? Recently, Google decided to kill JPEG XL support in Chrome. A full report follows.

Huge refactoring in Gaia Sky: ECS

Moving the old inheritance hierarchy to an entity component system

4 minute read

In these last few days I have merged a huge internal refactoring into Gaia Sky’s master branch. This refactoring has been cooking for several months and has adapted or completely replaced virtually every piece in the code base. Read on if you want to know more.

Performance analysis of Java loop variants

What is the fastest loop variant? Does it even matter?

5 minute read

From time to time I profile Gaia Sky to find CPU hot-spots that are hopefully easy to iron out. To do so, I launch my profiler of choice and look at the CPU times for the top offender methods. Today I went through such a process and was surprised to find a forEach() method of the Java streams API among the worst offenders. Was the forEach() slowing things down or was it simply that what’s inside the loop took too long to process? I found conflicting and inconsistent reports in the interwebs, so I set on a quest to provide my own answers.

Procedural generation of planetary surfaces

Generating realistic planet surfaces and moons

12 minute read

I have recently implemented a procedural generation system for planetary surfaces into Gaia Sky. In this post, I ponder about different methods and techniques for procedurally generating planets that look just right and explain the process behind it in somewhat detail. This is a rather technical post, so be warned. As a teaser, the following image shows a planet generated using the processes described in this article.

Left: a wide view of a procedurally generated planet. Right: the same planet viewed from the surface.

Git bisect

Go bug hunting armed with a binary search tree

2 minute read

When I started using git as my VCS I skimmed the docs and git-bisect caught my eye. I got acquainted with it rather quickly and have been using it regularly ever since. git-bisect is a little handy git sub-command typically used to quickly narrow down the commit where a bug was introduced in a code base. It uses a simple binary search tree algorithm (BST) to test out different revisions by parting the remaining search space in half.

Website design by myself. See the privacy policy.
Content licensed under CC-BY-NC-SA 4.0 .