JP2006195939A - Shadow silhouette anti-alias circuit - Google Patents

Shadow silhouette anti-alias circuit Download PDF

Info

Publication number
JP2006195939A
JP2006195939A JP2005033612A JP2005033612A JP2006195939A JP 2006195939 A JP2006195939 A JP 2006195939A JP 2005033612 A JP2005033612 A JP 2005033612A JP 2005033612 A JP2005033612 A JP 2005033612A JP 2006195939 A JP2006195939 A JP 2006195939A
Authority
JP
Japan
Prior art keywords
shadow
silhouette
buffer
depth
line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2005033612A
Other languages
Japanese (ja)
Inventor
Tsuneo Ikedo
恒雄 池戸
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
KAADEIKKU CORP KK
Original Assignee
KAADEIKKU CORP KK
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by KAADEIKKU CORP KK filed Critical KAADEIKKU CORP KK
Priority to JP2005033612A priority Critical patent/JP2006195939A/en
Publication of JP2006195939A publication Critical patent/JP2006195939A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To reduce an alias which is generated on the silhouette line of a shadow concerning technique for smoothly drawing the silhouette line of the shadow in drawing the shadow with the use of shadow depth buffers in computer graphics. <P>SOLUTION: When a shadow polygon is drawn in a light source coordinate system in the first pass of a shadow silhouette anti-alias circuit, a pixel is defined as a rectangular grid area in addition to the x, y, z coordinate values of an outline in an outline interpolating circuit, so as to obtain information on the inclination, decimal point part, major/minor axis, right/left line, and start/end point, etc., of the polygonal outline. Edge information and the depth value of the polygon corresponding to the information are stored in a plurality of shadow depth buffers. In a second pass, a polygonal interpolation point to be drawn in a view point coordinate system is converted into the light source coordinate system. Then an area is determined through the use of the silhouette line buffer 22, and a means for determining whether the interpolation point belongs to the outside or inside of the shadow polygon using the shadow depth buffers. Comparison is performed with the depth value of the shadow depth buffer held in the area. The juggy of the silhouette line is reduced by a means which defines the interpolation point as the shadow when existing at a position apart from the light source and as a radiation point when existing at a position close to the light source. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

この発明は コンピュータグラフィックスにおいてシャドウ・デプスバッファを用いた影の描画に関し、影のシルエットラインを滑らかに描画する技術に関する。  The present invention relates to shadow drawing using a shadow depth buffer in computer graphics, and to a technique for smoothly drawing shadow silhouette lines.

コンピュータグラフィックスによる影の描画法に関し、第1パスとして光源座標系でオブジェクトを描画し、シャドウ・デプスバッファに光源からの距離を記憶した後、第2パスとして視点座標系で再度、オブジェクトを描画すると共に、それぞれの描画点を光源系の座標値に変換して、描画点のデプス値の比較から影か否かを判定する2パスデプスバッファ方式がある。シャドウ・デプスバッファを用いて影の有無を判定する前記方式では、バッファの解像度の不足から、シャドウ・デプスバッファに記憶されたシャドウポリゴン(シャドウバッファに記憶された影のオブジェクト)が拡大されて投影される場合、影のシルエットライン(外郭線)上に映像品質を著しく低下するジャギー(階段状様態)が発生する。光源が点光源に近い場合には影の投下位置が遮光物体から離れれば離れるほど拡大されるため、このジャギーによる画質低下は実用上許容できないとされている。この問題に対応する方法として、スーパーサンプリング法のように数倍の大きさ(解像度)を持ったシャドウ・デプスバッファを実装するが考えられる。しかしシャドウ・デプスバッファは2次元配列構造であるためシャドウポリゴンのサイズ1に対して、影が2倍の大きさで投影された場合、一様な滑らかさで描画するには通常4倍のメモリ容量が必要となる。すなわち拡大率n倍に対してn×n倍の容量を要する。このアプローチはハードウエアコスト面で商用化には適さない。一方、シャドウマッピング方式と呼ばれる方法があるが、シャドウマップを予め作成しなければならない点で複雑にオブジェクトが乱立する場合には実時間描画が困難となる。一方、影をテキスチャーマッピングに見られる線形フィルタ等を加えてぼかし、ジャギー効果を軽減する方法もある。影のボケ様態は遮光物体に近い位置から遠い位置に向かって連続的に変化することと、フィルタリングは局所的な(高周波成分)ぼかしには効果はあるものの、大きなジャギーパターンには効果は得られない。本発明はスーパーサンプリング法に見られるようなイメージバッファに対応したシャドウバッファの解像度を上げるのではなく、シルエットライン情報を用いて影のシルエットラインを滑らかに表示する手段に関わるものである。  Concerning the method of drawing shadows by computer graphics, the object is drawn in the light source coordinate system as the first pass, the distance from the light source is stored in the shadow depth buffer, and then the object is drawn again in the viewpoint coordinate system as the second pass. In addition, there is a two-pass depth buffer method in which each drawing point is converted into a coordinate value of the light source system and it is determined whether or not it is a shadow from a comparison of the drawing point depth values. In the above-described method for determining the presence / absence of a shadow using a shadow depth buffer, the shadow polygon (shadow object stored in the shadow buffer) stored in the shadow depth buffer is enlarged and projected because of insufficient buffer resolution. In this case, jaggies (stair-like appearance) are generated on the silhouette lines (outer lines) of the shadows, which significantly reduce the image quality. When the light source is close to a point light source, the shadow drop position increases as the distance from the light-shielding object increases. Therefore, it is considered that this deterioration in image quality due to jaggies is unacceptable in practice. As a method for dealing with this problem, it is conceivable to implement a shadow depth buffer having a size (resolution) several times as large as the supersampling method. However, since the shadow depth buffer has a two-dimensional array structure, when the shadow is projected twice as large as the size 1 of the shadow polygon, it is usually 4 times more memory to draw with uniform smoothness. Capacity is required. That is, a capacity of nxn times the expansion ratio n times is required. This approach is not suitable for commercialization in terms of hardware costs. On the other hand, although there is a method called a shadow mapping method, real-time drawing becomes difficult when an object is complicated and complicated because a shadow map must be created in advance. On the other hand, there is also a method of reducing the jaggy effect by adding a linear filter or the like that can be seen in texture mapping to blur the shadow. The blurring of the shadow changes continuously from a position close to the light-shielding object to a position far from it, and filtering is effective for local (high-frequency component) blurring, but it is effective for large jaggy patterns. Absent. The present invention does not increase the resolution of the shadow buffer corresponding to the image buffer as found in the supersampling method, but relates to means for smoothly displaying silhouette lines of shadows using silhouette line information.

シルエットラインのスムージングは、シャドウポリゴンの内挿補間点での解像度を高めるスーパーサンプリング方法が知られているが、前記  For the smoothing of silhouette lines, a supersampling method for increasing the resolution at the interpolation point of the shadow polygon is known.

節で指摘した問題点をもつ。本発明はスーパーサンプリングに比べて、僅かなハードウエアコストで滑らかな影のシルエットラインを実時間で描画する手段を課題とする。以下本発明のシルエットラインのアンチエリアスを得るための手段を説明する。It has the problems pointed out in the section. An object of the present invention is to provide a means for drawing a silhouette line of a smooth shadow in real time at a small hardware cost compared to supersampling. The means for obtaining the silhouette line anti-aliasing of the present invention will be described below.

