Abstract

Translated from Chinese

一种景深消隐方法、三维图形处理方法及其装置。 One kind of depth of field blanking method, apparatus and method for processing three-dimensional graphics.该景深消隐方法包括：提供景深高速缓冲存储器，藉以暂存屏幕的至少一影砖所对应的覆盖遮罩以及待定最大景深值，其中，该屏幕栅格化为多个影砖，覆盖遮罩表示影砖中已知部分的像素位置，且待定最大景深值为已知部分中各个像素对应视点的各个景深值中的最大景深值；获得依据影砖及图块所计算产生的绘制遮罩、绘制最大景深值及绘制最小景深值，其中该图块是组建三维图形的平面在屏幕的投影位于影砖内的像素；以及判断已知部分的像素位置是否完全包括该图块的像素位置，配合绘制最小景深值与待定最大景深值的比较，藉以决定是否删去该图块，并是否更新景深高速缓冲存储器的覆盖遮罩以及待定最大景深值。 The depth of field blanking method comprising: providing a cache memory depth of field, so as to at least temporarily storing a screen image corresponding to the brick coverage masks and the maximum depth value is determined, wherein the grid screen image into a plurality of tiles, coverage masks denotes a pixel position of a portion in the brick Movies known, the maximum depth and the maximum depth value of the determined depth values ​​of the respective pixels corresponding to each viewpoint is known portion; Movies brick and tile obtained based on the calculated drawing the mask produced, the maximum depth value and plotted to draw a minimum depth value, wherein the block is formed flat three-dimensional graphics pixels located within the shadow of the projection screen in the brick; and determining whether or not the pixel position is known fully portion includes a pixel location of the tile, with comparing the drawing with the smallest depth value determined maximum depth value, so as to determine whether the deletion block, whether to update the coverage masks and the depth cache to the depth value and the maximum determined.

Description

Translated from Chinese

景深消隐方法、三维图形处理方法及其装置 Depth of field blanking method, apparatus and method for processing three-dimensional graphics

[0002] 景深缓冲(depth buffing)技术，或称为Z缓冲(Z-buffing)、Z测试(Z-testing)，是三维(three-dimens1n，3D)图形处理中用来解决图形景深坐标的过程，其可确定在三维场景中被渲染场景的哪些部分将会被看见而显示，而哪些部分将会被隐藏。 [0002] buffer depth (depth buffing) technology, otherwise known as Z-buffer (Z-buffing), Z test (Z-testing), a three-dimensional (three-dimens1n, 3D) graphics processing for solving process pattern depth coordinates , which may determine which portion of the scene is rendered in the 3D scene will be seen to display, and which part will be hidden.

[0003] 举例来说，当支持景深缓冲技术的图形处理器(Graphic Processing Unit ；GPU)在渲染三维图形的立体物件时，经处理后的每一个像素通常皆具有一Z值，藉以表示此像素所表示的立体物件在屏幕上的「景深值」。 [0003] For example, when the depth buffer technique support a graphics processor (Graphic Processing Unit; GPU) when rendering a three-dimensional perspective graphics object by each pixel are processed generally has a Z value, in order that the pixels of this dimensional objects represented on the screen of the "depth of field values."这些Z值便会保存在相对应位置的缓冲区中，这个缓冲区则被称为Z缓冲区或者景深缓冲区(depth buffer)。 These values ​​will be stored in the Z buffer corresponding to the location, this buffer is called the Z-buffer or depth buffer (depth buffer).景深缓冲区通常以像素的X轴及Y轴座标来形成用以保存每个像素景深值的二维阵列。 Depth buffer is generally X-axis and Y-axis coordinates of a two-dimensional array of pixels is formed for each pixel depth value is saved.如果场景中的另一个立体物件也在同一个像素生成渲染像素时，那么图形显示卡就会比较二者的景深值，并保留距离观察者较近的物件，并且被保留的像素景深保存到景深缓冲区中。 If a second-dimensional objects in the scene are rendered with pixel generation a pixel, the graphics card will compare the depth value of the two, closer to the observer and to retain the object distance, depth of field is retained and stored to the pixel depth buffer.上述的景深缓冲技术亦可称为景深消隐或Z消隐(Z-culling)。 Depth buffer technique described above may also be referred to as the depth or Z blanking blanking (Z-culling).

[0004] 然而，上述的景深缓冲演算法必须先行计算好该立体物件的像素数据及其景深值，并且不管观赏者最终看得见或看不见该立体物件，都必须先取出景深暂存器中的像素景深，并与计算后像素数据的景深值进行比较，这需要占用系统存储器相当大的频宽(bandwidth)，导致系统存储器与图形处理器之间的频宽经常成为影响图形处理速度的主要瓶颈，特别是现今的三维场景通常具有相当高的深度复杂度(depth complexity)。 [0004] However, the above-described depth buffer algorithm must first calculate the three-dimensional object pixel data and the depth value, and regardless of whether visible or invisible to the viewer of the final three-dimensional object, the depth of field must first remove the scratchpad pixel depth and pixel depth value is compared with the calculated data, which take up considerable memory system bandwidth (bandwidth), resulting in bandwidth between the system memory and the graphics processor is often an impact on the processing speed of the main pattern bottlenecks, in particular three-dimensional scene is now typically have a rather high complexity of the depth (depth complexity).因此，如何解决景深缓冲区的传输量便成为三维图形处理技术中欲待解决的问题。 So, how to solve the transmission amount of depth buffer has become a problem in three-dimensional graphics processing technology Yudai resolved.

[0005] 为了减少对于景深缓冲器的存取，改善景深缓冲所存在的问题，发展出许多方法来解决此问题，粗略景深消隐(coarse Z culling)技术便是其中一种方式。 [0005] In order to reduce access to the depth buffer, depth buffer to improve the problems, developed a number of methods to solve this problem, the depth of field blanking rough (coarse Z culling) technology is one way.粗略景深消隐技术利用屏幕上所切割的大小相同的影砖(tile)来对立体物件进行栅格化(rasterize)，并在系统存储器中设立粗略景深缓冲区，藉以记录每个影砖内像素的最大景深值、最小景深值等属性参数。 Movies same size tile (the tile) technology using a coarse screen blanking depth of the cut to be rasterized (Rasterize) three-dimensional object, and set up a rough depth buffer in the system memory, thereby recording each pixel tile Movies the maximum depth value, the minimum depth value parameter attributes.当有新的立体物件进行处理时，粗略景深消隐技术便从系统存储器中读取上述属性参数来判断影砖内的立体物件是否已被遮蔽，进而直接剔除被遮蔽的部分。 When a new object processing perspective, the coarse depth concealment technique begins with a system memory read the attribute parameters to determine whether the object in the stereoscopic image tiles have been masked, and further obscured partially removed directly.

[0006] 然而，现有粗略景深消隐技术在处理过程中时常对系统存储器中的粗略景深缓冲区进行存取，因此还是会占去相当比重的频宽。 [0006] However, the prior art often rough depth of the blanking system memory coarse depth buffer accesses in the process, and therefore will still account for a significant proportion of the bandwidth.并且，现有粗略景深消隐技术在处理过程在算法上大多具有庞大的分支，复杂的判断，在确定景深的相对位置关系时算法复杂，存在大量的比较，并且算法上的复杂也造成硬件实现的复杂。 Further, in the prior art coarse depth blanking process often has a large branch, is determined on the complex algorithm, when the relative positional relationship between the depth of field of computational complexity, there are a lot of comparison, the complex algorithms and hardware also caused complex.藉此，如何持续降低系统存储器的频宽使用率，并降低计算的复杂性便是三维图形处理技术中所欲待解决的问题。 In this way, how to continue to reduce bandwidth utilization of system memory, and reduce the complexity of the problem is the three-dimensional graphics processing technology in computing the Yudai resolved.

发明内容 SUMMARY

[0007] 本发明提供一种粗略景深消隐方法，藉由增加专属的粗略景深高速缓冲存储器，使其能够利用此高速缓冲存储器来降低对于系统主存储器的读写频率，藉以有效地降低对系统存储器的存取次数，并减少系统存储器的频宽占用。 [0007] The present invention provides a rough depth of field blanking method, by increasing the depth of roughly exclusive cache memory, it is possible to use this cache to reduce the frequency of reading and writing to the main memory of the system, thereby effectively reducing system memory access frequency, and to reduce the bandwidth occupied by system memory.

[0008] 此外，本发明提供一种三维图形处理方法，其中的粗略景深消隐程序可利用专属的粗略景深高速缓冲存储器来降低对于系统主存储器的读写频率，藉以有效地降低对系统存储器的存取次数，减少系统存储器的频宽占用，提升即时图形处理的速度。 [0008] Further, the present invention provides a three-dimensional graphics processing method, wherein the depth of field blanking rough rough program may utilize unique depth cache to reduce the frequency of reading and writing to the main memory of the system, thereby effectively reducing the system memory access times and reduce the bandwidth occupied by system memory, enhance instant speed of graphics processing.

[0009] 以另一方面而言，本发明提供一种三维图形处理装置，其中的粗略景深消隐模块可利用专属的粗略景深高速缓冲存储器来降低对于系统主存储器的读写频率，藉以有效地降低对系统存储器的存取次数，减少系统存储器的频宽占用，提升即时图形处理的速度。 [0009] In another aspect, the present invention provides a three-dimensional graphics processing apparatus, wherein a rough depth blanking module may utilize unique coarse depth cache to reduce the frequency of reading and writing to the main memory of the system, thereby effectively reduce the number of accesses to the system memory, to reduce the bandwidth occupied by system memory, enhance instant speed graphics processing.

