Sign in to follow this  

HLSL example

Recommended Posts

Hi,

I am studying HLSL shader programming.

I just read "Practical Rendering and Computation with Direct3D11".

But this book does not include many HLSL shader examples.

Can anybody guide me to some good resources for HLSL examples?

 

Thanks a lot.

 

YL

Share this post


Link to post
Share on other sites

Frank Luna's books (Introduction to 3D Game Programming with DirectX N where N = 9.0c, 10, 11 or 12) has a webpage with the source code of all the samples in the book, included the hlsl files.

 

"Practical Rendering and Computation with Direct3D11" also has a webpage with the engine the authors use in the book.

Share this post


Link to post
Share on other sites

You may want to check out my HLSL series on my YouTube channel. I think it's a great place to start learning HLSL. The whole series is basically building up one shader but it adds more and more to the shader as it goes so that by the end you have the foundation for pretty much any basic shader you want to make. It ends with Blinn-Phong shading, but implementing normal maps would have been the next step. The entire C++ DX11 project is available on my website. With that code you can see the final HLSL shader in action.

 

The Blinn-Phong shader built in the series has a somewhat retro game look to it, especially without normal mapping, but it's probably the best place to start learning. Once you understand how that works it will be easier to understand more advanced shaders. Plus, it gives you a very usable shader to start making games with.

 

Much of the video series is the math behind the shader. You will want to know Vector and Matrix algebra. If you do not already have a strong background in these subjects, you will want to watch my videos on that as well.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this