光源系での第1パスの描画で、オブジェクト面を構成する多角形(ポリゴン)をレンダリングする際、本発明ではまずポリゴン頂点間を結ぶ外郭線(アウトライン)に沿って頂点情報を線形に補間し、その後、スパンプロセッサにおいて、外郭線の左右両端点間を水平方向に線形補間を行い、ポリゴン全体を描画する。ポリゴンのアウトラインを補間する際、直線発生器(補間回路)では以下の(1)から(6)までの情報が補間処理の過程で生成されるか、生成可能である。(1)シルエットライン(エッジ)フラグ(2)傾き、(3)メジャーマイナー軸、(4)ライト/レフト・ライン、(5)小数点以下の値、および(6)始点あるいは終点のそれぞれである。アウトラインの描画は頂点間を結ぶ2点間でそれぞれ行われるが、ここで2点のそれぞれを(x、y、z)と(x、y、z)としたとき(1)式の関係となる。

Figure 2006195939
(1)式において前記傾きは(dx/dy)、メジャーマイナーはdx−dyの符号が示し、ライト/レフト・ラインは、本発明においてはアウトラインをY軸最小点から左右に分岐して補間するため、描画時の外郭線がその左右いずれかを示すフラグで示すことができる。また小数点以下の値とは傾きを除算した小数点以下の値(以下フラクションと言う)となる。例えばX軸メジャーとはdx−dyが正となり、外郭線の傾きが45°以下の場合を言う。前記はX軸メジャー(dx≧dy)の場合であるが、dy>dxの場合では(1)式においてXとYが入れ替わる。(1)式でフラクションは補間点毎に変化する。1つの補間点は1つの画素に対応するが、1つの画素を1辺の大きさを1とする4角形空間(グリッド)と見なせば、傾きとフラクションはそのグリッドを交差する直線の傾きとグリッドの1辺との交差点を示す。これにメジャー・マイナーフラグとライト/レフト・ラインを考慮すれば、グリッドに交差する直線の内側と外側の面積が計算できる。グリッドに始点終点が含まれる場合は、シルエット・ラインバッファには2組のエッジ情報が記憶される。これらからグリッド内の外郭線の交点を求め、内挿補間点の領域の判定を行う。本発明では前記(1)〜(6)のそれぞれを、シルエット・ラインバッファを設けてこれに記憶する。一方、画素点には1つの直線だけでなく複数の直線あるいは接続点が含まれることがある。本発明では少なくとも2つの直線の前記(1)〜(6)を記憶する。フラクションおよび傾きの精度はグリッドの分割度を意味するが、それぞれ3ビット(8×8分割)程度で十分な効果を得る。この結果、シルエット・ラインバッファの容量はスーパーサンプリング法と異なり大きくならない。
シャドウポリゴンをシャドウ・デプスバッファに描画する際、光源にもっとも近いポリゴンのデプス値を記憶する。この際、前記アウトライン補間で得られるシルエットライン情報を含むポリゴンのデプス値が、後書きの他のポリゴンのデプス値と比較して光源よりも離れている場合、シルエットライン情報もデプス値同様に書き換えを行う。この結果、第1パスの終了時点ではシルエット・ラインバッファには光源に最も近いシャドウポリゴンの前記(1)〜(6)のライン情報のみが記憶される。
一方、オブジェクトのポリゴンはシルエットラインだけでなくポリゴン内部で隣接する接続面(ポリゴン境界)をもつ。このポリゴン境界はシルエットエッジではないため、シルエット・ラインバッファにはエッジフラグは立てない。ポリゴン境界であるためエッジフラグをリセットするには、前記(1)〜(6)の情報をシルエット・ラインバッファに書き込む際、すでに記憶されたエッジ情報と比較し、ライト/レフト・ラインが異なり、その他の情報が一致することで可能となる。When rendering a polygon (polygon) that forms an object plane in the first pass drawing in the light source system, the present invention first linearly interpolates vertex information along an outline (outline) connecting the polygon vertices. Thereafter, in the span processor, linear interpolation is performed between the left and right end points of the outline line in the horizontal direction to draw the entire polygon. When the polygon outline is interpolated, the following information (1) to (6) is generated or can be generated by the straight line generator (interpolation circuit) during the interpolation process. (1) silhouette line (edge) flag (2) slope, (3) major minor axis, (4) right / left line, (5) value after decimal point, and (6) start point or end point. The outline is drawn between two points connecting the vertices. Here, when each of the two points is (x 0 , y 0 , z 0 ) and (x 1 , y 1 , z 1 ) (1 ).
Figure 2006195939
In the equation (1), the slope is (dx / dy), the major minor is indicated by the sign dx-dy, and the right / left line is interpolated by branching the outline left and right from the Y-axis minimum point in the present invention. Therefore, the outline at the time of drawing can be indicated by a flag indicating either the left or right. The value after the decimal point is the value after the decimal point (hereinafter referred to as a fraction) obtained by dividing the slope. For example, the X-axis measure refers to a case where dx-dy is positive and the outline slope is 45 ° or less. The above is the case of X-axis major (dx ≧ dy), but in the case of dy> dx, X and Y are interchanged in equation (1). In equation (1), the fraction changes for each interpolation point. One interpolation point corresponds to one pixel, but if one pixel is regarded as a quadrangular space (grid) with the size of one side being 1, the slope and the fraction are the slope of a straight line intersecting the grid. Indicates an intersection with one side of the grid. If the major / minor flag and right / left line are taken into consideration, the area inside and outside the straight line intersecting the grid can be calculated. When the start point and the end point are included in the grid, two sets of edge information are stored in the silhouette line buffer. From these, the intersection of the contour lines in the grid is obtained, and the area of the interpolation point is determined. In the present invention, each of the above (1) to (6) is stored in a silhouette line buffer. On the other hand, a pixel point may include not only one straight line but also a plurality of straight lines or connection points. In the present invention, at least two straight lines (1) to (6) are stored. The accuracy of the fraction and the inclination means the degree of division of the grid, but a sufficient effect is obtained with about 3 bits (8 × 8 divisions). As a result, the capacity of the silhouette line buffer does not increase unlike the supersampling method.
When drawing a shadow polygon in the shadow depth buffer, the depth value of the polygon closest to the light source is stored. At this time, if the depth value of the polygon including the silhouette line information obtained by the outline interpolation is farther from the light source compared to the depth value of other polygons in the afterword, the silhouette line information is also rewritten in the same way as the depth value. Do. As a result, at the end of the first pass, only the line information (1) to (6) of the shadow polygon closest to the light source is stored in the silhouette line buffer.
On the other hand, a polygon of an object has not only a silhouette line but also an adjacent connection surface (polygon boundary) inside the polygon. Since this polygon boundary is not a silhouette edge, no edge flag is set in the silhouette line buffer. In order to reset the edge flag because it is a polygon boundary, when writing the information (1) to (6) to the silhouette line buffer, the right / left line is different from the already stored edge information, This is possible because other information matches.