[0010] 藉此，本发明提出一种景深消隐方法，适用于三维图形处理装置，该景深消隐方法包括:提供景深高速缓冲存储器，该景深高速缓冲存储器位于该三维图形处理装置内部，且独立于一系统存储器之外，其中该系统存储器为一计算机系统存储器或一显示存储器，藉以暂存屏幕的至少一影砖所对应的覆盖遮罩(coverage mask)以及待定最大景深值，其中，该屏幕栅格化为多个影砖，该覆盖遮罩表示该影砖中已知部分的像素位置，且该待定最大景深值为该已知部分中各个像素对应视点的各个景深值中的最大景深值；获得依据该影砖及图块所计算产生的绘制遮罩(draw mask)、绘制最大景深值及绘制最小景深值，其中该图块是组建该三维图形的平面在该屏幕的投影位于该影砖内的像素，该绘制遮罩表示该影砖中该图块的像素位置，该绘制最小景深值为该图块的投影 [0010] Accordingly, to provide a depth of field blanking process of the invention applied to three-dimensional graphics processing apparatus, the depth of field blanking method comprising: providing a depth of field of the cache memory, the cache memory located within the depth of field of the three-dimensional graphics processing device, and independent from a system memory, wherein the memory is a system memory of a computer system or a display memory, thereby temporary coverage mask (coverage mask) and maximum depth value of the at least one pending Movies screen corresponding to the brick, wherein the Movies screen grid into a plurality of tiles, the coverage mask indicates a pixel position of the known tile Movies portion, and the maximum depth value is determined depth value of each portion corresponding to each pixel the maximum depth of the viewpoints of the known value; obtained according to the brick and tile Movies calculated to produce the mask drawing (draw mask), the maximum depth value and plotted to draw a minimum depth value, wherein the block is formed of the three-dimensional graphics plane located at the projection screen, shadow pixels within the tile, the mask drawing indicates a pixel position of the shadow of the brick tile, the drawing of the minimum depth value of the tile projection中各个像素对应该视点的各个景深值中的最小景深值，该绘制最大景深值为该图块中各个像素对应该视点的各个景深值中的最大景深值；判断该已知部分的像素位置是否完全包括该图块的像素位置，配合该绘制最小景深值与该待定最大景深值的比较，藉以决定是否删去该图块，并是否更新该景深高速缓冲存储器的该覆盖遮罩以及该待定最大景深值，当该已知部分的像素位置完全包括该图块的像素位置但是不等于该图块的像素位置的时候，且该绘制最小景深值不大于该待定最大景深值的时候，该待定最大景深值保持不变，以及当该已知部分的像素位置等于该图块的像素位置的时候，且该绘制最小景深值不大于该待定最大景深值的时候，使用该绘制最大景深值与该待定最大景深值之间的最小值来更新该待定最大景深值，其中该影砖所对应的该覆盖遮罩 In each pixel the minimum depth value of each depth value should be in view, the maximum drawing depth value is the maximum depth value should be the depth value of the respective viewpoints of the respective pixels on the tile; determining from the known portion of the pixel position is tile completely including the location of the pixel, the comparison with the smallest depth value and the maximum depth value of the pending drawing, so as to determine whether the deleted block, and whether to update the cache depth mask and the coverage determined maximum when the depth value, when the pixel position of the known portion of the complete pixel positions include but are not equal to the pixel tile of the tile position when the drawing minimum depth value and not greater than the determined maximum depth value, the maximum pending depth value remains unchanged, and when the position of the pixel is equal to the known portion of the pixel block position and the drawing minimum depth value not greater than the determined maximum depth value, the use of the maximum drawing depth value and the pending minimum value between the maximum depth value to update the pending maximum depth value, wherein the bricks corresponding to the shadow mask covering及该待定最大景深值是从该系统存储器中获得并且暂存于该景深高速缓冲存储器。 The determined maximum depth and the value is obtained from the system memory and temporarily stored in the cache depth.

[0011] 在本发明的一实施例中，粗略景深消隐方法还包括下列步骤。 [0011] In an embodiment of the present invention, the method further comprises roughly the depth of field blanking steps.当上述的粗略景深高速缓冲存储器已满时，则把粗略景深高速缓冲存储器中的数据回存至系统存储器。 When the depth of said rough cache memory is full, the data put coarse depth cache memory back to the system memory.

[0012] 于另一观点而言，本发明提出一种使用景深消隐方法的三维图形处理方法，适用于三维图形处理装置以将三维场景显示于屏幕，该三维图形处理方法包括:拆解该三维场景以形成至少一平面，将该屏幕栅格化为多个影砖，以依据至少一个影砖及一图块计算产生绘制遮罩、绘制最大景深值及绘制最小景深值，并将该绘制遮罩、该绘制最大景深值及该绘制最小景深值储存于该三维图形处理装置的系统存储器，其中该图块是该平面在该屏幕上的投影位于该影砖内的像素，该绘制遮罩表示该影砖中该图块的像素位置，该绘制最小景深值为该图块中各个像素对应一视点的各个景深值中的最小景深值，该绘制最大景深值为该图块中各个像素对应该视点的各个景深值中的最大景深值；依据该绘制遮罩、该绘制最大景深值、该绘制最小景深值及景深高速缓冲存 [0012] in another aspect, the present invention proposes a method of using three-dimensional graphics processing depth blanking method for three-dimensional graphics processing apparatus to display the three-dimensional scene on the screen, the three-dimensional graphics processing method comprising: the dismantling three-dimensional scene to form at least a plane, the plurality of image tiles into a grid screen, based on at least one of a brick and tile Movies calculated to produce the rendering mask, a maximum drawing depth value and the minimum depth value plotted, and the plotted mask, the draw depth value and the maximum drawing minimum depth value stored in the system memory of the three-dimensional graphics processing device, wherein the plane of the tile is projected on the screen pixels located within the image tile, the mask drawing Movies showing the position of the tile in the tile of pixels, the drawing of the minimum depth value of the minimum depth value corresponding to each pixel of each viewpoint of a depth value of the tile, the maximum drawing depth value of each pixel of the tile the maximum depth value should be the depth value of the respective viewpoints; a mask according to the drawing, the maximum depth value of the drawing, the drawing minimum depth value and a depth cache器进行景深消隐程序，藉以决定是否删去该图块，其中该景深高速缓冲存储器位于该三维图形处理装置内部，且独立于该系统存储器之外，其中该系统存储器为一计算机系统存储器或一显示存储器，其中该景深高速缓冲存储器暂存该影砖所对应的一覆盖遮罩以及一待定最大景深值，该覆盖遮罩表示该影砖中一已知部分的像素位置，且该待定最大景深值为该已知部分中各个像素对应该视点的各个景深值中的最大景深值；当确定保留该图块时，依据保留的该图块进行景深缓冲程序及一像素渲染程序，当该已知部分的像素位置完全包括该图块的像素位置但是不等于该图块的像素位置的时候，且该绘制最小景深值不大于该待定最大景深值的时候，该待定最大景深值保持不变，以及当该已知部分的像素位置等于该图块的像素位置的时候，且该绘制最小景深值 Is the depth of field blanking procedures performed, so as to determine whether the deleted block, wherein the depth of the cache memory located inside the three-dimensional graphics processing apparatus, and independent of the system memory, wherein the memory is a system memory of a computer system or a display memory, wherein the cache memory temporarily stores the depth image corresponding to a tile coverage masks and the maximum depth value of a pending, the coverage mask indicates a pixel position in the tile Movies a known portion, and the maximum depth determined the maximum depth value of each pixel of each viewpoint depth value should be in the section of known value; when it is determined that the block retains, for a depth buffer program and pixel shaders according to the reserved block, known as the pixel position portion includes a pixel position of the tile fully but not equal to the pixel position of the tile when the drawing minimum depth value and not greater than the determined maximum depth value when the determined maximum depth value remains unchanged, and when the pixel position of the block is equal to the known portion of the pixel position, and the minimum depth value plotted不大于该待定最大景深值的时候，使用该绘制最大景深值与该待定最大景深值之间的最小值来更新该待定最大景深值，其中该影砖所对应的该覆盖遮罩以及该待定最大景深值是从该系统存储器中获得并且暂存于该景深高速缓冲存储器。 The maximum depth not greater than the determined value, the use of the maximum drawing depth value with the determined minimum value between the maximum depth value to update the pending maximum depth value, wherein the bricks corresponding to the shadow mask and cover the maximum pending depth value is obtained from the system memory and temporarily stored in the cache depth.

[0013] 其中，上述的粗略景深消隐程序可包括下列步骤。 [0013] wherein said rough depth blanking program may include the following steps.获得该影砖及该图块所对应的该绘制遮罩、该绘制最大景深值及该绘制最小景深值；以及判断该已知部分的像素位置是否完全包括该图块的像素位置，配合该绘制最小景深值与该待定最大景深值的比较，藉以决定是否删去该图块，并更新该景深高速缓冲存储器的该覆盖遮罩以及该待定最大景深值。 The brick is obtained and the shadow mask drawing corresponding to that tile, the maximum drawing depth value and the minimum depth value plotted; and determining whether the pixel positions of the known portion of the pixel position comprises a fully tile, with the draw comparing the determined minimum depth value and the maximum depth value, so as to determine whether the deleted block, and updates the cache depth covers the mask and pending the maximum depth value.

[0014] 于其他观点而言，本发明提出一种使用景深消隐方法的三维图形处理装置，用以将三维场景显示于屏幕，该三维图形处理装置包括:几何转换模块，拆解该三维场景以形成至少一平面，并将该屏幕栅格化为多个影砖，以依据至少一个影砖及一图块计算产生绘制遮罩、绘制最大景深值及绘制最小景深值，其中该图块是该平面在该屏幕上的投影位于该影砖内的像素，该绘制遮罩表示该影砖中该图块的像素位置，该绘制最小景深值为该图块中各个像素对应一视点的各个景深值中的最小景深值，该绘制最大景深值为该图块中各个像素对应该视点的各个景深值中的最大景深值；景深消隐引擎，与该几何转换模块相耦合，用于依据该绘制遮罩、该绘制最大景深值及该绘制最小景深值进行景深消隐程序，藉以决定是否删去该图块；景深缓冲引擎，与该景深消 [0014] in another aspect, the present invention proposes a three-dimensional graphics processing apparatus using a depth blanking method for three-dimensional scene is displayed on the screen, the three-dimensional graphics processing apparatus comprising: a geometric transformation module, the three-dimensional scene dismantling forming at least one plane, and the screen image into a plurality of raster tiles, according to at least one of a brick and tile Movies calculated to produce the rendering mask, the maximum depth value and plotted to draw a minimum depth value, wherein the tile is the projection plane on the screen of the image pixels located within the tile, the mask drawing indicates a pixel position of the shadow of the brick tile, the draw depth corresponding to each pixel of each viewpoint of a minimum depth value of the tile the minimum value of the depth, the maximum depth of drawing is the tile the maximum depth value for each pixel of each viewpoint depth value should be in; depth of field blanking engine, coupled with the geometric conversion module according to the drawing mask, the draw depth value and the maximum depth value for the drawing minimum depth blanking program, so as to determine whether the tile omitted; engine depth buffer with the depth consumption引擎相耦合，用于当确定不删去该图块时，依据该图块进行景深缓冲程序，以更新该影砖的像素；以及像素渲染引擎，与该景深缓冲引擎相耦合，依据更新的该影砖的像素进行像素渲染程序。 Coupled to the engine, when it is determined that the block is not omitted, performed according to the tile depth buffer program to update the pixels of the image tiles; and pixel rendering engine coupled to the depth buffer engine, based on the updated shadow bricks pixel pixel shaders.

