Learning shaders?

Hi all,

TA here with mostly tool development experience, looking to expand my skills.

I want to learn the magical world of shaders. I know how to use visual tools like the UDK Material Editor, but want to know and understand shaders to the degree that a tech artist SHOULD if they’re worth their salt :p:

What are some good resources for learning the theory and how to apply them in today’s pipelines?

I’ve seen some neat DVD’s floating around, like:

Eat3d’s video on CGFX shader creation: eat3d.com - eat3d Resources and Information.
I’m a bit hesitant because I’ve seen one Eat3d DVD and it was very light on theory or how to apply the knowledge in other use cases, it was pretty much just the “instructor” narrating time lapses of his work.

CGAcademy has a HLSL series:
https://www.cg-academy.net/es_catalog/product_info.php?cPath=25_38&products_id=64
https://www.cg-academy.net/es_catalog/product_info.php?cPath=25_38&products_id=65

I haven’t seen any CGAcademy tutorials yet, are they worth a look? The site seems pretty old and not updated anymore, but if the knowledge is “fundamental” enough and explained clearly, I’d love to give it a try. I know they have Bobo doing MaxScript videos on there, so I imagine it’s worth taking a look.

Thanks!

FX Composer | NVIDIA Developer from NVIDIA is a good tool for learning-by-taking-apart, although the limited educational stuff along with it isn’t very extensive and tends to assume some programming background. It’s certainly useful for screwing around :slight_smile:

[QUOTE=Theodox;21711]FX Composer | NVIDIA Developer from NVIDIA is a good tool for learning-by-taking-apart, although the limited educational stuff along with it isn’t very extensive and tends to assume some programming background. It’s certainly useful for screwing around :)[/QUOTE]

Nice! I’ll definitely check it out. I’ve heard of it but wasn’t sure if it was an ancient tool that wasn’t relevant anymore.

Are there any resources available for shader knowledge specific to today’s pipelines? Or is a solid foundational understanding all that’s needed?

The space is not completely unified - there are competing languages (CG, HLSL and GLSL) and competing plafrorms (directX, openGL) and multiple target levels on each platform (from a crappy IOS device to a hot DX11 PC).

The “high-level” languages – particularly CG and HLSL – are quite similar but not identical; if you get good at one transitioning to the other is not too painful. (Some background here: shaders - What are the pros and cons of HLSL vs GLSL vs cg? - Game Development Stack Exchange) The basic concepts are pretty close - the hard thing to get over is learning to think like a shader fragment – programming with few or no branches, no context, and no global data structures. It takes a while to get used to :slight_smile:

Another way to get used to shaders is to try Unity: they have a shader model which handles a lot of the boilerplate but lets you swap in custom CG code where you want it. Eventually you’ll need to outgrow it – the shaders it makes are usually kind of slow compared to hand-coded ones – but it lets you focus on one bit at a time – and it’s free; plus, there’s a big community for asking questions and making tutorials.

If you’ve got Unity handy, here’s a great starter from a buddy of mine: Joseph Stankowicz: writing-your-first-shader

i can vouch for the eat3d vid. luiz starts with the dead basics and walks you through the theory of setting up shaders. it eventually gets pretty advanced, so you get pretty much all you need in one shot. yes, it’s all cgfx, but it’s not a stretch to convert a shader to hlsl once you know how they’re built.

Free, interactive examples and high quality 3D graphics course

https://www.udacity.com/course/cs291

I wrote a ton of advice in this thread:
http://www.polycount.com/forum/showthread.php?t=118365

https://www.shadertoy.com/ and http://glsl.heroku.com/ are two of my favorite sites to explore and see what other people have experimented with.

I can also vouch for the Eat3d video… I find it’s actually handy to know CgFX not that there is really much difference at all to HLSL. Also Luiz didn’t put me to sleep so that’s a plus. Some of his shaders in the video were a bit inefficient for game implementation but it’s a small beef, especially if your just learning. It’s a good modular approach to learning them.