光源座標系でレンダリングした第1パスが終了すると、視点座標系で第2パスを開始する。第2パスではポリゴン頂点に定義した頂点座標値を補間してポリゴン内部の座標値を得るが、補間座標値は画素毎に第1パスの光源座標系に変換する。本発明では視点座標系から光源座標系に変換された座標値をxlおよびylとすると、これら座標値を用いてシャドウポリゴンに記憶されたデプス値zdと、シルエットライン情報を読み出す。デプス値zdと前記光源座標系に変換した内挿補間点のzl値とを比較して、前記zl値が光源に遠い場合は影として、近い場合は照射点とする。このときzdとzlとをそのまま比較したのではシャドウ・デプスバッファがもつ解像度以上のデプス判定はできない。ここで本発明では、内挿補間点を光源座標系に変換する際、xlおよびyl座標値の整数部だけでなく、小数点以下(フラクション)の値も出力する。フラクションは画素グリッド内部の内挿補間点を示し、この結果、フラクションを含む内挿補間点がグリッド領域内で、シャドウポリゴン外郭線がグリッドエッジとの交差によって作られる領域の内外のいずれに属するかを前記(1)〜(6)のシルエット・ラインバッファの情報を用いて判定することができる。内部であればその画素のデプス値と、また外部であれば外部(周辺画素)のデプス値とを比較して、影の有無を判定する。ポリゴンの接続点のように、二つのラインがグリッド内で交差する場合はグリッドの辺と二つの直線で囲まれた領域を計算して判定する。  When the first pass rendered in the light source coordinate system ends, the second pass starts in the viewpoint coordinate system. In the second pass, the vertex coordinate value defined for the polygon vertex is interpolated to obtain the coordinate value inside the polygon. The interpolated coordinate value is converted into the light source coordinate system of the first pass for each pixel. In the present invention, assuming that the coordinate values converted from the viewpoint coordinate system to the light source coordinate system are xl and yl, the depth value zd stored in the shadow polygon and the silhouette line information are read using these coordinate values. The depth value zd is compared with the zl value of the interpolation point converted into the light source coordinate system, and when the zl value is far from the light source, it is a shadow, and when it is close, it is an irradiation point. At this time, if zd and zl are compared as they are, it is not possible to judge the depth exceeding the resolution of the shadow depth buffer. Here, in the present invention, when the interpolation point is converted into the light source coordinate system, not only the integer part of the xl and yl coordinate values but also the value after the decimal point (fraction) is output. The fraction indicates the interpolation point inside the pixel grid. As a result, the interpolation point including the fraction belongs to the grid area, and whether the shadow polygon outline belongs to the inside or outside of the area created by the intersection with the grid edge. Can be determined using the silhouette line buffer information of (1) to (6). If it is internal, the depth value of the pixel is compared with the external (peripheral pixel) depth value if it is external, and the presence or absence of a shadow is determined. When two lines intersect in the grid, such as a polygon connection point, a determination is made by calculating an area surrounded by the grid edges and two straight lines.

前記xlおよびyl座標値の整数部は画素アドレスを、またフラクション部は画素内の位置を示すが、画素がポリゴンエッジとなる場合は、シャドウバッファのデプス値zdと前記内挿点のzlを比較した。内挿補間点が画素グリッドで交差するシルエットラインの外側に位置する場合は、それを照射部と即断することはできない。シルエットライン外の領域もまた別の遮光物体の影である可能性がある。このためエッジ画素内に複数のデプス値を記憶し、それらとさらなる比較が必要となる。この手段としてデプスバッファを2組以上用意し、光源に最も近いシャドウポリゴンがら順次光源に近いシャドウデプス値をそれぞれ記憶し、シルエットラインの外側に内挿補間点が位置した場合は、同一グリッド内で対応するデプスバッファのデプス値と比較する。それぞれのデプスバッファは光源に近い方のデプス値は絶対値で、他方は差分値を記憶することでメモリ容量を削減することができる。2番目以降のバッファはデプス値の差分値で記憶するとして、メモリコストが許容されるシステムであれば、複数のデプスバッファの実装が可能となる。実用的なデプスバッファ最小数は3組である。  The integer part of the xl and yl coordinate values indicates the pixel address, and the fraction part indicates the position in the pixel. When the pixel is a polygon edge, the shadow buffer depth value zd and the interpolation point zl are compared. did. When the interpolation point is located outside the silhouette line that intersects with the pixel grid, it cannot be immediately cut off from the irradiation part. An area outside the silhouette line may also be a shadow of another shading object. For this reason, a plurality of depth values are stored in the edge pixel and further comparison with them is required. Two or more sets of depth buffers are prepared as this means, and shadow polygon values closest to the light source are sequentially stored from the shadow polygon closest to the light source, and when the interpolation point is located outside the silhouette line, Compare with the depth value of the corresponding depth buffer. In each of the depth buffers, the depth value closer to the light source is an absolute value, and the other is capable of reducing the memory capacity by storing a difference value. Assuming that the second and subsequent buffers are stored as differential values of depth values, a plurality of depth buffers can be implemented in a system that allows memory cost. The practical minimum number of depth buffers is three sets.

オブジェクトが異なるポリゴンがそれぞれ同一のグリッド内で交差する場合、複数のデプスバッファがいずれのポリゴンの領域に属するかを判別できなければならない。本発明ではこのためにはエッジ情報に識別子を付加し、そのエッジ情報(内側)に対するデプスバッファを対応させる。これは1ビットをエッジ情報に付加すればよい。2つ以上のデプスバッファシステムであれば数ビットを用いて識別子とする。  When polygons with different objects intersect in the same grid, it must be possible to determine which polygon region the plurality of depth buffers belong to. In the present invention, for this purpose, an identifier is added to the edge information, and the depth buffer for the edge information (inside) is made to correspond. This is achieved by adding 1 bit to the edge information. If there are two or more depth buffer systems, a few bits are used as an identifier.

第2パスにおいて、光源座標系に変換した座標値がシルエットエッジと判定された場合、シルエット・ラインバッファから第1パスで記憶した複数のエッジ情報を読み出す。それぞれのエッジ情報から(2)式を用いて内挿補間点のエッジの内外判定を行う。(2)式はx軸が長軸で(a)はエッジが右(内部がエッジライン上部)、(b)は左(内部がエッジライシ下部)の場合を示し、シルエット・ラインバッファから読み出されたi番目のエッジ情報の傾きΔSとフラクションYfiに対して、内挿補間点(x、y)をテストする。yはサンプリングx座標値xを代入した直線式であり、求めたyがyに対して差分比較を行う。y軸が長軸となる場合はx、y座標を入れ替える。

