what would you choose to write unity shaders GLSL, HLSL/CG or Surface lang?

Hi!,
I’m pretty new to shader programming. I want to start to write some of them but have a little problem deciding what language to choose. I have read a bunch of threads, have seen a bunch of videos and read some tutorials.

I have seen people using Surface shaders, others like the book at wikibooks use GLSL and others HLSL/CG. What language do you recomend to start writing shaders in unity? I really prefer a low level language at first to understand everything so, I think surface shaders is not what I’m looking for. On the other hand after reading a post on unity blog, it seems they translate all to GLSL shaders, so, it GLSL my best option? It seems there are an orange book that seems to be a nice book about GLSL shaders. What do you think? Could you give a hand here with all this mess?

Thanks in advance.

Unity shaders are generally written in HLSL, so that’s what you should use. Surface shaders are also written in HLSL but Unity helps you out by doing a bunch of boilerplate stuff automatically.

Surface shaders make it easy to integrate with Unity lighting, but they’re tied together with invisible magic strings that can make them frustrating to work with at first. So maybe start with some simple HLSL shaders, and move onto surface shaders when you want something that’ll be useful in game.

Ok thanks for the info. I will go for HLSL/CG then.

Thanks a lot.