[0015] 其中，上述景深消隐引擎包括有:景深读取模块，从系统存储器中获得该影砖及该图块所对应的该绘制遮罩、该绘制最大景深值及该绘制最小景深值；景深高速缓冲存储器，与该景深读取模块相耦合，用于暂存该影砖所对应的覆盖遮罩以及待定最大景深值，该覆盖遮罩表示该影砖中已知部分的像素位置，且该待定最大景深值为该已知部分中该些像素的最大景深值，其中该景深高速缓冲存储器位于该三维图形处理装置内部，且独立于该系统存储器之外，其中该系统存储器为一计算机系统存储器或一显示存储器；景深测试模块，与该景深读取模块以及该景深高速缓冲存储器相耦合，用于判断该已知部分的像素位置是否完全包括该图块的像素位置，配合该绘制最小景深值与该待定最大景深值的比较，藉以决定是否删去该图块；以及景深更新模块，与 [0015] wherein the depth of field blanking engine comprising: a reading module depth of field, obtaining the shadow of the brick and tile corresponding to the drawing the mask from the system memory, the draw depth value and the maximum drawing minimum depth value; depth cache to the depth reading module coupled to, for temporarily storing the corresponding tile Movies coverage masks and the maximum depth value to be determined, the coverage mask indicates a pixel position in the portion of the image tiles is known, and the determined maximum depth of the plurality of pixels is the maximum depth value of the part is known, wherein the depth of the cache memory located inside the three-dimensional graphics processing apparatus, and independent of the system memory, wherein the memory system is a computer system a memory or display memory; depth test module, with the depth and depth reading module coupled to the cache memory, for determining whether the pixel positions of the known portion of the pixel position comprises a fully tile, with the drawing of the minimum depth Compare the value determined with the maximum depth value, in order to decide whether to delete the tile; and a depth update module, and景深测试模块以及该景深高速缓冲存储器相耦合，用于依据该景深测试模块的决定结果来更新该景深高速缓冲存储器的该覆盖遮罩以及该待定最大景深值，其中当该已知部分的像素位置完全包括该图块的像素位置但是不等于该图块的像素位置的时候，且该绘制最小景深值不大于该待定最大景深值的时候，该景深更新模块将该待定最大景深值保持不变，当该已知部分的像素位置等于该图块的像素位置的时候，且该绘制最小景深值不大于该待定最大景深值的时候，该景深更新模块使用该绘制最大景深值与该待定最大景深值之间的最小值来更新该待定最大景深值，以及该影砖所对应的该覆盖遮罩以及该待定最大景深值是从该系统存储器中获得并且暂存于该景深高速缓冲存储器。 Depth and depth test module coupled to the cache memory, according to the decision result of the depth test module to update the cache memory of the depth mask and the coverage value determined maximum depth, wherein when the known position of the pixel portion when complete pixel position of the block including but not equal to the pixel positions of the tile when the drawing minimum depth value and not greater than the determined maximum depth value, the depth of the pending update module to maintain the maximum depth value unchanged, when the time position of the pixel is equal to the known portion of a pixel block position and the drawing minimum depth value not greater than the determined maximum depth value, the depth update module uses the maximum drawing depth value with the depth value of the determined maximum updating the minimum value between the maximum depth value to be determined, and the coverage mask and pending maximum depth value corresponding to the Movies tile is obtained from the system memory and temporarily stored in the cache depth.

[0016] 基于上述，本发明实施例在粗略景深缓冲模块中增加了专属的粗略景深高速缓冲存储器，使得在进行粗略景深消隐方法时，能够利用此高速缓冲存储器来降低对于系统主存储器的读写频率。 When [0016] Based on the above, embodiments of the present invention increases the depth of field dedicated cache memory is a coarse coarse depth buffer module, such that during a rough depth of field blanking method, the cache memory can be utilized to reduce this read system for a main memory write frequency.换句话说，以往在进行粗略景深消隐方法时，必须经常读写系统存储器中的粗略景深缓冲区。 In other words, the conventional method of performing coarse depth of field blanking, the reader must often rough depth buffer in the system memory.本实施例将粗略景深缓冲区中经常被读写的信息(例如遮罩、景深数据等)转移至高速缓冲存储器进行处理，有效地降低对系统存储器的存取次数，因而减少了系统存储器的频宽占用。 The present embodiment is often coarse depth buffer read information (e.g. a mask, depth data, etc.) is transferred to the cache memory is arranged to effectively reduce the number of accesses to system memory, thus reducing the frequency of system memory wide occupancy.

[0017] 为使本发明的上述特征和优点能更明显易懂，下文特举实施例，并结合附图详细说明如下。 [0017] To make the above features and advantages of the invention more comprehensible, several exemplary embodiments, in conjunction with the accompanying drawings and described in detail below.

附图说明 BRIEF DESCRIPTION

[0018] 图1为投影于屏幕的两个重迭三角形的范例示意图。 [0018] FIG. 1 is a schematic view of a projection in two overlapping triangles exemplary screen.

[0025] 图8是粗略景深高速缓冲存储器中高速缓冲线的字段图。 [0025] FIG. 8 is a rough depth of field in the cache memory a cache line.

[0026] 图9A及图9B为粗略景深消隐程序的举例及其景深方向示意图。 [0026] FIGS. 9A and 9B is a schematic view of a blanking process for example coarse depth and depth directions.

具体实施方式 Detailed ways

[0027] 现将详细参考本发明的示范性实施例，在附图中说明所述示范性实施例的实例。 [0027] will now be detailed with reference to exemplary embodiments of the present invention, an example embodiment of the exemplary embodiments in the accompanying drawings.另外，凡可能之处，在附图及实施方式中使用相同标号的元件/构件/符号代表相同或类似部分。 Wherever possible, the same reference numerals elements / components / symbol represents the same or like parts in the accompanying drawings and embodiments.

[0028] 在三维图形绘制过程中，通常分为两部份。 [0028] In three-dimensional graphics rendering process, usually divided into two parts.首先经过一次“初选”，以影砖(tile)为单位标识出各个影砖中场景的大致位置，也称为粗略景深消隐；之后再进入后续的“精修”过程，以像素(pixel)为单位，具体绘制出每个像素中的三维场景。 First, after a "primary" to shadow brick (the tile) identifying the approximate location of units of the respective scenes Movies brick, also referred to as a rough depth of field blanking; after re-entering the subsequent "finishing" process, pixels (pixel ) as a unit, particularly in each pixel drawn three-dimensional scene.这两部份处理相互独立并且各自具有完整的处理流程。 The two part process independent of each other and each having a complete process flow.本文说明粗略景深消隐程序，图1为投影于屏幕100的三角形110及三角形120的范例示意图，图2为图1的影砖(8，5)的立体透视图。 Rough depth of field blanking procedure described herein, FIG. 1 is a schematic example of a screen projected triangle 110 and the triangle 100 120, FIG. 2 is a perspective view of FIG. 1 is a perspective Movies bricks (8,5) of.由于三角形的几何特性，例如三角形的三个顶点位于一共同平面，因此立体物件可由数目众多的三角形为基础进行表示。 Since the triangular geometric characteristics, for example, three vertices of a triangle in a common plane, and therefore a large number of three-dimensional objects may be represented as a triangle base.在此以三角形110及120作为立体物件的举例，这两个三角形110及120有部分重迭，三角形110位在前面而遮蔽住与三角形120相重迭的区域。 The triangular objects 110 and 120 as a stereoscopic examples, two triangles 110 and 120 partially overlap, the triangular region 110 and concealed under the front triangle 120 and overlapping.三维图形处理方法可将三角形110及120进行栅格化处理，如图1中的栅格线所示，换句话说，可以将屏幕分割成多个大小相同的影砖(tile)，例如影砖(8，5)，并依据这些影砖来投影转换三角形110及三角形120。 Three-dimensional graphics processing method 110 may be triangular and rasterize 120, the grid lines shown in FIG. 1, in other words, the screen may be divided into a plurality of image tiles of the same size (the tile), e.g. brick Movies (8,5), and according to these bricks to projection conversion Movies triangle 110 and the triangle 120.一般而言，影砖可为边长8像素乘8像素(8X8)的矩形区域，但应用本实施例者可依据其设计需求来调整影砖的区域大小，并不依此为限。 In general, the side length of film can be brick 8 pixels by 8 pixels (8X8) a rectangular region, but by applying the present embodiment may be adjusted according to their design requirements, the size of the shadow region bricks, is not so limited.

[0029] 为了方便说明，在此将图1的影砖(8，5)以景深方向透视方式绘示于图2中，景深值(Z)从接近观赏者视点的"O"延伸至背景的"F"(亦表示为无穷远处)。 [0029] For convenience of explanation, here the Movies bricks (8,5) in a depth direction of FIG. 1 shown in perspective in FIG. 2, the depth value (Z) extending from near the viewpoint of the viewer "O" to the background "F" (also expressed as infinity).往景深方向看去，位在影砖(8，5)中的三角形110的图块210将会覆盖住影砖(8，5)中的三角形120的图块220。 Viewed in a direction toward depth, the bit in the shadow of bricks (8,5) in block 210 will cover the triangular Movies bricks (8,5) 110 220 120 of triangular tiles.粗略景深消隐技术可提供位在系统存储器中的一粗略景深缓冲区，藉以储存每个影砖的最大景深值、覆盖遮罩等属性参数，其中最大景深值是该影砖中经过绘制各个图块之后，当前未被覆盖的一个图块当中的每一个像素与观察者视点之间的景深距离的最大值，覆盖遮罩CM(c0Ver mask)表示当前该影砖中已绘制过的像素位置。 Techniques may provide a rough depth blanking bit system memory a coarse depth buffer, thereby storing a maximum depth value for each image tile, and other attributes coverage mask parameters, wherein the maximum depth value is drawn through the respective brick Movies FIG. following the block, the maximum depth of each pixel and the distance between a point of sight of the current block among uncovered, coverage mask CM (c0Ver mask) represents a pixel position of the current image has been drawn through the brick.假设三维图形处理方法先行处理三角形110，而图块210的最小及最大Z值分别为〃0.2〃及〃0.4〃，因此粗略景深缓冲区(8,5)的最大景深值字段被更新为"0.4"，并且粗略景深缓冲区(8，5)的覆盖遮罩CM字段则如图3所示进行更新，图3为覆盖遮罩CM及绘制遮罩DM的示意图。 Suppose three-dimensional graphics processing method of processing first triangle 110, and the minimum and maximum Z value of the tile 210 and 〃0.4〃 〃0.2〃 respectively, so rough depth buffer (8,5) has a maximum depth value field is updated to "0.4 ", and covers roughly the depth buffer (8,5) CM field mask is shown in FIG. 3 is updated, FIG. 3 is a schematic drawing coverage masks CM and DM mask.由于影砖为8X8像素的矩形区域，因此覆盖遮罩CM及绘制遮罩DM皆为8X8遮罩。 Since the shadow area of ​​rectangular brick 8X8 pixels, thus drawing the mask coverage mask CM and DM are all 8X8 mask.绘制遮罩DM (draw mask)是指本次进行绘制的图块在该影砖中投影的像素位置。 Drawing the mask DM (draw mask) refers to a pixel position of the current block to draw the shadow projection of the brick.本实施例在覆盖遮罩CM及绘制遮罩DM的字段中，〃1〃表示影砖(8，5)中此位置的像素已进行处理绘制，有一个不为无穷远的景深值；而"O"则表示此位置的像素尚未被描绘，其景深值可设置为无穷远。 In the present embodiment, the field coverage masks CM and DM in drawing the mask, 〃1〃 Movies brick represents a pixel (8,5) in this position has been treated drawing, there is an infinity of depth value; and " O "indicates a pixel at this position has not been depicted that the depth value can be set to infinity.这里"O"和"Γ仅起到标识作用，指示出该位置是否存在物体，并不指示物体的景深位置。标示像素为"Γ的区域可形成图块210 (亦可称为本实施例所述的已知部分)，但非以限定本发明，其他应用亦可以以"1〃表示尚未被描绘，而〃0〃则表示已进行处理绘制。 Here "O" and "Gamma] only play the role identifier, indicating whether the position of the object exists, does not indicate the depth position of the object. Designated pixel" Gamma] region 210 may be formed tile (also referred to as the present example embodiment known portion described later), but not to limit the invention, other applications can also be indicated as "Not depicted 1〃, and has been treated 〃0〃 indicates drawn.