Figure 2006195939
表1は(2)式によって得た複数の内外判定結果とデプス値との関係を示す。表1は2つのエッジ情報との(2)式テスト結果Edge1とEdge2を、またEdge1に対するデプス値Depth1、Edge2のデプス価Depth2および背景のデプス値Depth3を示す。
Figure 2006195939
表1で内挿補間点がいずれのシルエットの対しても外部となる場合は背景となるシャドウポリゴンのデプス値が比較判定結果の情報となり、この値と前記光源座標系の視点座標からの変換デプス値zlとを比較する。
本発明ではn組のエッジ情報をシルエット・ラインバッファに記憶する場合、n+1個のデプスバッファを実装する。実用的には表1の例に示す2つのエッジ情報と3つのデプスバッファとなる。傾きとフラクションをそれぞれ3ビットとすると画素グリッドは64に分割されたことを意味し、スーパーサンプリング法に比較してメモリ容量を1/32にすることが可能となる。In the second pass, when the coordinate value converted into the light source coordinate system is determined to be a silhouette edge, a plurality of pieces of edge information stored in the first pass are read from the silhouette / line buffer. The inside / outside determination of the edge of the interpolation point is performed from the respective edge information using equation (2). Equation (2) shows the case where the x-axis is the long axis, (a) is the right edge (the inside is the upper edge line), and (b) is the left (the inside is the lower edge of the edge slice), and is read from the silhouette line buffer. The interpolation point (x 0 , y 0 ) is tested with respect to the slope ΔS i of the i-th edge information and the fraction Y fi . y i is a linear expression into which the sampling x coordinate value x 0 is substituted, and the obtained y i performs a difference comparison with respect to y 0 . When the y axis becomes the long axis, the x and y coordinates are switched.
Figure 2006195939
Table 1 shows the relationship between a plurality of inside / outside determination results obtained by the expression (2) and the depth value. Table 1 shows the test results Edge1 and Edge2 of the expression (2) with the two edge information, the depth value Depth1 for Edge1, the depth value Depth2 of Edge2, and the depth value Depth3 of the background.
Figure 2006195939
In Table 1, when the interpolation point is outside of any silhouette, the depth value of the shadow polygon as the background becomes the information of the comparison determination result, and this value and the conversion depth from the viewpoint coordinates of the light source coordinate system. Compare the value zl.
In the present invention, when n sets of edge information are stored in the silhouette line buffer, n + 1 depth buffers are mounted. Practically, the two edge information and three depth buffers shown in the example of Table 1 are used. If the slope and the fraction are each 3 bits, it means that the pixel grid is divided into 64, and the memory capacity can be reduced to 1/32 compared to the supersampling method.

複数のデプスバッファを設ける場合、デプス値は通常32ビット相当の精度を与える。このビット精度で多数のデプスバッファを用意すれば、スーパーサンプリング法に対するハードウエアコスト上の利点が失われる。これを避けるには2番目以降のデプスバッファは1番目のデプス値からの距離として、相対値(差分値)を記憶する方法がある。もしこの差分値が規定のバッファサイズを超える場合にはオーバーフローフラグをその超えたバッファの1ビットを用いて立て、2つのデプスバッファ範囲を占有する。この場合にその画素に対応するデプスバッファは1つ失われることになるが実用的にはこの場合、その背後の影は視点から相当な遠方にあることを意味し、その遠方よりさらに遠方のレンダリング物体の影については現実感として問題とすることは少ない。よって最初の物体の影に隣接する複雑に交差する影を表現することには問題がない。  When a plurality of depth buffers are provided, the depth value usually gives an accuracy equivalent to 32 bits. If a large number of depth buffers are prepared with this bit precision, the hardware cost advantage over the supersampling method is lost. In order to avoid this, there is a method in which the second and subsequent depth buffers store a relative value (difference value) as a distance from the first depth value. If this difference value exceeds the prescribed buffer size, an overflow flag is set using one bit of the buffer exceeding the specified buffer size, and two depth buffer ranges are occupied. In this case, one depth buffer corresponding to the pixel is lost, but practically, in this case, the shadow behind the pixel is considerably far from the viewpoint, and the rendering farther away than the far is performed. The shadow of an object is rarely a problem as a reality. Therefore, there is no problem in expressing a complexly intersecting shadow adjacent to the shadow of the first object.

以上から本発明では、光源に近い順にシャドウポリゴンのデプス値を順次記憶するためのシャドウ・デプスバッファと、シャドウポリゴンの外郭線(シルエットライン)上のエッジ情報を記憶するシルエット・ラインバッファを設け、第1パスでは隠面消去処理によってシャドウポリゴンのデプス値を少なくとも3つ以上、また外郭線エッジ情報は2つ以上をシャドウ・デプスバッファとシルエット・ラインバッファのそれぞれに記憶する手段と、第2パスにおいてはシャドウ・デプスバッファの画素単位を4角形からなるグリッド空間として外郭線はこの空間を交差するものと見なし、外郭線のエッジ情報から内挿補間点の画素内におけるシャドウポリゴン内外の判定を行い、さらにシャドウ・デプスバッファに記憶されたそれぞれのデプス値を用いて、前記可視ポリゴンの内挿補間点が影か照射点かを決定する手段と、シルエットライン情報として、シルエット・ラインバッファには画素毎に、シルエットラインの(1)有無フラグ(2)傾き、(3)長短軸フラグ、(4)ライト/レフト・エッジフラグ、(5)交差座標小数点値、および(6)接続点フラグのそれぞれを記憶する手段と、シャドウ・デプスバッファのデプス値と、シルエット・ラインバッファのシルエットライン情報とは識別子により帰属判定が可能とする手段と、第1パスでシルエットライン情報をシルエット・ラインバッファに記憶する際、シルエットライン情報の内、ライト/レフト・エッジフラグを除いたすべての前記情報が、すでにシルエット・ラインバッファに記憶されている情報と一致した場合には、新たに記憶しようとする情報は、隣接するポリゴンの外郭線として、すでにシルエット・ラインバッファに記憶された有無フラグをリセットすると共に、新たなシルエットライン情報もシルエット・ラインバッファに記憶しない手段と、第1パスにおいて視点に最も近いデプス値から少なくとも3番目に近いデプス値までを記憶する3つのシャドウ・デプスバッファを設け、シルエットライン上の画素において、より視点に近いシルエットラインのデプス値が新たに交差した場合は、すでにシャドウ・デプスバッファに記憶されたデプス値を順次繰り下げて記憶する手段と、繰り下げによってシャドウ・デプスバッファから消去されるシルエットラインがある場合には、シルエット・ラインバッファから、そのシルエットラインに対応する情報を消去する手段と、新たなシルエットライン情報をシルエット・ラインバッファに記憶する手段と、シャドウ・デプスバッファの内、2番目以降のバッファに記憶するデプス値は、それぞれ前番号のバッファのデプス値からの相対値として、2番目以降のシャドウ・デプスバッファの容量を削減するそれぞれの手段をもつことを特徴とする。  As described above, in the present invention, the shadow depth buffer for sequentially storing the depth values of the shadow polygon in order from the light source and the silhouette line buffer for storing the edge information on the outline (silhouette line) of the shadow polygon are provided. In the first pass, means for storing at least three depth values of shadow polygons by hidden surface removal processing, and storing two or more contour line edge information in each of the shadow depth buffer and the silhouette line buffer, and the second pass In this example, the pixel unit of the shadow depth buffer is a rectangular grid space, and the contour line is assumed to intersect this space, and the inside and outside of the shadow polygon in the interpolation interpolation point pixel are determined from the edge information of the contour line. And each depth stored in the shadow depth buffer. Means for determining whether the interpolation interpolation point of the visible polygon is a shadow or an irradiation point using the value, and silhouette line information (1) presence flag (2) of the silhouette line for each pixel in the silhouette line buffer Means for storing each of (1) inclination, (3) long / short axis flag, (4) right / left edge flag, (5) cross coordinate decimal point value, and (6) connection point flag, and the depth value of the shadow depth buffer. The silhouette line information of the silhouette line buffer is a means that makes it possible to determine the belonging by an identifier, and when the silhouette line information is stored in the silhouette line buffer in the first pass, of the silhouette line information, the right / left All the information except for the edge flag matches the information already stored in the silhouette line buffer. In this case, the information to be newly stored resets the presence / absence flag already stored in the silhouette line buffer as the outline of the adjacent polygon, and does not store the new silhouette line information in the silhouette line buffer. Means and three shadow depth buffers for storing from the depth value closest to the viewpoint to at least the depth value closest to the viewpoint in the first pass, and for the pixels on the silhouette line, the depth value of the silhouette line closer to the viewpoint When there is a new intersection, the depth value already stored in the shadow depth buffer is stored in sequence, and if there is a silhouette line that is erased from the shadow depth buffer by the reduction, the silhouette line buffer To the silhouette line The means for erasing the corresponding information, the means for storing new silhouette line information in the silhouette line buffer, and the depth values stored in the second and subsequent buffers of the shadow depth buffer are the values of the previous numbered buffer. As a relative value from the depth value, each means for reducing the capacity of the second and subsequent shadow depth buffers is provided.

