English
Language : 

SH7764 Datasheet, PDF (1128/1752 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer SuperHTM RISC Engine Family SH-4A Series
Section 23 G2D
(3) Z Clipping
Pre-clipping is performed when all vertices of the drawn figure (see the note below) are smaller
than the value in the Z clipping area MIN register (ZCLPMINR) or greater than the value in the Z
clipping area MAX register (ZCLPMAXR). Since the W value is used for comparison in Z
clipping, set values corresponding to W in ZCLPMINR and ZCLPMAXR (Zmin/d and Zmax/d in
the above example). If pre-clipping is not performed and the Z coordinate value is not greater than
the value set in the Z saturation value MIN register (ZSATVMINR), saturation processing is
performed to become the value set in ZSATVMINR. A value corresponding to W should also be
set in ZSATVMINR. The figure will be deformed by saturation processing. Therefore, either set
the matrix parameters to prevent the Z coordinate value from becoming equal to or lower than the
ZSATVMINR value or divide the drawn figure beforehand and turn it into a display list so that it
does not appear at screen coordinates. ZCLPMINR, ZCLPMAXR, and ZSATVMINR must be set
in the single-precision floating-point format defined by the IEEE 754 standard. However, since
internal computation is carried out with 32-bit fixed-point operations (16-bit integer portion and
16-bit fractional portion), the registers should be set within the range of 2−16 ≤ ZSATVMINR ≤
ZCLPMINR ≤ ZCLPMAXR < 215. If one of the registers is set outside this range, saturation
processing is performed.
Z pre-clipping is not performed in a LINE, RLINE, LINEW, or RLINEW command to maintain
the continuity of the pattern. As a result, a figure which does not appear on the screen coordinates
may be drawn, thus degrading the performance. To prevent degraded performance, set the line
pre-clipping enable bit (LPCE) in the rendering control register (RCLR) to 1. When the LPCE bit
is set to 1, pre-clipping is performed in line-segment units in the 2-dimensional clipping areas
(system clipping, user clipping, and relative user clipping areas) and the performance improved.
However, if a line segment in the middle is pre-clipped, the pattern continuity is broken (the
pattern starts from the final point of the line segment previously drawn).
Note: When enabling edge drawing (EDG = 1) in the FTRAPC or RFTRAPC command, Z pre-
clipping is not performed for the edge line.
Rev. 1.00 Nov. 22, 2007 Page 1072 of 1692
REJ09B0360-0100