Shaders
by Solo Hans · in General Discussion · 05/24/2004 (11:39 am) · 4 replies
Could someone explain 'shaders' to me as a layman. I read somewhere that the animator from the 'Shrek' production used shaders, which was explained as a mini-program. Also, they used flow controls within the shaders for layering.
I have read recently that Torque offers shaders and I was also wondering if this it the same technology use to make a multi-million dollar movie like 'Shrek?"
Thanks.
I have read recently that Torque offers shaders and I was also wondering if this it the same technology use to make a multi-million dollar movie like 'Shrek?"
Thanks.
About the author
#2
05/24/2004 (12:26 pm)
Mark is correct, but let me try and add a little more. Shaders basically let you define how the lighting on an object is calculated. With older technology the lighting pipeline was fixed. You could basically only choose to use flat shaded, phong, or gouraud shading models. Now shaders let you program the lighting pipeline to create all sorts of effects as Mark stated. The first shaders were vertex shaders which let you program per object vertex, and now pixel shaders let you program the calculations for each pixel.
#3
Pity the DirectX guys picked the confusing terminology.
05/24/2004 (1:45 pm)
Actually, Owen, the 'first' shaders that the other Mark is talking about were done in software. Look up Q3 shaders or Renderman for examples. The current hardware stuff is a case of bad name collision. In OpenGL they're called vertex and fragment programs, which really cuts down confusion a lot.Pity the DirectX guys picked the confusing terminology.
#4
05/24/2004 (4:25 pm)
Thanks, these definitions help to explain it a little better.
Torque Owner Mark Miley
There are also high level shaders for doing special effects on textures such as translucency, sub-surface scattering and more. Some shaders are intended to work directly with video hardware for fast updating on the fly.
Video games have recently adopted hardware shaders for doing effects in games. Pixel shaders is a word that has been tossed around quite a bit as of late and it's a way of adding special effects per pixel. Refraction, shadows, glows and things like that can use pixel shaders. These are commonly programmed textures/effects using a programming langauge that ties into the video card for fast display. Now sure is all this babbling answers your question. I'm sure people will correct me if I'm wrong. :)