本発明によりコンピュータグラフィックスにおいて、物体間の幾何学的関係の認知に最も重要な機能である影を、スムーズなシルエットラインで描画することが可能となり、高品質な映像を描画できる。  According to the present invention, in computer graphics, a shadow, which is the most important function for recognizing a geometric relationship between objects, can be drawn with a smooth silhouette line, and a high-quality image can be drawn.

本発明の回路はグラフィックスLSIに実装するか、IP(Intelligent Property)としての形態で実施される。  The circuit of the present invention is mounted on a graphics LSI or implemented as an IP (Intelligent Property).

以下、本発明の実施例を説明する。図1には本発明の1つの画素グリッドとそのグリッドに交差するシルエットラインを示す。図1の10は1本のシルエットライン15が交差している場合を示し、傾きΔSと、y軸との交差点fyをもつ。グリッドの大きさを1とすれば、グリッド内に内挿補間点が存在したとき、シルエットラインには左右いずれが内外であるかの情報を持っており、内挿補間点がシルエットラインの内側および外側かは前記(2)式によって判定できる。グリッド11〜13はそれぞれ2つのシルエットライン(傾きがΔS0およびΔS1)が交差する場合であり、fx、fyはいずれもそれぞれxおよびy軸との交差点を示す(グリッド13では交差点fy0、fy1は2つともy軸に交差)。これらのいずれの状態であっても、内挿補間点がどの領域に属すかはそれぞれのラインに対して内外判定を行えば判定可能となる。一方、グリッド14は複数のシルエットラインが交差する場合を示す。このような場合は内挿補間点の領域判定は行わない。対象となる画素グリッドにはマルチラインフラグ(2本以上のシルエットラインが交差する)が立っており、この場合は周辺の画素の輝度の平均値を、内挿補間点の輝度とする。  Examples of the present invention will be described below. FIG. 1 shows one pixel grid of the present invention and a silhouette line intersecting the grid. 1 in FIG. 1 shows a case where one silhouette line 15 intersects, and has an inclination ΔS and an intersection fy between the y-axis. If the grid size is 1, when there is an interpolation point in the grid, the silhouette line has information about which is left or right, and the interpolation point is inside the silhouette line and Whether it is outside or not can be determined by the equation (2). Each of the grids 11 to 13 is a case where two silhouette lines (inclinations ΔS0 and ΔS1) intersect, and fx and fy indicate intersections with the x and y axes, respectively (in the grid 13, the intersections fy0 and fy1 are 2). Crosses the y axis). In any of these states, the region to which the interpolation point belongs can be determined by performing the inside / outside determination on each line. On the other hand, the grid 14 shows a case where a plurality of silhouette lines intersect. In such a case, the interpolation interpolation point area determination is not performed. A multi-line flag (two or more silhouette lines intersect) is set on the target pixel grid. In this case, the average value of the luminance values of the surrounding pixels is set as the luminance value of the interpolation point.

図2は本発明のシャドウ・シルエット・アンチエリアス回路の全体図を示す。アウトライン内挿補間回路20は、ポリゴン頂点に定義された情報を外郭線に沿って線形に補間して外郭線上の画素それぞれの情報(x、y、z座標値、テキスチャーマッピング座標値、面法線など)を求める。さらにスパン内挿補間回路21では、前記外郭線と水平軸とが交わる外郭線の両端点情報を補間してポリゴン内部におけるすべての頂点定義情報を得る。アウトライン内挿補間回路20では、外郭線上での前記の頂点定義情報に加えて、前記  FIG. 2 shows an overall view of the shadow silhouette anti-aliasing circuit of the present invention. The outline interpolation circuit 20 linearly interpolates the information defined in the polygon vertices along the outline, and information (x, y, z coordinate values, texture mapping coordinate values, surface normals) of each pixel on the outline. Etc.). Further, the span interpolation circuit 21 obtains all vertex definition information inside the polygon by interpolating the end point information of the outline line where the outline line and the horizontal axis intersect. In the outline interpolation circuit 20, in addition to the vertex definition information on the contour line,

項の(1)〜(6)のエッジ情報も出力する。エッジ情報はシルエット・ラインバッファ22に記憶される。1つの画素グリッドには2組までのエッジ情報が記憶できる。また外郭線上のデプス値(z座標値)は、3つのシャドウ・デプスバッファ25,26および27のそれぞれに記憶されたシャドウポリゴンのデプス値と比較回路23で比較する。比較回路23では以下の(A)から(F)までの判定処理を行う。
(A)外郭線のデプス値がもっとも光源に近い(シャドウ・デプスバッファに記憶されたすべてのデプス値よりも光源に近い位置にある)場合には、前記エッジ情報をシルエット・ラインバッファに記憶する。またシャドウ・デプスバッファ1(25)にそのデプス値を記憶すると共に、バッファ1(25)のデプス値はバッファ2(26)に、バッファ2(26)のデプス値はバッファ3(27)に移動する。この際、すでにエッジ情報がシルエット・ラインバッファ22に記憶されている場合には、第1番目のエッジ情報を更新し、記憶されていた1番目のエッジ情報を第2番目のエッジ情報として移動する。
(B)外郭線のデプス値がシャドウ・デプスバッファ1(25)のデプス値よりも遠方にあり、また2番目に光源に近いデプス値を記憶するデプスバッファ2(26)より光源に近い場合には、2番目のエッジ情報を更新し、且つシャドウ・デプスバッファ2(26)のデプス値を更新すると共にバッファ3(27)に移動する。
(C)外郭線のデプス値がシャドウ・デプスバッファ2(26)のデプス値よりも遠方にあり、また3番目に光源に近いデプス値を記憶するデプスバッファ3(27)より光源に近い場合には、3つのエッジが1つの画素グリッドに交差ものと見なしシルエット・ラインバッファにマルチラインビットを立てる。シャドウ・デプスバッファ3(27)のデプス値は更新する。
(D)シルエット・ラインバッファにはエッジ情報が記憶されておらず(フラグが立ってない)、且つシャドウ・デプスバッファの全てあるいはいずれかのデプス値より遠方に位置する場合には、ポリゴン内面の後方に外郭線は位置するものとして、前記エッジ情報はシルエット・ラインバッファには記憶しない。
(E)スパン内挿補間回路21ではポリゴン内部の頂点定義情報を求めるが、そのうちのデプス値も、前記外郭線デプス値同様にシャドウ・デプスバッファ25,26および27のデプス値と、マルチプレクサ24を通して、デプス比較回路23において大小関係を比較し、もしスパン内挿補間回路21からのデプス値がそれぞれのシャドウ・デプスバッファのデプス値よりも光源寄りに位置する場合で、且つエッジ上の値ではない場合、シルエット・ラインバッファに記憶されたエッジは内挿補間中の画素の後方に位置するものとして、すでに記憶されている全てのエッジフラグをリセットする。
(F)前記(E)において、スパン内挿補間回路21からのデプス値がシャドウ・デプスバッファ1(25)のデプス値よりも遠方、デプスバッファ2(26)より光源寄りで、且つエッジ上の値ではない場合、シルエット・ラインバッファに記憶された第1番目のエッジ情報はそのままにして第2番目のエッジフラグ(記憶されている場合)をリセットする。
一方、ポリゴン内部の画素はスパン内挿補間回路21から出力されるが、このデプス値が最も光源に近い場合はシャドウ・デプスバッファ1(25)のデプス値に置き換える。さらにバッファ1(25)のデプス値はバッファ2(26)に、バッファ2(26)のデプス値はバッファ3(27)に移動する。この結果、バッファ3(27)にそれまで記憶されていたデプス値は削除される。これはスパン内挿補間回路からのデプス値が2番に光源に近い場合は、バッファ25はそのままに、バッファ26に新しいデプス値が入れ替わり、バッファ26のデプス値はバッファ27に移動する。3番目に近い場合はバッファ3のみ置き換わる。
以上の(A)から(F)までの処理の結果、シルエット・ラインバッファにエッジフラグが立っている場合、このエッジ情報は最も光源に最も近いシャドウポリゴンの外郭線であるか、あるいは2組のエッジ情報が記憶されている場合(エッジフラグを検査することで判断する)は、シャドウ・デプスバッファ25および26に記憶されているデプス値とシルエット・ラインバッファに記憶されている1および2番目のエッジ情報は、それぞれ光源に最も近いポリゴンと2番目に近いポリゴンの外郭線上のものとなる。
一方、スパン内挿補間回路21からの画素にはエッジの画素も含まれる。この場合、スパン内挿補間回路からの新しいデプス値と、シャドウ・デプスバッファのデプス値とは一致する。この場合、現在補間している同一のポリゴンのエッジなのか否かの判定が必要となる。これはポリゴンあるいはオブジェクトに付加される識別子を画素単位で記憶することで、新しい画素とすでに記憶された画素との比較を行うことで判断できる。
The edge information of the terms (1) to (6) is also output. The edge information is stored in the silhouette line buffer 22. One pixel grid can store up to two sets of edge information. The depth value (z coordinate value) on the contour line is compared with the depth value of the shadow polygon stored in each of the three shadow depth buffers 25, 26 and 27 by the comparison circuit 23. The comparison circuit 23 performs the following determination processes (A) to (F).
(A) If the depth value of the contour line is closest to the light source (is closer to the light source than all the depth values stored in the shadow depth buffer), the edge information is stored in the silhouette line buffer. . Further, the depth value is stored in the shadow depth buffer 1 (25), the depth value of the buffer 1 (25) is moved to the buffer 2 (26), and the depth value of the buffer 2 (26) is moved to the buffer 3 (27). To do. At this time, if the edge information is already stored in the silhouette line buffer 22, the first edge information is updated, and the stored first edge information is moved as the second edge information. .
(B) When the depth value of the contour line is farther than the depth value of the shadow depth buffer 1 (25) and is closer to the light source than the depth buffer 2 (26) storing the depth value closest to the light source. Updates the second edge information, updates the depth value of the shadow depth buffer 2 (26), and moves to the buffer 3 (27).
(C) When the depth value of the contour line is farther than the depth value of the shadow depth buffer 2 (26), and closer to the light source than the depth buffer 3 (27) storing the depth value closest to the light source. Assumes that three edges intersect one pixel grid and sets a multiline bit in the silhouette line buffer. The depth value of the shadow depth buffer 3 (27) is updated.
(D) If the edge information is not stored in the silhouette line buffer (the flag is not set) and it is located farther than all or any of the depth values of the shadow depth buffer, The edge information is not stored in the silhouette line buffer, assuming that the outline is located behind.
(E) The span interpolation circuit 21 obtains vertex definition information inside the polygon. The depth value of the polygon is also passed through the depth values of the shadow depth buffers 25, 26 and 27 and the multiplexer 24 in the same manner as the contour line depth value. The depth comparison circuit 23 compares the magnitude relation, and the depth value from the span interpolation circuit 21 is located closer to the light source than the depth value of each shadow depth buffer, and is not a value on the edge. In this case, it is assumed that the edge stored in the silhouette line buffer is located behind the pixel being interpolated, and all the edge flags already stored are reset.
(F) In (E), the depth value from the span interpolation circuit 21 is farther from the depth value of the shadow depth buffer 1 (25), closer to the light source than the depth buffer 2 (26), and on the edge. If it is not a value, the first edge information stored in the silhouette line buffer is left as it is, and the second edge flag (if stored) is reset.
On the other hand, the pixels inside the polygon are output from the span interpolation circuit 21. When the depth value is closest to the light source, the pixel is replaced with the depth value of the shadow depth buffer 1 (25). Further, the depth value of the buffer 1 (25) is moved to the buffer 2 (26), and the depth value of the buffer 2 (26) is moved to the buffer 3 (27). As a result, the depth value previously stored in the buffer 3 (27) is deleted. When the depth value from the span interpolation circuit is the second closest to the light source, the buffer 25 is left as it is, the new depth value is replaced in the buffer 26, and the depth value in the buffer 26 is moved to the buffer 27. If it is close to the third, only buffer 3 is replaced.
As a result of the above processing (A) to (F), when an edge flag is set in the silhouette line buffer, this edge information is the outline of the shadow polygon closest to the light source, or two sets of edge information. When the edge information is stored (determined by checking the edge flag), the depth values stored in the shadow depth buffers 25 and 26 and the first and second values stored in the silhouette line buffer are stored. The edge information is on the outline of the polygon closest to the light source and the polygon closest to the second.
On the other hand, the pixels from the span interpolation circuit 21 also include edge pixels. In this case, the new depth value from the span interpolation circuit coincides with the depth value of the shadow depth buffer. In this case, it is necessary to determine whether the edges of the same polygon currently being interpolated are present. This can be determined by storing the identifier added to the polygon or object in units of pixels, and comparing the new pixel with the already stored pixel.

図3は第2パスに関する本発明のシャドウ・シルエット・アンチエリアス回路を示す。第2パスでは視点座標系でのポリゴンの内挿補間を行い、スパン内挿補間回路30からのx、y、z座標値を光源系座標変換回路31にて光源系座標値に変換する。光源系座標値はシルエット・ラインバッファ33とシャドウ・デプスバッファ34のアドレスとなり、第1パスで求めたエッジ情報とデプス値をそれぞれ読み出す。バッファ33と34は、それぞれ図2におけるシルエット・ラインバッファ22およびデプスバッファ1〜3(25〜27)に相当する。読み出したシルエット・ラインバッファのエッジフラグからその画素点がエッジであると判定された場合には、領域計算および輝度決定回路32において、シルエット・ラインバッファから読み出した前記FIG. 3 shows the shadow silhouette anti-aliasing circuit of the present invention for the second pass. In the second pass, polygon interpolation is performed in the viewpoint coordinate system, and the x, y, and z coordinate values from the span interpolation circuit 30 are converted into light source coordinate values by the light source coordinate conversion circuit 31. The light source system coordinate value becomes the address of the silhouette line buffer 33 and the shadow depth buffer 34, and the edge information and depth value obtained in the first pass are read out. The buffers 33 and 34 correspond to the silhouette line buffer 22 and the depth buffers 1 to 3 (25 to 27) in FIG. 2, respectively. When it is determined from the edge flag of the read silhouette / line buffer that the pixel point is an edge, the area calculation and luminance determination circuit 32 reads the silhouette / line buffer from the silhouette / line buffer.

項に記載した(2)〜(6)を用いて内挿点とエッジとの領域判定と、その領域がもつデプス値との比較を行う。視点座標系でのポリゴンの内挿補間点が影の可能性があると判定された(スパン内挿補間回路からのデプス値が、シャドウ・デプスバッファのいずれかのデプス値よりも光源から遠方にある)場合、内挿補間点が1番目および2番目の外郭線の内側か外側かのいずれに属するのかを決定し、いずれかの内側と判定された場合には、その内側となるシャドウ・デプスバッファのデプス値と比較し、そのデプス値よりも遠方にある場合には影と見なす。一方、光源寄りにある場合には照射点とする。2つのエッジ情報から外郭線の内外判定においていずれも外部とされた場合は、デプスバッファ3(27)のデプス値との比較において光源から見て遠方であれば影、光源寄りであれば照射点とする。一方、内挿点がいずれのシャドウ・デプスバッファのデプス値よりも光源寄りに位置している場合には、内挿点を照射点と見なす。領域計算および輝度決定回路32では前記判定して得られた影の有無に対して内挿補間点の輝度を決定するシェーダーに輝度のスケール値を出力することで影を生成する。Using (2) to (6) described in the section, the area determination between the interpolation point and the edge and the depth value of the area are compared. It was determined that the interpolation point of the polygon in the viewpoint coordinate system may be a shadow (the depth value from the span interpolation circuit is farther from the light source than one of the depth values in the shadow / depth buffer) If it is determined that the interpolated interpolation point belongs to the inside or outside of the first and second contour lines, and the inside interpolation point is determined to be inside, the shadow depth that is inside the interpolation point is determined. Compared to the depth value of the buffer, if it is far from the depth value, it is considered as a shadow. On the other hand, when it is near the light source, it is set as an irradiation point. If both are determined to be external in the inside / outside determination of the contour line based on the two edge information, the shadow point is far from the light source in the comparison with the depth value of the depth buffer 3 (27), and the irradiation point is near the light source. And On the other hand, when the interpolation point is located closer to the light source than the depth value of any shadow depth buffer, the interpolation point is regarded as an irradiation point. The region calculation and luminance determination circuit 32 generates a shadow by outputting a luminance scale value to a shader that determines the luminance of the interpolation point for the presence or absence of the shadow obtained by the determination.

本発明の回路はIP(Intelligent property)として提供したり、グラフィックスプロセッサLSIに実装されることで、CG映像製作やアムーズメントシステムに利用される。  The circuit of the present invention is provided as an IP (Intelligent property) or mounted on a graphics processor LSI so that it can be used for CG video production and an amusement system.

図1「本発明に関する画素グリッドとポリゴン外郭線との交差関係図を示す。」
図2「本発明の第1パスにおけるシャドウ・シルエット・アンチエリアス回路を示す。」
図3「本発明の第2パスにおけるシャドウ・シルエット・アンチエリアス回路を示す。」
FIG. 1 “Shows a cross-relationship diagram between a pixel grid and a polygon outline relating to the present invention.”
FIG. 2 “Shows a shadow silhouette anti-alias circuit in the first pass of the present invention.”
FIG. 3 “Shows a shadow silhouette anti-alias circuit in the second pass of the present invention.”

符号の説明Explanation of symbols

図1
10〜14 画素グリッド
15 ポリゴン外郭線
図2
20 アウトライン内挿補間回路
21 スパン内挿補間回路
22 シルエット・ラインバッファ
23 デプス比較回路
24 マルチプレクサ
25 シャドウ・デプスバッファ1
26 シャドウ・デプスバッファ2
27 シャドウ・デプスバッファ3
図3
30 スパン内挿補間回路
31 光源系座標変換回路
32 補間点領域計算および輝度決定回路
33 シルエット・ラインバッファ
34 シャドウ・デプスバッファ
FIG.
10-14 pixel grid 15 polygon outline diagram 2
20 Outline Interpolation Circuit 21 Span Interpolation Circuit 22 Silhouette Line Buffer 23 Depth Comparison Circuit 24 Multiplexer 25 Shadow Depth Buffer 1
26 Shadow Depth Buffer 2
27 Shadow Depth Buffer 3
FIG.
30 Span interpolation circuit 31 Light source system coordinate conversion circuit 32 Interpolation point area calculation and brightness determination circuit 33 Silhouette line buffer 34 Shadow depth buffer

Claims (4)

コンピュータグラフィックスにおける影の描画に関し、第1パスでは光源座標系においてシャドウポリゴンを、第2パスでは視点座標系において可視ポリゴンを描画する2パス・シャドウ表示方式において、光源に近い順にシャドウポリゴンのデプス値を順次記憶するためのシャドウ・デプスバッファと、シャドウポリゴンの外郭線(シルエットライン)上のエッジ情報を記憶するシルエット・ラインバッファを設け、第1パスでは隠面消去処理によってシャドウポリゴンのデプス値を少なくとも3つ以上、また外郭線エッジ情報は2つ以上をシャドウ・デプスバッファとシルエット・ラインバッファのそれぞれに記憶する手段と、第2パスにおいては視点座標系で可視ポリゴンを描画すると共に、可視ポリゴンの内挿補間座標値を光源系座標値に変換して、前記第1パスにおいて記憶した前記シャドウ・デプスバッファおよびシルエット・ラインバッファのそれぞれの情報を読み出し、前記内挿補間点がシャドウポリゴン内外のいずれに属するかを判定する手段として、シャドウ・デプスバッファの画素単位を4角形からなるグリッド空間として外郭線はこの空間を交差するものと見なし、前記外郭線のエッジ情報から前記内挿補間点の画素内におけるシャドウポリゴン内外の判定を行い、さらに前記シャドウ・デプスバッファに記憶されたそれぞれのデプス値を用いて、前記可視ポリゴンの内挿補間点が影か照射点かを決定するシャドウ・シルエット・アンチエリアス回路。Regarding the drawing of shadows in computer graphics, in the first pass, the shadow polygon is drawn in the light source coordinate system, and in the second pass, the visible polygon is drawn in the viewpoint coordinate system. A shadow depth buffer for sequentially storing values and a silhouette line buffer for storing edge information on contour lines (silhouette lines) of shadow polygons are provided. In the first pass, the shadow polygon depth value is obtained by hidden surface removal processing. Means to store at least three or more contour line edge information in the shadow depth buffer and silhouette line buffer respectively, and in the second pass, draws a visible polygon in the viewpoint coordinate system and makes it visible The interpolation interpolation coordinate value of the polygon As a means for reading each information of the shadow depth buffer and the silhouette line buffer stored in the first pass by converting to a value, and determining whether the interpolation point belongs inside or outside the shadow polygon, Assuming that the pixel unit of the shadow depth buffer is a rectangular grid space, the outline is considered to intersect this space, and the inside / outside of the shadow polygon in the interpolation interpolation point pixel is determined from the edge information of the outline. And a shadow silhouette anti-alias circuit for determining whether the interpolation interpolation point of the visible polygon is a shadow or an irradiation point using each depth value stored in the shadow depth buffer. 請求項1の回路において、外郭線エッジ(以下シルエットラインという)情報として、シルエット・ラインバッファには画素毎に、シルエットラインの(1)有無フラグ(2)傾き、(3)長短軸フラグ、(4)ライト/レフト・エッジフラグ、(5)交差座標小数点値、および(6)接続点フラグのそれぞれを記憶する手段と、前記シルエット・ラインバッファには、前記シルエットライン情報を、少なくとも2組以上記憶する手段と、シャドウ・デプスバッファのデプス値と、シルエット・ラインバッファのシルエットライン情報とは識別子により帰属判定が可能とするそれぞれの手段をもつシャドウ・シルエット・アンチエリアス回路。  In the circuit of claim 1, as contour line edge (hereinafter referred to as silhouette line) information, the silhouette line buffer stores (1) presence flag (2) slope, (3) long and short axis flag for each pixel, 4) Means for storing right / left edge flag, (5) decimal point value of intersection coordinates, and (6) connection point flag, and at least two sets of the silhouette line information in the silhouette / line buffer. A shadow silhouette anti-alias circuit having means for storing, a depth value of a shadow depth buffer, and silhouette line information of a silhouette line buffer, each of which can be attributed by an identifier. 請求項1および2の回路において、第1パスでシルエットライン情報をシルエット・ラインバッファに記憶する際、シルエットライン情報の内、ライト/レフト・エッジフラグを除いたすべての前記情報が、すでにシルエット・ラインバッファに記憶されている情報と一致した場合には、新たに記憶しようとする情報は、隣接するポリゴンの外郭線として、すでにシルエット・ラインバッファに記憶された有無フラグをリセットすると共に、新たなシルエットライン情報もシルエット・ラインバッファに記憶しない手段をもつシャドウ・シルエット・アンチエリアス回路。  3. When the silhouette line information is stored in the silhouette line buffer in the first pass in the circuits of claim 1 and 2, all of the information excluding the right / left edge flag in the silhouette line information has already been If it matches the information stored in the line buffer, the information to be newly stored resets the presence / absence flag already stored in the silhouette line buffer as the outline of the adjacent polygon, Shadow silhouette anti-alias circuit with a means of not storing silhouette line information in the silhouette line buffer. 請求項1の回路において、第1パスにおいて視点に最も近いデプス値から少なくとも3番目に近いデプス値までを記憶する3つのシャドウ・デプスバッファを設け、シルエットライン上の画素において、より視点に近いシルエットラインのデプス値が新たに交差した場合は、すでにシャドウ・デプスバッファに記憶されたデプス値を順次繰り下げて記憶する手段と、繰り下げによって前記シャドウ・デプスバッファから消去されるシルエットラインがある場合には、前記シルエット・ラインバッファから、そのシルエットラインに対応する情報を消去する手段と、新たなシルエットライン情報を前記シルエット・ラインバッファに記憶する手段と、シャドウ・デプスバッファの内、2番目以降のバッファに記憶するデプス値は、それぞれ前番号のバッファのデプス値からの相対値として定義することで2番目以降のシャドウ・デプスバッファの容量を削減する手段をもつシャドウ・シルエット・アンチエリアス回路。  3. The circuit according to claim 1, wherein three shadow depth buffers for storing from the depth value closest to the viewpoint to at least the depth value closest to the viewpoint in the first pass are provided, and the silhouette closer to the viewpoint in the pixels on the silhouette line. If there is a new crossing of the depth value of the line, if there is a means to sequentially store the depth values already stored in the shadow depth buffer, and there is a silhouette line that is erased from the shadow depth buffer by the reduction Means for erasing information corresponding to the silhouette line from the silhouette line buffer; means for storing new silhouette line information in the silhouette line buffer; and second and subsequent buffers of the shadow depth buffer. The depth values stored in the Shadow Silhouette anti-aliasing circuit having means for reducing the capacity of the second and subsequent shadow depth buffer by defining as a relative value from the depth value of the buffer.
JP2005033612A 2005-01-13 2005-01-13 Shadow silhouette anti-alias circuit Pending JP2006195939A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005033612A JP2006195939A (en) 2005-01-13 2005-01-13 Shadow silhouette anti-alias circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005033612A JP2006195939A (en) 2005-01-13 2005-01-13 Shadow silhouette anti-alias circuit

Publications (1)

Publication Number Publication Date
JP2006195939A true JP2006195939A (en) 2006-07-27

Family

ID=36801962

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005033612A Pending JP2006195939A (en) 2005-01-13 2005-01-13 Shadow silhouette anti-alias circuit

Country Status (1)

Country Link
JP (1) JP2006195939A (en)

Similar Documents

Publication Publication Date Title
US7280121B2 (en) Image processing apparatus and method of same
CN108734624B (en) Graphics processing pipeline including multiple processing stages and method and medium for operating the same
TWI584223B (en) Method and system of graphics processing enhancement by tracking object and/or primitive identifiers,graphics processing unit and non-transitory computer readable medium
EP3080781B1 (en) Image rendering of laser scan data
CN111508052B (en) Rendering method and device of three-dimensional grid body
JP4327105B2 (en) Drawing method, image generation apparatus, and electronic information device
US8059119B2 (en) Method for detecting border tiles or border pixels of a primitive for tile-based rendering
JP2001501349A (en) Method and apparatus for attribute interpolation in 3D graphics
JPH03212775A (en) Method and apparatus for drawing antialias polygon
US20050068326A1 (en) Image processing apparatus and method of same
CN101271588B (en) Recreatable geometric shade pattern method
ITMI20090876A1 (en) METHOD OF RENDERING OF AN EDGE OF A PRIMITIVE GRAPHIC
JPH08249491A (en) 3-d graphic device using texture image containing depth information
US6501481B1 (en) Attribute interpolation in 3D graphics
JP4691494B2 (en) Image drawing apparatus, vertex selection method, vertex selection program, and integrated circuit
JP2006195939A (en) Shadow silhouette anti-alias circuit
JP2007141196A (en) Polygon/silhouette line/anti-aliasing circuit
JPH09305791A (en) Device and method for generating three-dimensional image
Hoppe et al. Adaptive meshing and detail-reduction of 3D-point clouds from laser scans
US7382377B1 (en) Render to texture cull
JP4106719B2 (en) Image processing device
JP5661134B2 (en) Image processing apparatus and image processing method
JP2010157170A (en) Omnidirectional shadow projection renderer
JP2012141833A (en) Polygon contour line/grid crossing area calculation circuit
JP2006113909A (en) Image processor, image processing method and image processing program