A few days ago I decided I really want to level up my technical art and graphics programming skills. So much so that I would need a portfolio, because if I ever decide to job-hunt again, I want to be prepared for a role like that.

So I dusted off my Unity Hub, got the latest Unity 6000.2.0f1, and opened Shadergraph. It had been a while since I last played with Unity, more than a year, and I expected it to have a bunch of new features to learn about – most likely a lot of them being a replacement for hacky code I’d had to make in the past, or plugins we had installed to solve.

But all I needed was Shadergraph. I had decided I did not want to reinvent the wheel every time. I would skip the long hunching-over-the-keyboard hours trying to figure out shaders –I was already playing with shadertoy for that– and just focus on what I really wanted to learn: shaders, vfx and post-pro effects.

Unity greeted me with a big load of CRASHES.

Turns out, Unity 6000.2.0f1 is crashing all around for the latest versions, JUST WHEN I DECIDED TO GET BACK!

It was maddening. I barely got through the Brick Wall Parallax Effect and a few other shaders without literally punching through the brick of my room. The murder feelings were real. It was either accepting this nerve-wrecking shit-show, or going back to writing shaders in Unity, which does not, in fact, guarantee there will not be any more crashes. And on top of that, going back to writing them means having to use the Built-In Render Pipeline, which is on its way out.

So why Unity and not Godot? Well, I had been binge-watching Acerola’s Youtube Channel (if you are interested in these topics, I really recommend it) and he speaks at length of the difficulties of developing with Godot’s Compositor Effects. He offers a solution, and it’s a super-easy to understand one, in fact, but I do not want to wrestle with engines and plugins to make them work. And it still meant writing plain shaders, which I love, but it would still be in GLSL and I had only ever used HLSL.

Another thing that stood out to me was the fact that he had to make a custom shader language to make several passes work in one file. With that, and a few other nuggets of wisdom, I realized:

Engines are hiding too much away from me.

As you know, I used to work professionally as a gameplay programmer, but I have also made my own games on my spare time. At the beginning of last year, I decided to leave Unity after the runtime license drama, and started playing around with raylib. I missed my Lua + LÖVE2D days and I just wanted to get my hands dirty with no engine to back me up, plus learning some C++ in the hopes of expanding the pool of possible future jobs for me.

If you have ever looked for jobs in the industry, you know at least half of them ask for some level of C++. It’s a standard.

One of the resources Acerola recommends is doing Catlike Coding’s Unity rendering tutorials. Fun fact: I have followed them, start to end, at least a couple times in the past. Catlike Coding, along with Red Blob Games, is one of my greatest references.

And that is when it hit me: if I am going to write shaders anyway, why not do so close to the Graphic’s API, anyway? Lift all the veils, look under the hood, see what’s really cooking.

✨ And get that prized C++ experience under my belt ✨

There is only one library I know that fits all my needs, and that is… raylib.

So… that’s what I’m doing. And you can see a little preview of my work here:

a lonely sphere under the light of a basic directional light
My very first custom shader in raylib, yey!

If you want to learn how to setup your own custom shaders in raylib, you can look at my tutorial here.

The plan is to use Catlike Coding’s tutorials as a start to get a simple PBR with multiple light sources, and figure out how to do that on the thin abstraction layer that is raylib by myself.

I’m really excited about this! And I will continue to post my progress on this (and other topics).

Hope to see you around!

Olatz

If you made it this far...

Thank you! I hope you liked it!

I do not allow comments in my blog because I do not want to deal with bots. However, feel free to contact me!

And if you would like to support my work, please, consider doing so through ko-fi:

Support me!