Graphics Reference
In-Depth Information
The final colour of the pixel is determined by combining all other
effect state settings (e.g., blending and stencil operations) in the ren-
dering pipeline.
The output of this stage is the final colour of every pixel placed in the
memory of the display hardware (the frame buffer).
In the course of rendering a 3D scene, many inputs and settings such as the geom-
etries of 3D objects and their material “look” parameters are sent to the graphics
hardware for processing. About a decade ago, outdated graphics hardware relied
solely on a few hard-wired algorithms to process such data via a method known as
the fixed function rendering pipeline. As a result, real-time rendering application
developers had little space to control the look of a 3D object based on a limited set of
functions that computed the rendering output. The impact of such limitations is the
lower quality of imagery generated from computer graphics hardware.
This problem was circumvented by the advances represented by a new generation
of computer graphics hardware that allows rendering routines known as shaders
to be injected into the hardware before or during the runtime of an application.
This capability now gives application developers full control over the quality of the
generated output by varying shader routines. Figure 2.3 depicts this new-generation
fully programmable rendering pipeline.
Shaders come in two formats: vertex and pixel types. A vertex shader is a graph-
ics processing function used to add special effects to objects in a 3D environment.
It is executed once for each vertex sent to the graphics processor. The purpose is to
transform each vertex's 3D position in virtual space to the 2D coordinate at which
it appears on the screen and the as a depth value in the graphics hardware. A pixel
shader is a computation kernel function that computes colour and other attributes of
each pixel. Pixel shader functions range from always outputting the same colour to
applying a lighting value to adding visual effects such as bump mapping, shadows,
specular highlights, and translucency properties. They can alter pixel depth or output
more than one colour if multiple render targets are active. Figure 2.4 illustrates an
example of the effects of pixel shaders on a 3D object. Apart from vertex and pixel
shaders, an important feature of state-of-the-art graphics rendering architectures is
the functionality of geometry shaders. Geometry shaders are added to the rendering
pipeline to enable generation of graphics primitives, such as points, lines and dif-
ferent types of triangles after the execution of vertex shaders. With this capability,
it is then possible to perform operations such as mesh resolution manipulation and
procedural geometry generation.
Computer hardware technology and new rendering algorithms continue to
advance quickly. The evolution of the real-time rendering pipeline also continues as
this topic is written.
2.1.2 V olumetRic R endeRing
In Section 2.1.1, we described how animation can be produced using 3D data and
physics-based principles for surface shading effects. Another technique for pro-
ducing 3D visualization is through the usage of volume data that consists of not
Search WWH ::




Custom Search