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!?
shader
-
- Posts: 616
- Joined: Wed Nov 01, 2006 6:26 pm
- Location: Cairo,Egypt
- Contact:
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.
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.