Buy Cheap Software - Discount Software Shaders FAQ - Le Minh Duc
Shaders FAQ
Game's Shader is a new challenge for me. Learning it along the way, I will post my notes here.


What is a shader?

Tuesday, 30 October 2007
At a very beginning level, there are 3 categories:
  1. Material.
  2. Fixed Function.
  3. Shader.
Material: an advanced way of controlling how lights interact with a surface.
We have the basic understanding of using normal 3DGS settings of like UNLIT, Albedo, and Ambient. A material gives you more advanced control on how light interacts with your textures or entities by allowing you to adjust the amount of Red, Green and Blue light colors: reflected (Albedo), flattened (Diffuse), self illuminated (Ambient ) or 'whites out' (Specular / flare).
For example, to make something look more metallic, you may want to have some reflections of brighter colors, diffusion of darker colors (makes the dark areas look flat) and some specular of whiteish level colors

Fixed function: there are certain effects can be done by fixed function.

Shader: a process we apply to a specific object, area, chunk, piece of the 3D world represented in a game level before the Rendering process (engine draws/updates the video display each frame).
That object’s data get transposed or converted to a 2 dimensional mapping. Then through one or multiple processes, we manipulate that data: change colors, move position, alter how light affects it (even more specific than a Material), overlay a texture...
That manipulated data is then transferred back into the 3D world environment, where the engine then draws the 3D world data onto the video screen.

Shaders get broken down into 2 basic parts: Vertex shader and Pixel shader.
  • Vertex shader: As we know objects are defined in a 3D world by a set of points – vertexes - that are set in reference to a single point in space (the origin point). An objects surface is defined by 3 connected vertex points. A vertex shader allows us to manipulate the data (texture surface) between those 3 points in space by referencing to those 3 vertexes.
  • Pixel shader: via the 3 vertex points that define a surface, we can actually refer to an individual pixels x/y/z located between those 3 vertexes points which allow you to then manipulate the pixels themselves.

 

0% of 0 voters found this FAQ useful,  I found this FAQ  useful useful  not useful not useful



Powered by EasyFAQ © 2006 Joomla-addons.org