Dev Diary - Shards of Magic Shaders

Dev Diary - Shards of Magic Shaders

How do you like Shaders? I hate them! They are (in my opinion) too complex, full of lighting math, and code fragments that act as a black box that I can't easily crack open. I end up with a lot of trial & error and searching for other people's resolution to seemingly easy problems. (i.e. Why is everything now pink!?) But being a necessary evil I dove into updating a few of them and the lighting of my world. Unity supplies a lot of good shaders, but I wanted something special for NPCs.

My camera is currently at 45 degrees, and I may increase that to around 70 for more of a "top-down" look. Whatever I end up doing with the camera, I want to always have the player's avatar visible. My ideas for that were to either have a 'window' that the player can see-through structures or some form of silhouette or x-ray showing what is behind.

Shader Magic

The image shows my test scene and my shader work on a diffused "x-ray" shader. The next steps will be to make it conditional on a setting, player holding down a button, or to turn off other's x-ray if the player isn't behind a building. But for now I'm satisfied with this progress.

Author face

Christopher Axthelm

Creator of Mad Hatter Worlds games. Facinated with logic, world building, and software systems.

Recent post