View Full Version : What are 'shaders' ?
Im not sure what shaders are, can someone explain it to me? Are those 'shiny effects' in some Q3 surfaces?
10-16-2000, 04:59 AM
Dont take this as totally accurate, but as far as I am aware, shaders are ways of combining different layers of textures into one, with each layer having different controls on blending and UV coordinates.
These can be altered with time to produce an array of very cool effects, or to add details -
ie, a surface shader for a brick wall may say that from a certain distance, you should bumpmap a texture onto the surface, and if you're even closer still, add a detail texture (maybe some fine grain noise) to add to the roughness of the surface.
Your noise texture/function could be much smaller and tiled over the surface moreso than a normal texture map, as you have control over the uv coords.
I think that's what it's about, but if anyone can say it better, please do, coz I'm interested!
Almost that, but this is what you are describing is blending!! http://www.opengl.org/discussion_boards/ubb/wink.gif
A shader is simply a way of defining a texture procedurally. Instead of having an artist draw a texture, you just create a fonction that return the color of u v coordinates. The function can be fully procedural or simply an hybrid : You use a real texture that you modify slightly.
In Quake 3, they use the hybrid mode because it is much faster right now. But don't be surprise, if in less than a year, a company named Nvidia release a piece of hardware that will let us do totally proceduraly what can be done proceduraly.
Anyway, the whole point is to be able to apply functions to you data and make very cool stuff!!! Everything, from bump-map, environnement mapping gets in the procedural texture band wagon.
Don't be surprise, if you are already doing shaders in your own code!!! Every time you use blending to modify the same surface, you have just done a shader!
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.