[0030] 相对而言，正在进行绘制的图块220的最小及最大Z值分别为"0.6〃及"0.8〃，并且图块220的绘制遮罩DM如图3所示。 [0030] In contrast, the tile being drawn minimum and maximum Z values ​​respectively 220 "and 0.6〃" 0.8〃, and draw block mask DM 220 as shown in FIG.藉此，在继续处理三角形120时，三维图形处理方法会提供图3的图块220所对应的绘制遮罩DM，以及其所有像素中的最小Z值"0.6〃及最大Z值"0.8〃。 Accordingly, processing continues at 120 triangles, the method provides the three-dimensional graphic processing block 220 of FIG. 3 drawing the mask corresponding to the DM, and the minimum value Z "and the maximum Z value 0.6〃" 0.8〃 all pixels.藉此，利用覆盖遮罩CM及绘制遮罩DM进行比较，由于图块220在屏幕上的二维像素位置(在此简称为图块220的像素位置)包括了先前已被绘制处理的图块210的像素位置，而且图块220的最小Z值"0.6〃大于粗略景深存储器(8，5)的最大Z值字段"0.4〃，即大于图块210的最大景深值，因此图块220已被图块210完全遮蔽，则本发明的粗略景深消隐方法便可直接将图块220剔除，不需利用此图块220进行接下来的景深缓冲程序。 Accordingly, the coverage mask using CM and DM compared drawing the mask, since the two-dimensional pixel block 220 in a position on the screen (here referred to as the pixel positions tile 220) comprises a tile has been drawn previously processed pixel position 210, and the minimum Z value of the tile 220 "0.6〃 depth greater than the coarse memory (8,5) of the maximum Z value of the field" 0.4〃, i.e., greater than the maximum depth value of the tile 210, tile 220 has been so block 210 is completely obscured, the depth of field of the present invention, a coarse concealment method 220 can directly remove tiles, without the use of this tile depth buffer 220 for the next program.

[0031] 本发明实施例还在粗略景深消隐模块中增加一个专属的景深高速缓冲存储器，将经常需要读写的数据信息(例如遮罩、景深数据等)转移至此高速缓冲存储器进行处理，使其能够利用此高速缓冲存储器来降低对于系统主存储器的读写频率，藉以有效地降低对系统存储器的存取次数，并减少系统存储器的频宽占用。 [0031] Example embodiments of the present invention also coarse depth blanking module adds a unique depth cache will often need to read and write data information (e.g. a mask, depth data, etc.) are transferred into the cache memory is processed, so that With this it is possible to reduce the read-write cache memory for the frequency of the main system memory, thereby effectively reducing the number of accesses to the system memory, and reduce the bandwidth occupied by system memory.从而解决现有技术中，由于粗略景深缓冲区是建立在系统存储器中，而使得上述的粗略景深消隐程序在执行过程中亦需时常对粗略景深缓冲区进行存取，所以会占去相当比重的频宽这一问题。 So as to solve the prior art, since a rough depth buffer is established in system memory, such that said rough depth of field blanking program also need to frequently access a rough depth buffer during execution, it will take up a considerable proportion the bandwidth problem.同时也减少了计算时间和消耗的带宽。 Also reduces the computation time and bandwidth consumption.

[0032] 为实现本发明实施例，在此以图4的计算机系统40作为举例，图4是计算机系统40的方块图。 [0032] To achieve the embodiment of the invention, this computer system 40 of FIG. 4 by way of example, FIG. 4 is a block diagram of a computer system 40.于本实施例中，计算机系统40可为个人计算机、笔记型计算机、电子游戏机或相关硬件。 , The computer system 40 may be a personal computer, a notebook computer, an electronic game machine, or associated hardware in the present embodiment.电子装置40包括有中央处理单元410、显示装置420、计算机存储器430及显示单元440。 The electronic device 40 includes a central processing unit 410, a display device 420, a computer memory 430 and display unit 440.

[0033] 中央处理单元410控制计算机系统40的运作，例如执行程序、信息处理及运算，并可将运作期间所需的程序码、信息及数据暂存于计算机存储器430中。 [0033] The central processing unit 410 controls the operation of the computer system 40, for example, executing a program, and an information processing operation, and during the operation of the desired program code information, and data is temporarily stored in a computer memory 430.显示装置420 (例如显示卡)则是专门进行影像、图形的运算处理及画面显示，其利用处理器接口450、存储器接口460及显示控制接口470等桥接接口来分别親接至中央处理单元410、计算机存储器430及显示单元440 (例如液晶平面显示器)。 The display device 420 (e.g., graphics card) is designed specifically for image, graphics and the screen display processing operation, which utilizes a processor interface 450, the memory control interface 460 and display interface 470 interfaces respectively bridging the like affinity to the central processing unit 410 connected, a computer memory 430 and the display unit 440 (e.g., a liquid crystal flat panel display).于本实施例中，显示装置420还包含有三维图形处理装置480，其特别针对三维图形进行运算处理，藉以实现本实施例所述的三维图形处理方法及其粗略景深消隐方法。 In this embodiment, the display device 420 further includes a three-dimensional graphics processing apparatus 480, which performs arithmetic processing for a particular three-dimensional graphics, so as to achieve a three-dimensional graphics processing method of the present embodiment and the method of blanking coarse depth.

[0034] 图5是依照本发明实施例所述的三维图形处理装置480的方块图，图6是依照本发明实施例所述的三维图形处理方法的流程图。 [0034] FIG. 5 is a three-dimensional graphics processing apparatus in accordance with the embodiment of the present invention, a block diagram 480 of FIG. 6 is a flowchart of a three-dimensional graphics processing method according to the embodiment of the present invention.请参照图4及图5，耦接至系统存储器590的三维图形处理装置480可将三维场景显示于图4的显示单元440的屏幕上，三维图形处理装置480包括有几何转换模块510、粗略景深消隐引擎520、景深缓冲引擎570以及像素渲染引擎580，并且系统存储器590中包括有粗略景深缓冲区525及景深缓冲区575，藉以执行图6所述的三维图形处理方法。 Referring to FIG. 4 and FIG. 5, coupled to the system memory dimensional graphics processing 590, device 480 may be a three-dimensional scene on the display screen of the display unit in FIG. 4, 440, three-dimensional graphics processing apparatus 480 comprises a geometric conversion module 510, a rough depth blanking engine 520, engine 570, and the depth buffer dimensional graphics processing method of claim 6 pixel rendering engine 580, and system memory 590 with an approximate depth buffer comprising depth buffer 525 and 575, thereby performing FIG.粗略景深消隐引擎520则包括有粗略景深读取模块530、粗略景深高速缓冲存储器540、粗略景深测试模块550及粗略景深更新模块560，藉以实现图6的步骤S620以及S630所述的粗略景深消隐方法。 Blanking rough depth engine 520 includes a rough depth reading module 530, a cache memory 540 rough depth, depth test module 550 and the coarse coarse depth update module 560, so as to achieve the step of FIG. 6 and the extinction depth roughly S620 S630 implicit methods.其中，系统存储器590可以是计算机系统40的计算机存储器430，亦可以为显示装置420上专门用于三维影像处理的显示存储器，本实施例并不限制于此。 Wherein the system memory 590 may be a computer system 40 is a computer memory 430, the memory dedicated to the display of three-dimensional image processing apparatus 420 that can display, the present embodiment is not limited thereto.

[0035] 在此以图5的三维图形处理装置480结合图6说明本实施例的三维图形处理方法。 [0035] In this three-dimensional graphics processing apparatus 480 of FIG. 5 in conjunction with FIG. 6 illustrates a three-dimensional graphics processing method according to the present embodiment.于步骤S610中，几何转换模块510拆解三维空间的立体物件而形成多个基本元素(primitives)，这些基本元素可由点、线段、三角形或多边形来形成，并可由基本元素的顶点来定义。 In step S610, the geometric conversion module 510 disassembled perspective three-dimensional object formed by a plurality of basic elements (not primitives or), these basic elements by point, line, triangle or polygon is formed, the vertices can be defined by the base element.本实施例以三角形作为上述基本元素的举例。 In the present example embodiment, as the triangular basic elements.几何转换模块510利用屏幕上切割形成的影砖将这些三角形进行栅格化程序，以取得每个影砖所对应的图块(例如，图2及图3中所绘示，位于影砖(8，5)内三角形110及120分别对应的图块210及220)，换句话说，这些图块是用来组建三维场景的三角形中的一部份，并且为三角形在屏幕上的投影位于影砖中的像素。 Movies brick geometric transformation module 510 using a screen formed by cutting these triangles rasterization process to obtain corresponding tiles each tile Movies (e.g., FIG. 2 and FIG. 3 depicted, located in Movies bricks (8 , 5) within the triangle 110 and 120 corresponding to each block 210 and 220), in other words, these tiles are used to build a three-dimensional scene in the triangular portion, and triangular tiles positioned Movies projected on a screen in pixels.

[0036] 此外，几何转换模块510利用影砖及图块来计算产生绘制遮罩DM、绘制最大景深值ZDmax以及绘制最小景深值ZD MIN。 [0036] Further, by using geometric transformation module 510 calculates Movies brick and tile drawing the mask to produce the DM, the maximum depth value ZDmax drawing and drawing minimum depth value ZD MIN.绘制遮罩DM则如图3及其说明中所述，其可标示出正在绘制的图块在影砖当中的像素位置，在此不再赘述。 DM 3 and drawing the mask is described in the FIG., Which may indicate a pixel position is drawn in the shadow brick tiles among, not described herein again.绘制最小景深值ZDmin则是图块当中的每一个像素与观察者视点(观察者视点例如是Z等于"O"的位置)之间的景深距离的最小值。 Minimum depth from a minimum depth value plotted is ZDmin each pixel block among the point of sight (point of sight, for example, Z is equal to "O" position) between.绘制最大景深值ZDmax则是图块当中的每一个像素与观察者视点之间的景深距离的最大值。 The maximum drawing depth value ZDmax maximum depth is the distance between each pixel block among the sight of the observer.

[0037] 接着，于步骤S620中，粗略景深消隐引擎520获得计算出的绘制遮罩DM、绘制最大景深值ZDmax及绘制最小景深值ZD MIN，并依据绘制遮罩DM、绘制最小景深值ZDmin、绘制最大景深值ZDmax及粗略景深高速缓冲存储器540的相关遮罩、景深信息，进行本发明实施例所述的粗略景深消隐程序，从而决定是否删去相应的图块。 [0037] Next, in step S620, the engine 520 to obtain a rough depth of field blanking drawing mask the DM calculated, and plotted the maximum depth value ZDmax drawing minimum depth value ZD MIN, and drawing the mask based on the DM, the drawing minimum depth value ZDmin plotted and the maximum depth value ZDmax coarse depth cache associated mask 540, the depth information, the depth of field blanking coarse procedure according to embodiments of the present invention, to determine whether the deletion of the corresponding tile.图6步骤S620所述的粗略景深消隐程序亦即本实施例所述的粗略景深消隐方法，其详细致动方法将于图7说明。 Coarse depth concealment method according to the step S620 of FIG. 6 coarse depth blanking procedure described in the present embodiment That is, a detailed method of the actuator 7 will be described in FIG.

[0038] 回到图6的步骤S630，景深缓冲引擎570则可利用未被删去的图块，并配合系统存储器590中的景深缓冲区575来进行一景深缓冲程序，藉以更新影砖中的像素。 [0038] Referring back to FIG. 6 step S630, the buffer depth engine 570 may make use of the tile is not deleted, and the depth buffer with the system memory 590 to a depth 575 spooler, thereby updating the shadow brick pixels.接着，进入步骤S640，像素渲染引擎580依据已更新的影砖像素进行一像素渲染程序，以将已更新的影砖像素显示于图4的显示单元440的屏幕上。 Next, the routine proceeds to step S640, the pixel-pixel rendering engine 580 Movies brick will be updated based on a pixel shaders, shadow brick to the updated pixel on the display screen of the display unit 440 in FIG. 4.

