Fun with shaders
I think writing shaders is some of the best fun you can have programming. The way we humans are wired we really are suckers for visuals. So it’s no wonder if some find working with shaders fun, since it offers very strong instant reward.
However “instant” reward applies only to those who already know how to do it and only have to make their creative vision happen. I’m still very much at the beginning of learning the basics so it’s still a lot of headache, but also a lot of “Ah!” moments to be fair.
One of the best exercises imo is the implementation of the Team Fortress 2 shader. It’s very well documented and explained, and you can usually find someone who has already done it before. So translating it in to the environment you are currently working in should be manageable even for a newbie. Not to mention it’s a pretty cool looking shader.
So that’s what I set out to do in Unity. Writing shaders is very convenient in Unity. They implemented a system where you pretty much only have to write the parts you want to be customized. I’m pretty happy with the result, though I have no idea if it could be done better.
A demo of the shader can be found here.
Next step will be reading the Cg Tutorial book for more information. After that I want to make something I call the Sadowski shader. Aandrzej Sadowski is a painter, but I don’t know much about him. Judging by his name he’s probably Polish. I saw a couple of pictures at hyperrealist exhibition, though I think his paintings would rather be considered photorealistic. I really liked the picture below, so I will try recreating it the best I can.
Bye and have a nice day!