Planet Shader WIP

Planet Shader WIP

Just a month ago, I decided to start learning about shaders in depth. There's a wealth of free resources one can learn from online. Above is a WIP of some planet shaders I'm almost finished with.

I've bought a lot of amazing planet assets over the years from the Unity Asset Store with the intent to use them in my game, but I've never been completely satisfied with any of them. I knew I'd have to eventually learn CG/HLSL and Unity's ShaderLab to be able to customize the shaders myself. Each asset had strengths I wanted to leverage, and I finally got around to incorporating those strengths into several of my own shaders. I'm now able to use Grand Designer to create PBR textures for the planet and use them in my customized surface shader. Using look-up textures, I'm able to get the look I want for the atmosphere shaders, which include scattering. I definitely would not have been able to achieve any of this without learning (and copying where necessary) from all the assets I bought.

The only drawback is slightly low resolutions of the planet up close, even with 8k x 4k planet textures. For close-ups, there are some tricks I may try, or maybe I'll use some procedural planet assets. However, procedural planets won't let me use specific planet textures, like Earth's.

The only thing I made a hard decision not to incorporate is shadowing from other planets/moons. I did get shadows working initially on the transparent atmospheres, but it would require too much time and effort to get it where I want, and I need to move on to other aspects of the game. I just need to implement planet rings, and then get it all working in the game and be moddable. I'll probably have to redo the planet shaders once the new HD Scriptable Rendering Pipeline comes out in Unity, but hopefully it won't be too bad with the limited shader knowledge I have so far.

Next up is rewriting the localization system to suit my needs better. After that, incorporating the weapon/turret systems. I've been holding off on those systems because the new Entity Component System and C# Jobs are getting released soon by Unity. I want to see if they'll offer some performance advantages when having lots of turrets and weapons flying around on screen.