System and method for depth clamping in a hardware graphics...

Computer graphics processing and selective visual display system – Computer graphics processing – Three-dimension

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

Reexamination Certificate

active

06774895

ABSTRACT:

FIELD OF THE INVENTION
The present invention relates to computer graphics, and more particularly to rasterization of 3D primitives within a graphics pipeline.
BACKGROUND OF THE INVENTION
Traditional graphics rendering hardware clips geometric primitives (polygons, lines, points, etc.) to a view volume prior to rasterization based on the vertices that make up each primitive. Typically, the view volume is defined by six clipping planes (top, bottom, left, right, front, and back) and the clipping process uses homogeneous clip coordinates. After clipping and a perspective divide, vertex coordinates are referred to as “normalized device coordinates”. Further viewport and depth range transformations (i.e. a scale and bias) convert normalized device coordinates to window coordinates. Subsequent primitive assembly, rasterization, and interpolation steps use these window coordinates.
Clipping based on the left, right, top, and bottom clip planes guarantees that the rasterized pixels for a clipped primitive are within the rectangular screen region defined by the viewport. Additionally, clipping based on the near and far clip planes guarantees that the depth values for rasterized pixels are within the representable range of the depth buffer (i.e. 16-bit or 24-bit integers).
Use of near and far plane clipping is well established. The OpenGL® and Direct3D® programming interfaces both assume near and far plane clipping. Ignoring the near and far clip planes has been discussed in the literature and hardware implementations of such rasterizers are available. For more information such topic, reference may be made to: Olano, Marc and Trey Greer, “Triangle Scan Conversion Using 2D Homogeneous Coordinates”, Proceedings of the 1997 SIGGRAPH/Eurographics Workshop on Graphics Hardware (Los Angeles, Calif., Aug. 2-4, 1997), ACM SIGGRAPH, New York, 1995; and James Blinn, Jim Blinn's Corner: A Trip Down the Graphics Pipeline, Morgan Kaufmann, 1996; which are each incorporated herein by reference in their entirety.
Prior art
FIG. 1
illustrates a clipping operation
10
involving a near plane
12
and a far plane
14
. During such clipping operation
10
, the rasterization of primitives
16
that extend beyond such near plane
12
and far plane
14
are truncated at the planes. A primitive
11
entirely behind the far clip plane
14
or a primitive
13
entirely in front of the near clip plane
16
is eliminated entirely. As shown in
FIG. 1
, the foregoing truncation may involve defining additional triangles
18
at the near plane
12
and far plane
14
.
Mathematically, the primitives may, in fact, extend beyond the near and/or far clip planes (
12
and
16
), but truncation of the primitive occurs for the sake of rasterization hardware which traditionally uses fixed-point math for depth values for reasons of hardware efficiency and performance. Such operations are limited in their numeric range.
In several cases, near and far plane clipping is undesirable. Polygons such as an unbounded ground plane going off into the horizon are clipped to the far clip plane rather than extending to the horizon line. There is thus a need for a system and method capable of permitting such polygons to be rasterized correctly even if otherwise incorrect depth values result.
Another situation where near and far plane clipping is undesirable is stenciled shadow volumes for rendering shadowed scenes. Shadow volume algorithms rely on drawing closed polygonal boundaries to separate shadowed regions from lit regions. Unfortunately, when shadow volumes are clipped by the far and/or near clip planes, these polygonal boundaries are no longer closed due to clipping. This leads to incorrect shadow determination. There is thus a further need for a system and method capable of permitting shadow volumes to be rendered without shadow determination artifacts caused by far and/or near plane clipping.
DISCLOSURE OF THE INVENTION
A system, method and computer program product are provided for depth clamping in a hardware graphics pipeline. Initially, a depth value is identified. It is then determined as to whether a hardware graphics pipeline is operating in a depth clamping mode. If the hardware graphics pipeline is operating in the depth clamping mode, the depth value is clamped within a predetermined range utilizing the hardware graphics pipeline.
In one embodiment, the depth value may be associated with a primitive, a clipped portion of a primitive, a pixel, and/or a fragment. Further, the clamping may be carried out in a raster operation (ROP) module of the hardware graphics pipeline.
In another embodiment, the predetermined range may be defined by a near plane and a far plane. Further, the predetermined range may be programmable. As an option, the depth value may be clamped for shadow volume rendering.
In still another embodiment, it may be determined whether the hardware graphics pipeline is operating in the depth clamping mode utilizing a control bit. As an option, the control bit may indicate that the hardware graphics pipeline is not operating in the depth clamping mode by default. In such embodiment, a data structure for depth clamping may be stored in memory in a hardware graphics pipeline. Such data structure may include a control object for indicating whether a hardware graphics pipeline is operating in a depth clamping mode. In use, a depth value may be clamped within a predetermined range utilizing the hardware graphics pipeline, if the control object indicates that the hardware graphics pipeline is operating in the depth clamping mode.
As an option, a second clamping of the depth value may be performed within a second predetermined range utilizing the hardware graphics pipeline. Such second predetermined range may be defined between zero (0) and a maximum value associated with the hardware graphics pipeline.
In still yet another embodiment, the depth value may be converted from a first representation to a second representation. Optionally, the first representation may be a fixed-point representation and the second representation may be a floating-point representation. In the alternative, the first representation may be a floating-point representation and the second representation may be a fixed-point representation.
If the hardware graphics pipeline is not operating in the depth clamping mode, a clipping operation may be performed. Such clipping operation may be carried out in a raster operation (ROP) module of the hardware graphics pipeline.
Optionally, the depth clamping mode may be defined by a graphics application program interface. Moreover, the depth clamping mode may be defined by an extension to a graphics application program interface.
Another system, method and computer program product are provided for depth clamping involving a fragment in a hardware graphics pipeline. Initially, a depth value of a fragment is received. Subsequently, the depth value of the fragment is clamped within a predetermined range utilizing a hardware graphics pipeline.
Still another system, method and computer program product are provided for depth clamping in a hardware graphics pipeline. Initially, a primitive is received. Next, it is determined whether a hardware graphics pipeline is operating in a predetermined mode. If the hardware graphics pipeline is operating in the predetermined mode, a portion of the primitive is projected to at least one of a near plane and a far plane utilizing the hardware graphics pipeline.
Still yet another system, method and computer program product are provided for depth clamping in a hardware graphics pipeline. Initially, a depth value is identified for a graphics primitive. It is then determined as to whether a hardware graphics pipeline is operating in a depth clamping mode. If the hardware graphics pipeline is operating in the depth clamping mode, the graphics primitive is split into a plurality of portions. At least one of the portions has all depth values clamped to a predetermined value utilizing the hardware graphics pipeline.
The present technique thus provides a hardware mechanism, possi

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

System and method for depth clamping in a hardware graphics... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with System and method for depth clamping in a hardware graphics..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and System and method for depth clamping in a hardware graphics... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3298060

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.