Dark Bramble is one of our crazier planets. As a planet it’s $#$%#$%&$ #$%#$ #$%#$%$%#$%#$ (EDIT: Logan, you can't reveal that!), with lots of ice and fog. Alex Beachum, our lead designer, started greyboxing out the new Dark Bramble a few weeks ago, and found himself in need of a new ice shader. This, of course, is where I come in.
I’ve found that shaders are one of those things where you have to write the damn thing twice. First, you spend some time thinking about it, and what you need to have it do. For the ice, it was important that we see objects embedded in it, but in a hazy hard-to-make-out way. After coming off of writing the river shader, this seemed straightforward to me; it would be a nearly identical shader, without moving distortion, and with more appropriate fogging as objects got deeper into it. So I sat down and spent a night banging it out. Here’s the result of the first time I wrote it:
The second time you write something like this is often much better, especially if you’ve had a night to sleep on it. In particular, I had a realization that made everything much simpler: it was important that we see objects in the ice, not that we see through the ice. With that, I started going to town cutting the shader way down, and in an hour or two had a result I was dramatically happier with. Here’s the shader now!
Here’s some more ice! Seasonally appropriate, I think. Unless you’re in the Southern Hemisphere. In that case, just go ahead and throw some in your drink. ;)