Everyone who has used DBP or anything more advanced will probably be aware of the two shader types, vertex shader and fragment shader (or "pixel" shader, as some Microsoft like to call it).
RenderMonkey is a great tool for developing vertex and fragment shaders, but it's almost three generations behind the newest technology now, and there doesn't seem to be a replacement tool for it. AMD gave up on it in 2008.
The graphics pipeline has changed a lot over the years, there are now many more shader stages. Here is a list of them (they are executed in this order):
*Vertex shader - Takes a single vertex and is able to adjust it, transform it into the proper space, as well as manipulate vertex properties (normal, binormal, tangent, UV coordinates, etc.), then output them as control points.
*Geometry shader - Can generate additional geometry from the output of a vertex shader (subdivision, and tessellation). A geometry shader can consist of the following three sub-shaders:
Hull shader - The first of three stages for creating tessellation. Transforms a set of input control points (from a vertex shader) into a set of output control points. The number of input and output points can vary in contents and number depending on the transform. A hull shader also outputs patch constant information, such as tessellation factors, for a domain shader and the tessellator.
Tessellator - The tessellator stage is the second of three stages that work together to tessellate or tile a surface. The first stage is the hull-shader stage; it operates once per patch and configures how the next stage (the fixed function tessellator) behaves. A hull shader also generates user-defined outputs such as output-control points and patch constants that are sent past the tessellator directly to the third stage, the domain-shader stage. A domain shader is invoked once per tessellator-stage point and evaluates surface positions.
The tessellator stage is a fixed function stage, there is no shader to generate, and no state to set. It receives all of its setup state from the hull-shader stage; once the hull-shader stage has been initialized, the tessellator stage is automatically initialized.
Domain shader - A domain shader is the third of three stages that work together to implement tessellation. The domain shader generates the surface geometry from the transformed control points from a hull shader and the UV coordinates. A domain shader is invoked once for each point generated by the fixed function tessellator. The inputs are the UV[W] coordinates of the point on the patch, as well as all of the output data from the hull shader including control points and patch constants. The output is a vertex defined in whatever way is desired.
*Rasterization - The rasterization stage converts vector information (composed of shapes or primitives) into a raster image (composed of pixels). During rasterization, each primitive is converted into pixels, while interpolating per-vertex values across each primitive.
*Fragment shader - The final stage of the graphics pipeline. The fragment shader operates per pixel, and is used to calculate the final colour of each pixel on the screen.
Further, there is now something called the
GPGPU ("General Purpose Graphics Processing Unit"), which allows the computation of arbitrary information on the graphics card in parallel. DirectX refers to this as the
compute shader. This will be game changing (literally), considering how much more powerful the GPU can be when used correctly.
-------------------------------------------------------------------
The point of this post was to inform everyone about this, and possibly start a discussion centered around the future of shaders and parallel processing in general.
I, for one, feel that the artistic value of the GPU is decreasing. It's being utilized for things it was never designed for (general processing), and this is beginning to dominate everything (java is now even moving to the GPU. God help us, now they can garbage collect
in parallel).
The CPU is crying tears of boredom now, because all it can do is pass information between RAM and the GPU, and perform I/O operations. The CPU has become the GPUs bitch. There is no need for more powerful CPUs.
What I also see is that there are
no tools or any helpful tutorials for this new technology. Currently, you have to interface with OpenGL 3.0+ or DirectX11 directly in order to do all of this cool stuff, and use notepad to write your shaders.
Ogre3D is planning on implementing the above in Ogre3D 2.0, which is scheduled to be released in about a year from now.
http://www.ogre3d.org/forums/viewtopic.php?f=13&t=77133
Those are my thoughts on that. Discuss.
TheComet

Yesterday is History, Tomorrow is a Mystery, but Today is a Gift. That is why it is called "present".