[0039] 在此详细说明本实施例的粗略景深消隐程序，图7是图6的步骤S620的流程图。 [0039] In this detailed description rough depth of field blanking procedure of this embodiment, FIG. 7 is a flowchart of step S620 of FIG. 6.在此以图5的粗略景深消隐引擎520配合图7来说明粗略景深消隐程序。 In FIG 5 a coarse blanking depth engine 520 will be described with FIG. 7 coarse depth of field blanking procedure.

[0040] 于步骤S710中，粗略景深消隐引擎520提供有一粗略景深高速缓冲存储器540，此粗略景深高速缓冲存储器540具有多条高速缓冲线(cache line)，每条高速缓冲线可暂存每个影砖所对应的覆盖遮罩CM、待定最大景深值ZPmax以及输出最大景深值ZO mx。 [0040] in step S710, the depth of field blanking rough engine 520 is provided with a coarse depth cache 540, the cache depth of roughly 540 having a plurality of cache line (cache line), each cache line may be temporarily stored per a shadow mask covered tile corresponding CM, the maximum depth value to be determined and an output ZPmax maximum depth value ZO mx.其中，待定最大景深值ZPmax表示影砖中的各个像素中的每一个像素与观察者视点之间的景深距离的最大值；输出最大景深值ZOmax是该影砖全部画满时使用的一个参数，当影砖中的每一个像素都有不为无穷远的景深值时，将此时待定最大景深值ZP-的值导入输出最大景深值ZOmax,并使用输出最大景深值ZOmax进行后续的过程。 Wherein the determined maximum depth value represents the maximum depth ZPmax distance between each pixel and the viewpoint image tiles in the observer in each pixel; ZOmax outputs the maximum depth value is a parameter used when the entire brick Movies Videos full, when the depth value of each image pixel in the tile has not infinity, the maximum depth value to be determined at this time the value of the input-output ZP- maximum depth value Zomax, and the maximum depth value using the output Zomax subsequent process.图8是粗略景深高速缓冲存储器540中高速缓冲线的字段图，于本实施例中，由于影砖为8X8像素的矩形区域，因此覆盖遮罩CM的字段便为64位(64-bit)，每一位对应一个像素的遮蔽状态，亦即，〃1"表示此像素被遮蔽，而〃0〃则表示此像素未被遮蔽，藉此，便可从覆盖遮罩CM得知已知部分KP (knownpart)的像素位置。待定最大景深值ZPmax以及输出最大景深值ZOmax于本实施例中皆为16位(16-bit)。以图1中的影砖(8，5)为例，由于先计算图块210，所以其对应影砖的覆盖遮罩CM如图3中所示，待定最大景深值ZPmax为0.4，由于影砖(8，5)没有画满，所以暂时不会使用输出最大景深值ZOmax，将其初始设为0，但是本发明不局限于此，由于当影砖画满时，将使用待定最大景深值ZPmax的值导入输出最大景深值ZO MX，初始化的值会被覆盖掉，所以可将输出最大景深值ZOmax的值初始化为任意值。 FIG 8 is a field depth of roughly the cache memory 540 of the cache line, in this embodiment, since the shadow 8X8 pixel tile is a rectangular area, so CM coverage mask field will be 64 bits (64-bit), each bit corresponding to a pixel shading state, i.e., 〃1 "indicates that the pixel is obscured, and this indicates 〃0〃 unmasked pixels, thereby, will be aware of the coverage masks known portion KP CM ( knownpart) pixel position. ZPmax determined maximum depth value and the maximum depth value ZOmax are all output in the present embodiment, 16-bit (16-bit). in FIG. 1 Movies bricks (8,5) as an example, since the first computing block 210, the cover tiles corresponding shadow mask CM shown in Figure 3, the maximum depth value determined ZPmax 0.4, since the Movies bricks (8,5) is not painted over, it does not use the maximum depth value of output Zomax, which is initially set to 0, but the present invention is not limited thereto, since the time when the brick Movies Videos full, the value determined maximum depth value ZPmax introduced outputs the maximum depth value ZO MX, the initialized value will be overwritten, it is possible to output a maximum depth value ZOmax value is initialized to an arbitrary value.

[0042] 若已知部分KP并没有占满整个影砖，如本例中的图块210没有占满整个影砖，则粗略景深测试模块550继续判断已知部分KP的像素位置是否完全包括图块(drawn part)DP的像素位置(步骤S730)，如，在本例中判断图块210 (KP)是否完全包括图块220 (DP)。 [0042] If the known portion does not occupy the entire KP Movies tiles, as the tiles 210 in the present embodiment does not occupy the entire brick Movies, the coarse depth test module 550 continues to determine whether the pixel position is known fully encompasses FIG part KP pixel block position (drawn part) DP (step S730), as in the present embodiment, determination block 210 (KP) comprises a tile is completely 220 (DP).于本实施例中，粗略景深测试模块550可将覆盖遮罩CM及绘制遮罩DM进行一逻辑与(&)。 In the present embodiment, the depth test module 550 may be roughly the coverage mask CM and DM for drawing a mask ampersand (&).若逻辑与的结果等于绘制遮罩DM时，便表示已知部分KP的像素位置已完全包括图块DP的像素位置(由步骤S730进入步骤S732)，如本例中图块210 (KP)完全包括图块220 (DP)。 If the logical AND of the mask is equal to draw DM, it represents a pixel position KP has been completely known portion comprising a pixel position DP tile (the step S730 proceeds to step S732), as in block 210 of the present embodiment (KP) completely including tiles 220 (DP).反之，若逻辑与的结果不等于绘制遮罩DM时，则表示已知部分KP的像素位置并没有完全包括图块DP的像素位置(由步骤S730进入步骤S740)，例如，参见影砖(7，3)。 Conversely, if the logical AND of the mask is not equal to the DM drawing, a known portion of said pixel position KP 'comprising the pixel position does not completely block the DP (the step S730 proceeds to step S740), e.g., see, Movies brick (7 3).

[0044] 相对地，若绘制最小景深值ZDmin并没有大于待定最大景深值ZP mx，则不删去图块DP,并由步骤S732进入步骤S736，粗略景深测试模块550判断图块DP的像素位置是否与已知部分KP的像素位置相同，若步骤S736为否，则直接进入步骤S750。 [0044] In contrast, if the drawing minimum depth value ZDmin not greater than the maximum depth value of pending ZP mx, DP block is not deleted by the step S732 proceeds to step S736, the pixel position of the depth test module 550 determines a rough tile of DP whether the pixel position KP known portion of the same, if the step S736 is NO, the routine proceeds to step S750.相对地，若步骤S736为是，粗略景深更新模块560则将绘制最大景深值ZDmax与待定最大景深值ZP-两者之间的最小值存入并更新待定最大景深值ZPmax (步骤S738)，并进入步骤S750。 In contrast, if the step S736 is YES, the minimum value between the two maximum stored depth value with the determined maximum depth value ZDmax ZP- coarse depth update module 560 updates pending will be drawn and the maximum depth value ZPmax (step S738), and proceeds to step S750.上述步骤S738亦可表示为方程式(I): Step S738 may also be expressed as the above equation (I):

[0048] 接着，在步骤S750中，粗略景深更新模块560便将未被删去(或未被忽略)的图块DP及已知部分KP的联集作为调整后的已知部分KP，藉以更新覆盖遮罩CM。 [0048] Next, in step S750, the depth update the coarse deleting module 560 is not put (ignoring or not) and the union block DP KP known portion of the part KP known as the adjusted, thereby updating coverage mask CM.于本实施例中，粗略景深更新模块560可利用覆盖遮罩CM及绘制遮罩DM的进行一逻辑或(I)后的结果存入覆盖遮罩CM，藉以完成步骤S750。 In the present embodiment, the depth of the coarse update module 560 may utilize the results of the coverage mask drawing the mask DM and CM is a logical OR (I) stored in the CM coverage masks, thereby completing step S750.

[0049] 于本实施例的步骤S760中，若已知部分KP已占满整个影砖时，也就是更新后的覆盖遮罩CM的每个位皆为"Γ时，表示此影砖已没有位于无穷远处的像素，粗略景深更新模块560便可将待定最大景深值ZPmax存入输出最大景深值ZOmxo这时由于整个影砖中所有的像素的景深值都不是无穷远，即该影砖中的每一个像素点都有物体，所以，使用输出最大景深值20_来代表整个影砖的景深，在一些特殊的情况下，会使计算更为简便，下文中将详细描述这种情况。 [0049] in the present embodiment the step S760, if the part KP been known brick occupies the entire film, which is covered with a mask CM updated each bit are "Gamma] time, has no tile indicates Movies pixel located at infinity, roughly depth update module 560 can be stored pending a maximum depth value ZPmax output value ZOmxo maximum depth at this time because the entire shadow brick depth values ​​of all pixels is not infinity, that is, the shadow brick each pixel has an object, therefore, use the output to represent the maximum depth value of the depth of the entire image 20_ brick, in some special cases, makes calculation easier, this case will be described in detail below.

[0050] 藉此，若下次亦由步骤S715中读取此影砖对应的绘制遮罩DM及其绘制最大景深值ZDmax与绘制最小景深值ZD MIN，并判断已知部分KP已占满整个影砖时(步骤S720)，粗略景深测试模块550便可利用绘制最小景深值ZDmin是否大于输出最大景深值ZO „aX (步骤S770)，藉以比较出图块DP是否已被已知部分KP所遮蔽，从而进入步骤S780以直接删去此图块DP。反之，如果步骤S770为否，则尚需进入步骤S730以继续进行此粗略景深消隐方法。 [0050] Accordingly, if increased from the next step S715 reads the corresponding brick in this shadow mask DM and plotted to draw a maximum depth value of the minimum depth value and rendering ZDmax ZD MIN, and determines been known portion occupies the entire KP when Movies brick (step S720), the coarse depth test module 550 can be plotted using the minimum depth value ZDmin whether the maximum depth greater than the output value ZO "aX (step S770), so as to compare whether the tile has been known DP partially masked by KP , directly to the step S780 to the DP for this tile omitted. Conversely, if the step S770 is NO, the process proceeds to step S730 to continue the yet to make a rough depth of field blanking method.

[0051] 另一方面，取决于粗略景深高速缓冲存储器540的容量或是粗略景深高速缓冲存储器540中高速缓冲线的数量，粗略景深高速缓冲存储器540不一定可以将每个影砖的覆盖遮罩CM、待定最大景深值ZPmax及输出最大景深值ZOmax进行暂存。 [0051] On the other hand, depending on the number of coarse depth capacity of the memory cache 540 or the cache memory 540 depth roughly the cache line, the cache depth of roughly 540 may not necessarily each brick coverage masks Movies CM, pending a maximum depth of field and the output value ZPmax maximum depth value ZOmax be temporarily stored.因此，本实施例的粗略景深消隐方法在步骤S760后增加一步骤S790，当粗略景深测试模块550侦测到粗略景深高速缓冲存储器540已满的时候，则将粗略景深高速缓冲存储器540内的数据回存到系统存储器的粗略景深缓冲区525中，使得覆盖遮罩CM、待定最大景深值ZPmax及输出最大景深值ZOmax的相关数据得以保存。 Accordingly, the present concealment method embodiment coarse depth is increased by one in step S790 after step S760, the depth of the test when the coarse rough depth module 550 detects the cache memory 540 is full when the depth of field of the cache memory will be roughly 540 stored data back to system memory coarse depth buffer 525, so that the coverage masks the CM, the maximum depth value to be determined, and outputs the maximum depth value ZPmax ZOmax relevant data can be preserved.

