Skip to main content
gamedev.net
🔒 Locked

HLSL Tutorials

Started by rKallmeyer 14 replies 11.6k views
Original Post
rKallmeyer
rKallmeyer
Anyone know any good tutorials on HLSL? I've been using fixed function for about 2 years and programming for about 4. Thanks
darookie
darookie
The above AP was me.
The link is here
.

Good luck!
Pat


haro
haro
I strongly recommend The CG Tutorial. CG and HLSL are essentially the same language. It is the perfect book if you have a background in graphics programming but no knowledge of shader programming. You can find a sample chapter at the link I gave above.
ngill
ngill
try GLSL, it's probably easier (and probably faster due to more optimization opportunity) in some ways, though documentation is not as easily available.

http://developer.3dlabs.com/openGL2/presentations/siggraph2003/oglsl.pdf

Quote:
Original post by Nuget5555
Anyone know any good tutorials on HLSL? I've been using fixed function for about 2 years and programming for about 4. Thanks
NLDEV
NLDEV
Quote:
Original post by ngill
try GLSL, it's probably easier (and probably faster due to more optimization opportunity) in some ways, though documentation is not as easily available.

http://developer.3dlabs.com/openGL2/presentations/siggraph2003/oglsl.pdf

Quote:
Original post by Nuget5555
Anyone know any good tutorials on HLSL? I've been using fixed function for about 2 years and programming for about 4. Thanks


If he's using HLSL, he's probably using DirectGraphics.
rKallmeyer
rKallmeyer
Quote:
If he's using HLSL, he's probably using DirectGraphics.

That would be a correct. Thanks for the feedback, appreciated. Is it me, or is HLSL completlely lacking from the dx9 documentation that comes with the sdk? If it is, then why?
ngill
ngill
there are lots of examples I thought... especially in Summer 2004 SDK (which is almost out). Just wondering, what are you developing in? C++ or C#?
mikiex
mikiex
As well as just HLSL, you should be looking at .FX files.
superpig
superpig
In the Summer Update, you should be finding a bunch of "HLSL Workshop" tutorials - they're copied from ones presented at some DirectX conference event a while back. I thought they were pretty good.

(Moving this to DirectX because you'll probably get better answers there).
Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse
circlesoft
circlesoft
There are a few books that I recommend for learning shaders from the ground up:

Real-Time Rendering
Shader X2: Introductions and Tutorials
Shader X2: Tips and Tricks

GPU Gems

Yes, I know that all of those books are expensive. If you have any shader experience (or can learn the basics from what is available to you now), I'd recommend going with Shader X2: Tips and Tricks and Real-Time Rendering.
Pipo DeClown
Pipo DeClown
I really really recommend you to look at some shaders in the SDK. While you do so, you'll learn the basics of the language and also how to implement it in your program. The HLSL reference OWNS! You should look at the variable-types-, instructions- and the other descriptions. You'll learn a lot from the reference. And it's easy to follow.
rKallmeyer
rKallmeyer
Thanks for all the replys. Didn't Microsoft release a DX Pipeline book a while back? Does anyone know if it covered hlsl at all?
circlesoft
circlesoft
Quote:
Original post by haro
Quote:
Original post by circlesoft
There are a few books that I recommend for learning shaders from the ground up:

Shader X2: Introductions and Tutorials
Shader X2: Tips and Tricks


What did you find appealing about the Shader X2 books? I have heard alot about these books, but nothing positive yet.
Introductions and Tutorials
Pros:
- Multiple illumination models, including Phong, Oren-Nayar, and Cook-Torrance. Code samples come in HLSL. vs/ps 1_4, 2_0, and 3_0 are used throughout
- Very comprehensive and in-depth article on shadow mapping
- Good article on different fog effects
- Detailed specs and examples of vs/ps 3_0
- Has a lot of things that a beginner would want to accomplish. It's very easy to follow, and the samples are clear.

Cons:
- The introduction article is not nearly long, or detailed, enough. It's basically just a copy of the SDK docs.
- This entire book can pretty much be found out there on the web, if you know what you're looking for, and where to find it.

Tips and Tricks
I believe this book is actually quite awesome, myself. It has a ton of material in it, ranging from geometry manipulation, to advanced eye candy, to post-process techniques, to different types of shadows. Anyways...

Pros:
- There are tons of articles, on tons of different effects. Here is a short list of the most interesing ones:
- Vertex shaders for Geometry Compression
- Cloth Animation with VS/PS 3.0
- Hemispheric Lighting with Radiosity Maps
- Advanced Water Effects
- Practical PRT
- Advanced Sky Dome Rendering
- Layered Car Paint Shader (from the ATI demo)
- Advanced Image Processing
- Non-Photorealistic Filters
- Image Effects
- Soft Shadows
- Shader Engine Integration
- The shadow section of the book is very good. It has very detailed and clear articles on three different implementations of shadows, including soft shadows, object ID shadows, and extruded shadow volumes.
- The articles are explained very well - they just don't give you the shader code, but they explain the graphics theory behind it, along with all of the math equations involved.

Cons:
- Some of the articles don't have demos or source code on the CD

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.