shader

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
Post Reply
omar shaaban
Posts: 616
Joined: Wed Nov 01, 2006 6:26 pm
Location: Cairo,Egypt
Contact:

shader

Post by omar shaaban »

sorry guys i know i am asking many qustions but i just undwerstand from u better!!
what is shader?
and how do i make a shader?
and how to use it!? :P
roxaz
Posts: 575
Joined: Tue Jan 23, 2007 8:35 pm
Location: LT

Post by roxaz »

shader is a thing that manipulate pixerls/colors (vertex shader) or vertices (vertex shader) to do transformations. to make shader you have to write it with special shader language (HLSL in example) and if you want to use it - use search :)
Luben
Posts: 568
Joined: Sun Oct 09, 2005 10:12 am
Location: #irrlicht @freenode

Post by Luben »

A shader is a program that modifies how the pixels/verticles are processed on the gpu. For example, say that you have a texture, on which there are 2 colors, say green and blue.

Now for some reason, you might want to filter the blue colors, so that only green and red are displayed(Altough there is no red in that texture.).

Then you could write a pixel shader, which takes the pixel you normally would display, sets the blue color part to 0, and returns the new color.

A vertex shader is pretty much the same, but works with the verticles instead, so you could reposition them or something like that.
If you don't have anything nice to say, don't say anything at all.
Post Reply