[0052] 基于上述，由于进入步骤S750的情况，例如，执行步骤S738及步骤S740之后，以及当步骤S736为否之时，便无法利用粗略景深消隐方法来进行立体物件的裁剪，因此，本实施例的三维图形处理装置480可于粗略景深消隐引擎520进入S750的同时，利用景深缓冲引擎570来同时执行图6的步骤S630，藉以增加即时图形处理的效能。 [0052] Based on the above, since the case proceeds to step S750, for example, after S740, step S736, and when the crop is NO, the depth of field can not use coarse concealment method for the stereoscopic object and step S738 step, therefore, the present at the same time the three-dimensional graphics processing apparatus 480 may in an embodiment of the coarse depth engine 520 into the blanking S750, the engine 570 using the depth buffer at the same time step S630 of FIG. 6, thereby increasing the effectiveness of the instant graphics processing.于其他实施例中，三维图形处理装置480亦可在图7的步骤S790执行完毕后再执行图6的步骤S630，而不限制于此。 In other embodiments, the three-dimensional graphics processing apparatus 480 may perform step S790 in FIG. 6 is completed before performing the step S630 in FIG. 7, without limiting thereto.

[0053] 本实施例中每条高速缓冲线包括输出最大景深值ZOmax，但并非用以限定本发明，亦可没有此字段数据，则图7的流程图中步骤S720、S760、S770及S780可省略。 [0053] In the present embodiment, each cache line includes a maximum depth value of an output Zomax, but not intended to limit the present invention, this field data may not, in step 7 is the flowchart of FIG S720, S760, S770 and S780 may be omitted.

[0054] 有鉴于此，在此以图9A及图9B作为举例以更加了解本发明实施例，图9A及图9B皆为粗略景深消隐程序的举例及其景深方向示意图。 [0054] In view of this, here in FIGS. 9A and 9B by way of example to better understand the embodiments of the invention, FIGS. 9A and 9B are both a rough depth of field blanking procedure of example Schematic depth direction.图9A及图9B以2X2的影砖作为举例，因此覆盖遮罩CM及绘制遮罩DM_1〜DM_2皆为2X2遮罩。 9A and 9B to the 2X2 Movies brick way of example, thus drawing the mask and the coverage mask CM are all DM_1~DM_2 2X2 mask.请参照图9A，假设高速缓冲线中覆盖遮罩CM为(1，I, I, O)，待定最大景深值ZPmax为"0.4〃，输出最大景深值ZO _为预设的无穷远"F"，并且已知部分KP以覆盖遮罩CM的斜线部分来表示。绘制遮罩DM_1、DM_2皆为(1，I, I, O)，绘制遮罩DM_1对应的绘制最大景深值ZDmax与绘制最小景深值ZD MIN为"0.8"，而绘制遮罩DM_2对应的绘制最大景深值ZDmax与绘制最小景深值ZD MIN为"0.2"。 Referring to Figure 9A, the cache line is assumed that CM is the coverage mask (1, I, I, O), determined as the maximum depth value ZPmax "0.4〃, outputs the maximum depth value of ZO _ a preset infinity" F " and it is known to cover a shield portion KP CM is represented shaded. drawing the mask DM_1, DM_2 are all (1, I, I, O), drawing the mask DM_1 maximum depth value corresponding to the drawing and the drawing minimum ZDmax ZD MIN depth value is "0.8", while drawing the mask drawing DM_2 maximum depth value corresponding to the ZDmax drawing minimum depth value ZD MIN is "0.2."

[0055] 请同时参照图7及图9A，若步骤S715中粗略景深读取模块读取了绘制遮罩DM_1及其绘制最小景深值ZDmin〃0.8〃，由于已知部分KP并未占满整个影砖(步骤S720)，已知部分KP的像素位置完全包括欲更新的图块DP的像素位置(步骤S730)，而绘制最小景深值ZDmin"0.8"大于待定最大景深值ΖΡμχ"0.4"(步骤S732)，由图9A可轻易知晓，欲更新的图块DP_1的像素位置已完全被已知部分KP所包括，因此便需将此图块DP_1删去。 [0055] Please refer to FIGS. 7 and 9A, the depth of a rough step S715 if the read module reads the drawing the mask drawing minimum depth value and DM_1 ZDmin〃0.8〃, since it is known not fill the whole part KP Movies brick (step S720), the pixel position KP fully known portion comprising a pixel position to be updated tile DP (step S730), the minimum depth value plotted ZDmin "0.8" is greater than the maximum depth value determined ΖΡμχ "0.4" (step S732 ), can be easily known from the Figures 9A, the pixel position to be updated tile DP_1 known portion of the KP has been completely included, so they need this block DP_1 omitted.

[0056] 相对地，若步骤S715中读取了绘制遮罩DM_2及其绘制最小景深值ZDMIN〃0.2〃，由于已知部分KP并未占满整个影砖(步骤S720)，已知部分KP的像素位置完全包括了欲更新的图块DP (步骤S730)，绘制最小景深值ZDmin"0.2"并没有大于待定最大景深值ZPmx〃0.4〃(步骤S732)，并且已知部分KP的像素位置与图块DP_2的像素位置相同(步骤S736)。 [0056] In contrast, if the step S715 reads the drawing the mask drawing minimum depth value and DM_2 ZDMIN〃0.2〃, since it is known not occupy the entire part KP Movies brick (step S720), a known portion of the KP pixel position to be fully included in the updated tile DP (step S730), the drawing minimum depth value ZDmin "0.2" is not greater than the maximum depth value ZPmx〃0.4〃 pending (step S732), and the known position of the pixel of FIG part KP DP_2 same pixel position in the block (step S736).藉此，由图9A可知，欲更新的图块DP_2将会描绘在屏幕上，并且影砖中所有的像素位置皆由原先的"0.4"描绘到"0.2"，因此步骤S738将绘制最大景深值ZDmx"0.2"及待定最大景深值ΖΡΜΧ"0.4"两者之间的最小值(亦即，"0.2")存入待定最大景深值ZPmax，并于步骤S750中将覆盖遮罩CM(1，I, 1,0)及绘制遮罩DM(1，I, 1,0)进行联集后的结果(I, I, 1,0)存入覆盖遮罩CM，并可利用图6的步骤S630〜S640来进行景深缓冲程序及像素渲染程序。 Whereby, seen from Figures 9A, the tile to be updated will DP_2 depicted on the screen, and all pixels in the image blocks from the original positions are "0.4" to the drawing, "0.2", thus rendering the step S738 the maximum depth value "0.4" minimum ZDmx "0.2" and the maximum depth value ΖΡΜΧ pending therebetween (i.e., "0.2") is stored in the depth value determined maximum ZPmax, and in step S750 in the coverage masks CM (1, I results step (I, I, 1,0) after, 1,0), and drawing the mask DM (1, I, 1,0) for the union of coverage masks stored in the CM, and to FIG. 6 S630~ S640 to the depth buffer program and pixel shaders.

[0057] 请同时参照图7及图9B，图9A与图9B的不同之处在于，绘制遮罩DM_1、DM_2为(O, O, I, I)。 [0057] Referring to FIG. 7 and FIG. 9B, FIG. 9A and FIG. 9B is different from that drawing the mask DM_1, DM_2 is (O, O, I, I).藉此，若步骤S715中的粗略景深读取模块530读取了绘制遮罩DM_1及其绘制最小景深值ZDmin〃0.8〃。 Whereby, if in step S715 the read module 530 reads a rough depth of drawing the mask drawing minimum depth value and DM_1 ZDmin〃0.8〃.由图9B可知，由于已知部分KP的像素位置并没有完全包括图块DP的像素位置(步骤S730)，因此在进行像素渲染程序后，更新后的已知部分KP的像素会有部分的景深值为"0.4"，另一部分更新的像素(例如影砖右下角的像素)景深值则为"0.8"。 Seen from FIG. 9B, since the pixel position of the part KP known and not completely block including a pixel position DP (step S730), thus making pixel shaders, the pixel portion will be known portion of the updated depth KP value is "0.4", the other part of the updated pixel (e.g. Movies brick bottom right pixel) depth value was "0.8."

[0058] 藉此，于步骤S740中，将绘制最大景深值ZDmx〃0.8〃及待定最大景深值ΖΡΜΧ〃0.4〃两者之间的最大值(亦即，"0.8")存入待定最大景深值ZPmax，并于步骤S750中将覆盖遮罩CM(1, 1，1,0)及绘制遮罩DM(0，0，I, I)进行联集后的结果(I, I, I, I)存入覆盖遮罩CM。 [0058] Accordingly, in step S740, the maximum value of the drawing between the two and the maximum depth value ZDmx〃0.8〃 determined Maximum depth value ΖΡΜΧ〃0.4〃 (i.e., "0.8") stored maximum depth value Pending ZPmax, and in step S750 in the coverage masks CM (1, 1,1,0), and drawing the mask DM (0,0, I, I) a result of (I, I, I, I) after the union deposit coverage mask CM.接着，由于已知部分KP已占满整个影砖，换言之，覆盖遮罩CM为(1，I, I, I)时，则于步骤S760将待定最大景深值ΖΡΜΧ"0.8"存入高速缓冲线的输出最大景深值ZOMX。 Next, when the part KP has been known since the film occupies the entire brick, in other words, for the coverage mask CM (1, I, I, I), then in step S760 the determined maximum depth value ΖΡΜΧ "0.8" is stored in the cache line the maximum depth of the output value ZOMX.

[0059] 相对地，请重新参照图7及图9B，若步骤S715中的粗略景深读取模块530读取了绘制遮罩DM_2及其绘制最小景深值ZDmin〃0.2〃。 [0059] In contrast, re-7 and 9B, the depth of the coarse reading module 530 in step S715 if the read drawing the mask drawing minimum depth value and DM_2 ZDmin〃0.2〃.由图9B可知，由于已知部分KP的像素位置并没有完全包括图块DP的像素位置(步骤S730)，因此在进行像素渲染程序后，更新后的已知部分KP的像素会有部分的景深值为"0.4〃，另一部分更新的像素(例如影砖右下角的像素)景深值则为"0.2〃。 Seen from FIG. 9B, since the pixel position of the part KP known and not completely block including a pixel position DP (step S730), thus making pixel shaders, the pixel portion will be known portion of the updated depth KP value "0.4〃, another portion of the updated pixel (e.g. Movies brick bottom right pixel) depth value was" 0.2〃.藉此，如上面所述，步骤S740将绘制最大景深值ZDmx〃0.2〃及待定最大景深值ZPMX"0.4"两者之间的最大值(亦即，"0.4")存入待定最大景深值ZPmax，并执行步骤S750、步骤S760等相关动作，在此不再赘述。 Whereby, as described above, step S740 is drawn in between the maximum value of the maximum depth value to be determined and the maximum depth value ZDmx〃0.2〃 ZPMX "0.4" (i.e., "0.4") stored maximum depth value determined ZPmax and step S750, step S760 and related actions, are not repeated here.

