20
\$\begingroup\$

I'm interested in learning about Shaders: What are they, when/for what would I use them, and how to use them. (Specifically I'm interested in Water and Bloom effects, but I know close to 0 about Shaders, so I need a general introduction).

I saw a lot of books that are a couple of years old, so I don't know if they still apply. I'm targeting XNA 4.0 at the moment (which I believe means HLSL Shaders for Shader Model 4.0), but anything that generally targets DirectX 11 and OpenGL 4 is helpful I guess.

\$\endgroup\$

7 Answers 7

7
\$\begingroup\$

These are all still relevant (and free online). CG tutorial (cg is virtually identical to hlsl) would probably be a good starting point.

The GPU Gems books are sorta like recipe books for random effects, they assume you know what you're doing, but they're great resources once you're more comfortable with things.

CG Tutorial

EDIT: and yeah, just about any tutorials/books you can find on shaders will still be relevant, a shader written for Shader Model 1 will run with Shader Model 4, and in a lot of cases you'll want to target lower shader models, since many effects don't need the extra stuff offered by the newer models (you can make nice water and bloom effects with SM2.0, and then if dx9 is an option you can target lower end hardware).

\$\endgroup\$
3
\$\begingroup\$

There's also the ShaderX series of books. The first couple are free to download from the link and cover a range of topics, including water. The articles in the free books were originally targeting quite old shader versions, but the techniques should hopefully be clearly described and easily transferable.

\$\endgroup\$
2
\$\begingroup\$

Shader Languages doesn't differ so badly, thus it is possible to learn one language and transfer this knowledge to other languages. Personally I started with Cg. There are really good free resources by Nvidia.

Just have a look: http://developer.nvidia.com/page/cg_main.html

After you get rid of the basics you can do some research at specific shaders. It happens that there is no "bloom shader" or "water effect shader", but there are several different techniques and models you can implement with shaders.

In my opinions, you don't need a book, if you are just intrested in some cool effects, but if you want to gain some knowledge in the field of computer graphics, I recommend to you the ShaderX oder GPU Gems series.

\$\endgroup\$
2
\$\begingroup\$

Since you listed OpenGL as a tag, and nobody else has linked to it yet, the OpenGL shading language (aka. orange book) is a pretty good resource. It covers the shading language, as well as plenty of use cases.

\$\endgroup\$
2
\$\begingroup\$

I'm pretty new to shaders myself but I've been reading the GPU Pro books by Wolfgang Engel. They've been blowing me away with how incredibly easy and powerful the techniques are. Also the content isn't discussed like most academic text either, it focuses more on implementation details and the trade offs between different techniques.

http://www.amazon.com/GPU-Pro-Advanced-Rendering-Techniques/dp/1568814720%3FSubscriptionId%3D008XA1X9NAPEJGHQX182%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1568814720

http://www.amazon.com/GPU-Pro-2-Wolfgang-Engel/dp/1568817185%3FSubscriptionId%3D008XA1X9NAPEJGHQX182%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1568817185

\$\endgroup\$
2
\$\begingroup\$

I just discovered this book by Patricio Gonzalez Vivo available on line: The Book of Shaders

I'm only a couple chapters in so I am unable to provide an in-depth review, but so far I'm finding it very clear, entertaining and practical. It starts at the very beginning and appears to end up covering more or less all the topics that I can name (as a total beginner in the world of graphics). It is, however, apparently a work in progress, and the later chapters are not available - I'll be eagerly awaiting updates.

P.S: You probably already know about it, but just in case, I highly recommend shadertoy.com as your first "practice sketchbook". I was initially learning in Processing, but I find this web app even better for the purposes of learning.

\$\endgroup\$
2
  • \$\begingroup\$ apologies for not linking properly to shadertoy.com, as a new account I'm only able to add 2 links, if anyone is able to edit my post and add the third link properly that would be much appreciated. \$\endgroup\$
    – Toadfish
    Dec 21, 2015 at 2:04
  • \$\begingroup\$ this book has a systematic description about shader, cover widely modern topics about shader. You can take the book's table of contents to search related information. \$\endgroup\$ Feb 16, 2017 at 2:02
1
\$\begingroup\$

I've been looking for the very same thing and found this: http://wiki.gamedev.net/index.php/D3DBook:Book_Cover

It's only available only, which is a shame, but as far as I have looked into it, is a good read.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged .