The thing about shaders

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

The thing about shaders

Post by Nash »

I know nothing about 3-d graphics, so I apoligize if this question sounds silly, but I am wondering how come these new shader effects in GZDoom and ZDoomGL don't work with older graphics cards.

Quake 3 used shaders. It allowed overlays, blending and a whole lot of other funky animation effects on the textures used in-game. But it worked on lower-end systems.

What makes these shaders used in (G)ZDoom(GL) so different that they simply don't work on not-so-recent hardware like mine?
User avatar
Psycho Siggi
Posts: 96
Joined: Thu Jul 07, 2005 19:45
Location: South Africa

Post by Psycho Siggi »

I think Quake 3 used software shaders.
The shaders they are talking about here are hardware shaders.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

OK, I'm going to ask a silly question too - what is a shader?

Obviously I've seen some of the effects that a shader allows, but none of it really fits particularly well with what I think about when the word "shade" is mentioned. So, anyone got a layman's description for me. What are they? What do they do? Why is, for example, floor warping smoother with a shader? And... what's so "shady" about them?

(Avoids making Slim Shady references... Damn!)
Deathlike2
Posts: 233
Joined: Sat Oct 29, 2005 0:40

Post by Deathlike2 »

Quick Wikipedia reference:
http://en.wikipedia.org/wiki/Vertex_and_pixel_shaders

The whole idea is to be able to do nice/neat effects over the existing picture. Realistic water is a prime example of what a shader would be used for (think of a droplet of water hitting on top of a still lake and seeing the ripples from the point of origin). Half-Life 2 uses shaders for water. Of course there are a lot of better examples.

There is a purpose to using modern graphics cards to support them..

Shader support exists starting from the Radeon 8500 series and the Geforce 3 series... however.. the support Graf is expecting is based of Shader Model 2 (SM2)

Some useful info can be found here:
http://en.wikipedia.org/wiki/High_dynam ... _rendering
HDR is one of prime thing developers want to leverage from SM2 or better.

The purpose of requiring this much is probably because there is fragmented support amongst the older Shader revisions under OpenGL (specific vender support which would be a hassle to deal with). GLSL is also of significance. (I wouldn't worry about figuring that out, just think of it as a compiler for shaders in OpenGL).

GLSL info can be found here:
http://en.wikipedia.org/wiki/GLSL

There's also lots of limitations on the previous models which will prevent Graf from implementing certain things he wants to be able to do (hence the tougher requirements... I believe the developer of ZDoomGL wants to leverage the power of the more modern video cards these days where support is practically there).

In any case.. buy a freaking newer graphics card.. you're missing a lot of good stuff these days. A Radeon 9500/Geforce 6600 or better is recommended for this stuff.. (the Geforce 5xxx series are just bad for this, particularly on the low end... just a warning here).

Edit: For clarity.
Quick google for shader examples:
http://www.google.com/search?hl=en&q=sh ... gle+Search
Last edited by Deathlike2 on Sat Mar 04, 2006 4:20, edited 3 times in total.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

Wow, thanks. That's a nice full answer. Plenty for me to read and digest. :thumb:
timmie
Posts: 15
Joined: Tue Sep 27, 2005 9:26
Location: Vancouver, BC
Contact:

Post by timmie »

Quake3's "shaders" aren't shaders in DirectX/OpenGL terminology. I think DirectX used the term "shader" because they were probably first used for lighting (or "shading") a surface. OpenGL went with the more clear terminology of vertex/fragment programs (fragment essentially means pixel).

So, Quake3 shaders != hardware shaders. They are two completely different things that just happen to use the same name, unfortunately.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Yeah... The shit that happens if Micro$oft starts defining terms... :?
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

That may cover some of the confusion I had. I first started paying attention to "shaders" with Q3, but the stuff I'd heard recently about didn't really fit with what little I knew about the Q3 shaders. The fact that they are different things explains that.
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

The word "shader" is being used a lot everywhere nowadays, it's really confusing. Don't ask me to list "like what?" because I can't remember; but what I DO remember is that I've seen the word used for things that aren't even related to 3-d graphics, sometimes.

That aside... okay now I understand. Thanks.
User avatar
Psycho Siggi
Posts: 96
Joined: Thu Jul 07, 2005 19:45
Location: South Africa

Post by Psycho Siggi »

That's what I said, wasn't it?
In terms of Q3 and shaders...
Locked

Return to “GZDoom”