PDA

View Full Version : Shaders? What?


Captain
02-01-2003, 12:09 AM
Ok, I know I'm going to sound ignorant, but what is the definition of shader. Ive seen it used to define textures AND geometry (vertex shader for instance). What would be a good general defenition?


-Captain

leigh
02-01-2003, 12:48 AM
A shader is something that changes the way in which light reacts to the surface, as opposed to a texture (which includes image maps, procedurals) that simply add detail to a surface.

Mauritius
02-01-2003, 11:31 AM
In RenderMan terms, a shader is a program that is run on the geometry with a user controllable frequency (often this is the tesselated geometry, which are quads, smaller than a pixel in size, in most RMan renderers under production circumstances).

What these programs do is up to the one writing them. However, by sorting shaders into classes, the renderer gets a hint what he can expect the shader to do and what not to (or even force it to, by making some variables read-only).

In theory, you can do almost anything in a shader. High-end renderers like MRay or the RMan compliant ones support displacement, surface, lightsource, volume etc. shaders; to name a view classes.
The concept of a shader being st. that returns the reflected light from a surface is misleading. Lightsources are shaders too, for example.
Shaders may also be used to turn a simple geometry into a complex one or even to create geometry at rendertime:

http://www.cinegrfx.com/newpages/prman-gallery/gifs/prman-rope_render_large.gif

This image shows a cylinder primitive (which means the cylinder was not approximated using polygons or a parametric surface) which had its shape altered by a displacement shader.
Stuff like this has btw. been possible with the high-end renderers since the late 80's while those hyped ones like Brazil etc. not even have it in a release version almost fifteen years later.


Cheers,

.mm

CGTalk Moderation
01-14-2006, 08:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.