[0060] 综上所述，本发明实施例在粗略景深缓冲模块中增加了专属的粗略景深高速缓冲存储器，使得在进行粗略景深消隐方法时，能够利用此高速缓冲存储器来降低对于系统主存储器的读写频率。 When [0060] In summary, embodiments of the present invention increases the depth of field dedicated cache memory is a coarse coarse depth buffer module, such that during a rough depth of field blanking method, this can be utilized to reduce the cache memory for the system main memory read and write frequency.换句话说，以往在进行粗略景深消隐方法时，必须经常读写系统存储器中的粗略景深缓冲区。 In other words, the conventional method of performing coarse depth of field blanking, the reader must often rough depth buffer in the system memory.本实施例将粗略景深缓冲区中经常被读写的信息(例如遮罩、景深数据)转移至高速缓冲存储器进行处理，有效地降低对系统存储器的存取次数，因而减少了系统存储器的频宽占用。 This embodiment will buffer the depth information is often rough read (e.g. a mask, depth data) is transferred to the cache memory is arranged to effectively reduce the number of accesses to system memory, thus reducing the bandwidth of the system memory occupancy.

[0061] 虽然本发明已以实施例揭示如上，然其并非用以限定本发明，本领域的技术人员，在不脱离本发明的精神和范围的前提下，可作若干的更动与润饰，故本发明的保护范围是以本发明的权利要求为准。 [0061] While the invention has been disclosed in the above embodiments, they are not intended to limit the invention, those skilled in the art, without departing from the spirit and scope of the present invention, may be made several modifications and variations, therefore, the scope of the present invention is subject to the requirements of the present invention as claimed.

Claims (10)

Translated from Chinese

1.一种景深消隐方法，适用于一三维图形处理装置，该景深消隐方法包括: 提供一景深高速缓冲存储器，该景深高速缓冲存储器位于该三维图形处理装置内部，且独立于一系统存储器之外，其中该系统存储器为一计算机系统存储器或一显示存储器，藉以暂存一屏幕的至少一影砖所对应的一覆盖遮罩以及一待定最大景深值，其中，该屏幕栅格化为多个影砖，该覆盖遮罩表示该影砖中一已知部分的像素位置，且该待定最大景深值为该已知部分中各个像素对应一视点的各个景深值中的最大景深值； 获得依据该影砖及一图块所计算产生的一绘制遮罩、一绘制最大景深值及一绘制最小景深值，其中该图块是组建该三维图形的一平面在该屏幕的投影位于该影砖内的像素，该绘制遮罩表示该影砖中该图块的像素位置，该绘制最小景深值为该图块的投影中各个像素 A depth of field blanking method, for use in a three-dimensional graphics processing apparatus, the depth of field blanking method comprising: providing a depth of field of the cache memory, the cache memory located inside depth of the three-dimensional graphics processing apparatus, and a system memory independent outside, wherein the system memory is a memory of a computer system or a display memory, thereby temporarily storing a coverage mask, and a maximum depth value of the at least one pending Movies brick corresponding to a screen, wherein the screen into multiple grid shadow brick, the coverage mask indicates a pixel position in the tile Movies a known portion, and the determined value of the maximum depth of each pixel of the known depth value corresponding to the maximum depth value of a respective section of viewpoints; obtained according to the shadow mask drawing a tile and a block generated by the calculation, a maximum drawing depth value and a drawing minimum depth value, wherein the block is formed of the three-dimensional pattern in a plane located within the shadow of the projection screen tile pixel, the drawing position of the pixel mask indicates the shadow brick tile, the drawing of the minimum depth value of the pixels of each tile projection应该视点的各个景深值中的最小景深值，该绘制最大景深值为该图块中各个像素对应该视点的各个景深值中的最大景深值； 判断该已知部分的像素位置是否完全包括该图块的像素位置，配合该绘制最小景深值与该待定最大景深值的比较，藉以决定是否删去该图块，并是否更新该景深高速缓冲存储器的该覆盖遮罩以及该待定最大景深值； 当该已知部分的像素位置完全包括该图块的像素位置但是不等于该图块的像素位置的时候，且该绘制最小景深值不大于该待定最大景深值的时候，该待定最大景深值保持不变；以及当该已知部分的像素位置等于该图块的像素位置的时候，且该绘制最小景深值不大于该待定最大景深值的时候，使用该绘制最大景深值与该待定最大景深值之间的最小值来更新该待定最大景深值， 其中该影砖所对应的该覆盖遮罩以及该待定 The minimum depth value should be the depth value of the respective viewpoints of the maximum drawing depth value of each pixel of the tile the maximum depth value of each depth value should viewpoints; determining the position of the pixel portion is completely known in the FIG comprising pixel position of the block, with the minimum depth value comparison drawn with the maximum depth value is determined, so as to determine whether the deleted block, and whether to update the cache depth mask and the coverage value determined maximum depth; when the known position of the pixel portion includes a pixel location of the complete block but not equal to the pixel positions of the tile when the drawing minimum depth value and not greater than the determined maximum depth value, the depth of the maximum value remain pending variants; and when the position of the pixel is equal to the known portion of the pixel block position and the drawing minimum depth value not greater than the determined maximum depth value, the use of the maximum drawing depth value and the maximum depth value to be determined updating the minimum value between the maximum depth value to be determined, wherein the tile corresponds to the shadow mask and cover pending最大景深值是从该系统存储器中获得并且暂存于该景深高速缓冲存储器。 The maximum depth value is obtained from the system memory and temporarily stored in the cache depth.

2.如权利要求1所述的景深消隐方法，决定是否删去该图块包括下列步骤: 当该已知部分的像素位置完全包括该图块的像素位置，且该绘制最小景深值大于该待定最大景深值的时候，删去该图块；以及当该已知部分的像素位置并未完全包括该图块的像素位置，或者当该已知部分的像素位置完全包括该图块的像素位置且该绘制最小景深值不大于该待定最大景深值的时候，则保留该图块，调整该待定最大景深值，并将保留的该图块及该已知部分的联集作为调整后的该已知部分，以更新该覆盖遮罩， 其中，调整该待定最大景深值还包括下列步骤: 当该已知部分的像素位置并未完全包括该图块的像素位置的时候，使用该绘制最大景深值与该待定最大景深值之间的最大值来更新该待定最大景深值。 2. The depth of field blanking method according to claim 1, determines whether the tile includes deleting the steps of: when the pixel location is fully known portion of the tile comprising a pixel position, and the minimum depth value is larger than the drawing pending when the maximum depth value, deleting the tile; and when the pixel location is not fully known portion comprising a pixel location of the tile, or when the known position of the pixel portion includes a pixel location of the complete tile this drawing minimum depth value and not greater than the maximum depth value is determined when the block is retained, pending adjusting the maximum depth value and will keep the union of the tile and after a known portion of the adjustment has known parts, so as to update the coverage mask, wherein adjusting the determined maximum depth value further comprises the steps of: when the pixel location is not fully known portion comprising a pixel position of the tile using the maximum drawing depth value between the maximum value and the maximum depth value to the pending pending update the maximum depth value.

3.如权利要求1所述的景深消隐方法，其中包括: 该景深高速缓冲存储器更暂存该影砖所对应的一输出最大景深值； 当该已知部分占满该影砖时，将该待定最大景深值存入该输出最大景深值；以及当该绘制最小景深值大于该输出最大景深值的时候，删去该图块。 3. The depth of field blanking method according to claim 1, wherein comprising: the depth of a cache memory temporarily storing further outputs the maximum depth value of the corresponding brick Movies; when the shadow of the known brick partially full, will be the determined maximum depth value stored maximum depth value of the output; and when the drawing minimum depth value is greater than the maximum depth of the output value when deleting the tile.

4.一种使用景深消隐方法的三维图形处理方法，适用于一三维图形处理装置以将一三维场景显示于一屏幕，该三维图形处理方法包括: 拆解该三维场景以形成至少一平面，将该屏幕栅格化为多个影砖，以依据至少一个影砖及一图块计算产生一绘制遮罩、一绘制最大景深值及一绘制最小景深值，并将该绘制遮罩、该绘制最大景深值及该绘制最小景深值储存于该三维图形处理装置的一系统存储器，其中该图块是该平面在该屏幕上的投影位于该影砖内的像素，该绘制遮罩表示该影砖中该图块的像素位置，该绘制最小景深值为该图块中各个像素对应一视点的各个景深值中的最小景深值，该绘制最大景深值为该图块中各个像素对应该视点的各个景深值中的最大景深值； 依据该绘制遮罩、该绘制最大景深值、该绘制最小景深值及一景深高速缓冲存储器进行一景 A blanking method using depth of three-dimensional graphics processing method for a three-dimensional graphics processing apparatus to display a three-dimensional scene on a screen, the three-dimensional graphics processing method comprising: disassembling the three-dimensional scene to form at least one plane, the screen grid into a plurality of image tiles, according to at least one of a brick and tile Movies calculated to produce a rendering mask, a maximum drawing depth value of the minimum depth value and a drawing, and the drawing mask, the drawing the maximum drawing minimum depth value and the depth value stored in a memory of the system of three-dimensional graphics processing apparatus, wherein the plane of the tile is projected on the screen pixels located within the image tile, which represents the shadow mask drawn brick pixel position in the tile, the drawing of the minimum depth value of the minimum depth value corresponding to each pixel of each viewpoint of a depth value of the tile, the maximum drawing depth value of each pixel of the tile should respective viewpoints the maximum depth value in the depth value; mask according to the drawing, the maximum depth value of the drawing, the drawing minimum depth value and a depth cache for a scene消隐程序，藉以决定是否删去该图块，其中该景深高速缓冲存储器位于该三维图形处理装置内部，且独立于该系统存储器之外，其中该系统存储器为一计算机系统存储器或一显示存储器，其中该景深高速缓冲存储器暂存该影砖所对应的一覆盖遮罩以及一待定最大景深值，该覆盖遮罩表示该影砖中一已知部分的像素位置，且该待定最大景深值为该已知部分中各个像素对应该视点的各个景深值中的最大景深值； 当确定保留该图块时，依据保留的该图块进行一景深缓冲程序及一像素渲染程序；当该已知部分的像素位置完全包括该图块的像素位置但是不等于该图块的像素位置的时候，且该绘制最小景深值不大于该待定最大景深值的时候，该待定最大景深值保持不变；以及当该已知部分的像素位置等于该图块的像素位置的时候，且该绘制最小景深值不大于 Blanking program, so as to determine whether the deleted block, wherein the depth of the cache memory located inside the three-dimensional graphics processing apparatus, and independent of the system memory, wherein the memory is a system memory of a computer system or a display memory, wherein the cache memory temporarily stores a depth coverage masks and the maximum depth value of a pending corresponding to the tile Movies, the coverage mask indicates a pixel position in the tile Movies a known portion, and the maximum depth value of the pending known part of each depth value of each pixel of the maximum depth value should viewpoints; and when it is determined that the reserved block, performing a depth buffer and a program according to the pixel shaders tile reserved; when the portion of the known complete pixel position of the pixel position comprises a tile, but is not equal to the pixel positions of the tile when the drawing minimum depth value and not greater than the determined maximum depth value when the determined maximum depth values ​​remain unchanged; and when the pixel position is equal to a known portion of the pixel when the position of the tile, and the drawing is not greater than the minimum depth value待定最大景深值的时候，使用该绘制最大景深值与该待定最大景深值之间的最小值来更新该待定最大景深值， 其中该影砖所对应的该覆盖遮罩以及该待定最大景深值是从该系统存储器中获得并且暂存于该景深高速缓冲存储器。 Pending when the maximum depth value, the minimum value between the maximum drawing depth value with the maximum depth value to the pending pending update the maximum depth value, wherein the bricks corresponding to the shadow mask and cover the maximum depth value is determined obtained from the system memory and temporarily stored in the cache depth.

