Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.

share|improve this question
add comment

6 Answers

up vote 5 down vote accepted

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

GPU Gems 1

GPU Gems 2

GPU Gems 3

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).

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.