Sign in to follow this  

how much should I know about Vertex/Pixel Shaders?

This topic is 4168 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I like to know how much should I know about vertex and pixel shaders before I can work on 3D games? When is vertex and pixel shading used the most? Thanks!

Share this post


Link to post
Share on other sites
Quote:

I like to know how much should I know about vertex and pixel shaders before I can work on 3D games?


Nothing. You should know a thing or two about linear algebra though.

Quote:

When is vertex and pixel shading used the most?


When you want to achieve advanced effects that are practically very difficult to achieve through the fixed functionality the API(D3D or OpenGL mainly) is exposing to you. Since you're just beginning, that's not going to happen anytime soon, maybe in 3-4 months. For now, make sure you learn the basics well. Through the fixed functionality you can achieve lighting, (multi)texturing and other interesting effects before you need to advance to shaders.

Share this post


Link to post
Share on other sites
Actually, the fixed function is falling by the wayside. No new games are written with fixed function as the main target.

In fact, in DX10, the fixed function pipeline is entirely gone, and the programmable pipeline is all there is. I also know that no new development is going on at Microsoft, NVIDIA or ATI WRT the fixed-function pipeline.

In general, you use vertex and pixel shaders to express, in an easily readable way, what shading (light, color, etc) you want to have on your geometry. One common thing, for example, is to scale the N dot L so that it goes from [n,1] instead of [-1,1] (for some -1 < n < 0), to make your objects less drastically dark (which they typically are with fixed-function lighting).

If you don't know a lot about shading and lighting in general, then you probably need to read up on that particular topic (say, play with Renderman for a bit, or one of the HLSL or GLSL shader tools and examples).

Share this post


Link to post
Share on other sites
I agree you should learn how to do vertex and pixel shaders, and I also agree that you should learn how to use linear algebra before that.

Share this post


Link to post
Share on other sites
You should know everything about vertex/pixel shaders.
You need no knowledge at all about them.

It's possible to make a game without touching shaders (but as said, it'll prevent you from ever working with DX10).
But the more you know, the better. :)

Share this post


Link to post
Share on other sites
Thanks for the advice! I was thinking of purchasing a book about vertex and pixel shading
Is this one good?
Programming Vertex & Pixel Shaders (Programming Series)
by Wolfgang Engel

http://www.amazon.com/gp/product/1584503491/sr=8-1/qid=1155414106/ref=sr_1_1/002-1354865-8988812?ie=UTF8

or is there a good website that I can refer to?

Share this post


Link to post
Share on other sites
It looks like you're leaning towards the DX side of things, which is fine. But if you're main concern is the shaders and not the API or shading language used, check out the GLSL tutorials at Lighthouse3D. Even if you aren't familiar with OpenGL, the theory behind the shaders themselves should be enough to teach you quite a bit.

My other suggestion is to download a free shader creating application, like shader designer so you can experiment and play with the shaders as you're reading about them.

Good luck!

[Edited by - CyberSlag5k on August 12, 2006 4:29:39 PM]

Share this post


Link to post
Share on other sites
If you're looking to learn DirectX shaders you could try Introduction to 3D Game Programming with DirectX 9.0c: A Shader Approach by Frank Luna. It just came out recently. It's like Introduction to 3D Game Programming with DirectX 9.0c (first edition that used the fixed function pipeline most) except that it introduces you to shaders early on.

Share this post


Link to post
Share on other sites
Quote:
Original post by hplus0603
Actually, the fixed function is falling by the wayside. No new games are written with fixed function as the main target.
No new PC games. Remember the console market is much larger then the PC market.

-= Dave

Share this post


Link to post
Share on other sites
Quote:
Original post by ph33r
Quote:
Original post by hplus0603
Actually, the fixed function is falling by the wayside. No new games are written with fixed function as the main target.
No new PC games. Remember the console market is much larger then the PC market.

-= Dave

And theres plenty of PC games which aren't targetting cutting edge gamers too. Like, 99% of the shareware market. [rolleyes]

Share this post


Link to post
Share on other sites
Hi,
Quote:
Is this one good?
Programming Vertex & Pixel Shaders (Programming Series)
by Wolfgang Engel

http://www.amazon.com/gp/product/1584503491/sr=8-1/qid=1155414106/ref=sr_1_1/002-1354865-8988812?ie=UTF8

This book is not really intended for beginners. You should have a good foundation in D3D first ... check out Frank Luna's book or some of the D3D tutorials that are online to start ...

- Wolf

Share this post


Link to post
Share on other sites
Quote:
Original post by ph33r
Quote:
Original post by hplus0603
Actually, the fixed function is falling by the wayside. No new games are written with fixed function as the main target.
No new PC games. Remember the console market is much larger then the PC market.


Well, non-fixed-function shaders are in use in games for the Xbox, PS2, Xbox 360, and the PS3.

Haven't been keeping up with the handhelds, so I can't where they're at these days.

Share this post


Link to post
Share on other sites

This topic is 4168 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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