5.如权利要求4所述的三维图形处理方法，其中，该景深消隐程序包括下列步骤: 获得该影砖及该图块所对应的该绘制遮罩、该绘制最大景深值及该绘制最小景深值；以及判断该已知部分的像素位置是否完全包括该图块的像素位置，配合该绘制最小景深值与该待定最大景深值的比较，藉以决定是否删去该图块，并更新该景深高速缓冲存储器的该覆盖遮罩以及该待定最大景深值。 The three-dimensional graphics processing method according to claim 4, wherein the depth of field blanking program comprising the steps of: obtaining the image drawing mask of the tiles and the tile corresponding to the maximum drawing depth value and the minimum draw depth value; and determining whether the pixel positions of the known portion of the pixel position comprises a fully tile, the comparison with the smallest depth value and the maximum depth value of pending drawing, so as to determine whether the deleted block, and updates the depth the coverage masks and the maximum depth value of the pending cache.

6.如权利要求5所述的三维图形处理方法，决定是否删去该图块包括下列步骤: 当该已知部分的像素位置完全包括该图块的像素位置，且该绘制最小景深值大于该待定最大景深值的时候，删去该图块；以及当该已知部分的像素位置并未完全包括该图块的像素位置，或者当该已知部分的像素位置完全包括该图块的像素位置且该绘制最小景深值不大于该待定最大景深值的时候，则保留该图块，调整该待定最大景深值，并将保留的该图块及该已知部分的联集作为调整后的该已知部分，以更新该覆盖遮罩， 其中，调整该待定最大景深值更包括下列步骤: 当该已知部分的像素位置并未完全包括该图块的像素位置的时候，使用该绘制最大景深值与该待定最大景深值之间的最大值来更新该待定最大景深值。 6. The three-dimensional graphics processing method according to claim 5, comprising deciding whether the tile deleting the steps of: when the pixel location is fully known portion of the tile comprising a pixel position, and the minimum depth value is larger than the drawing pending when the maximum depth value, deleting the tile; and when the pixel location is not fully known portion comprising a pixel location of the tile, or when the known position of the pixel portion includes a pixel location of the complete tile this drawing minimum depth value and not greater than the maximum depth value is determined when the block is retained, pending adjusting the maximum depth value and will keep the union of the tile and after a known portion of the adjustment has known parts, so as to update the coverage mask, wherein adjusting the determined maximum depth value further comprises the steps of: when the pixel location is not fully known portion comprising a pixel position of the tile using the maximum drawing depth value between the maximum value and the maximum depth value to the pending pending update the maximum depth value.

7.如权利要求5所述的三维图形处理方法，其中包括: 该景深高速缓冲存储器更暂存该影砖所对应的一输出最大景深值； 当该已知部分占满该影砖时，将该待定最大景深值存入该输出最大景深值；以及当该绘制最小景深值大于该输出最大景深值的时候，删去该图块。 7. The three-dimensional graphics processing method according to claim 5, wherein comprising: the depth of a cache memory temporarily storing further outputs the maximum depth value of the corresponding brick Movies; when the shadow of the known brick partially full, will be the determined maximum depth value stored maximum depth value of the output; and when the drawing minimum depth value is greater than the maximum depth of the output value when deleting the tile.

8.—种使用景深消隐方法的三维图形处理装置，用以将一三维场景显示于一屏幕，该三维图形处理装置包括: 一几何转换模块，拆解该三维场景以形成至少一平面，并将该屏幕栅格化为多个影砖，以依据至少一个影砖及一图块计算产生一绘制遮罩、一绘制最大景深值及一绘制最小景深值，其中该图块是该平面在该屏幕上的投影位于该影砖内的像素，该绘制遮罩表示该影砖中该图块的像素位置，该绘制最小景深值为该图块中各个像素对应一视点的各个景深值中的最小景深值，该绘制最大景深值为该图块中各个像素对应该视点的各个景深值中的最大景株值； 一景深消隐引擎，与该几何转换模块相耦合，用于依据该绘制遮罩、该绘制最大景深值及该绘制最小景深值进行一景深消隐程序，藉以决定是否删去该图块； 一景深缓冲引擎，与该景深消隐引擎相耦 8.- kinds of three-dimensional graphics processing apparatus using the depth of field blanking process, a three-dimensional scene to be displayed on a screen, the three-dimensional graphics processing apparatus comprising: a geometric transformation module, dismantling the three-dimensional scene to form at least one plane, and the screen grid into a plurality of image tiles, according to at least one of a brick and tile Movies calculated to produce a rendering mask, a depth value and the maximum drawing a drawing minimum depth value, wherein the block is in the plane of the a projection screen located on the pixels within the image tile, the mask drawing indicates a pixel position of the shadow of the brick tile, each pixel corresponds to the minimum draw the respective depth value of a depth of field of view of the minimum value of the tile depth value, the largest depth value is plotted on the maximum values ​​of the respective strains view depth value of each pixel in viewpoints should the tile; a depth of field blanking engine, coupled with the geometric conversion module according to the drawing the mask the drawing depth value and the maximum depth value for rendering a minimum depth of field blanking procedure, so as to determine whether the tile omitted; a buffer depth engine, the engine is coupled blanking depth，用于当确定不删去该图块时，依据该图块进行一景深缓冲程序，以更新该影砖的像素；以及一像素渲染引擎，与该景深缓冲引擎相耦合，依据更新的该影砖的像素进行一像素渲染程序， 其中，该景深消隐引擎包括: 一景深读取模块，从一系统存储器中获得该影砖及该图块所对应的该绘制遮罩、该绘制最大景深值及该绘制最小景深值； 一景深高速缓冲存储器，与该景深读取模块相耦合，用于暂存该影砖所对应的一覆盖遮罩以及一待定最大景深值，该覆盖遮罩表示该影砖中一已知部分的像素位置，且该待定最大景深值为该已知部分中该些像素的最大景深值，其中该景深高速缓冲存储器位于该三维图形处理装置内部，且独立于该系统存储器之外，其中该系统存储器为一计算机系统存储器或一显示存储器； 一景深测试模块，与该景深读取模块以及该景 , When it is determined that the block is not deleted, it was based on a depth buffer for that tile program to update the pixels of the image tiles; pixels and a rendering engine, is coupled to the depth buffer engine, according to the updated Movies a brick pixel pixel shaders, wherein the depth of field blanking engine comprising: a reading module depth of field, obtaining the shadow of the tiles and the tile drawn from a mask corresponding to the system memory, the maximum drawing depth value the drawing depth and the minimum value; a depth cache to the depth reading module coupled to, for temporarily storing the image corresponding to a tile coverage masks and the maximum depth value of a pending, the coverage mask indicates the Movies pixel positions in a known portion of the tile, and the maximum depth of the pending portion of the plurality pixel value is the maximum depth value is known, wherein the depth of the cache memory located inside the three-dimensional graphics processing apparatus, separately from the system memory and outside, wherein the system memory is a memory of a computer system or a display memory; a depth test module, the read module and the scene depth深高速缓冲存储器相耦合，用于判断该已知部分的像素位置是否完全包括该图块的像素位置，配合该绘制最小景深值与该待定最大景深值的比较，藉以决定是否删去该图块；以及一景深更新模块，与该景深测试模块以及该景深高速缓冲存储器相耦合，用于依据该景深测试模块的决定结果来更新该景深高速缓冲存储器的该覆盖遮罩以及该待定最大景深值，其中当该已知部分的像素位置完全包括该图块的像素位置但是不等于该图块的像素位置的时候，且该绘制最小景深值不大于该待定最大景深值的时候，该景深更新模块将该待定最大景深值保持不变； 当该已知部分的像素位置等于该图块的像素位置的时候，且该绘制最小景深值不大于该待定最大景深值的时候，该景深更新模块使用该绘制最大景深值与该待定最大景深值之间的最小值来更新该待定最大景 SZE coupled to the buffer memory, for determining whether the pixel positions of the known portion of the pixel position comprises a fully tile, comparing with the minimum depth value and the maximum depth value of the pending drawing, so as to determine whether the tile omitted ; and a depth update module, coupled with the depth of the depth test module and the cache memory, according to the decision result of the depth test module to update the cache memory of the depth mask and the coverage value determined maximum depth, wherein when the known position of the pixel portion includes a pixel location of the complete block but not equal to the pixel positions of the tile when the drawing minimum depth value and not greater than the determined maximum depth value, the depth update the module the determined maximum depth values ​​remain unchanged; when the pixel location is equal to the known portion of the tile pixel position, and the drawing minimum depth value not greater than the determined maximum depth value, the depth of the module to update the drawing the maximum and minimum depth value to be determined between the maximum depth value to update the pending largest King深值；以及该影砖所对应的该覆盖遮罩以及该待定最大景深值是从该系统存储器中获得并且暂存于该景深高速缓冲存储器。 Depth value; and the pending coverage masks and the maximum depth value corresponding to the Movies tile is obtained from the system memory and temporarily stored in the cache depth.

9.如权利要求8所述的三维图形处理装置，其中: 当该已知部分的像素位置完全包括该图块的像素位置，且该绘制最小景深值大于该待定最大景深值的时候，该景深测试模块删去该图块；以及当该已知部分的像素位置并未完全包括该图块的像素位置，或者当该已知部分的像素位置完全包括该图块的像素位置且该绘制最小景深值不大于该待定最大景深值的时候，则该图块保留，该景深更新模块调整该待定最大景深值，并将保留的该图块及该已知部分的联集作为调整后的该已知部分，以更新该覆盖遮罩， 其中，当该已知部分的像素位置并未完全包括该图块的像素位置的时候，该景深更新模块使用该绘制最大景深值与该待定最大景深值之间的最大值来更新该待定最大景深值。 9. The three-dimensional image processing apparatus according to claim 8, wherein: when the pixel location when fully known portion comprising the pixel positions of the tile, and the drawing minimum depth value is greater than the determined maximum depth value, the depth deleting the test module tile; and when the pixel location is not fully known portion comprising a pixel location of the tile, or when the known position of the pixel portion includes a pixel location of the complete block and the drawing of the minimum depth value is not greater than the determined maximum depth value when the reserved block, the depth of the pending update module adjusts the maximum depth value, and the union of the known tile portion and retained as the adjustment of the known section to update the coverage mask, the draw between the maximum depth value with the depth value determined maximum wherein, when the position of the pixel is not fully known portion comprising the pixel positions of the tile, the depth update module the maximum value of the pending update to a maximum depth value.

10.如权利要求8所述的三维图形处理装置，其中该景深高速缓冲存储器更暂存该影砖所对应的一输出最大景深值，当该已知部分占满该影砖时，该景深更新模块将该待定最大景深值存入该输出最大景深值，以及当该绘制最小景深值大于该输出最大景深值的时候，景深测试模块删去该图块。 10. The three-dimensional graphics processing apparatus according to claim 8, wherein the depth of the cache memory temporarily stores a greater output value of the maximum depth of the tile corresponding Movies, when the shadow of the known brick partially full, the depth update the module determined maximum depth value stored in the depth value of the maximum output, and when the drawing minimum depth value is greater than the maximum depth of the output value, the depth test module deleting the tile.