WO2006073131A1 - 描画装置及び描画方法 - Google Patents

描画装置及び描画方法 Download PDF

Info

Publication number
WO2006073131A1
WO2006073131A1 PCT/JP2005/024214 JP2005024214W WO2006073131A1 WO 2006073131 A1 WO2006073131 A1 WO 2006073131A1 JP 2005024214 W JP2005024214 W JP 2005024214W WO 2006073131 A1 WO2006073131 A1 WO 2006073131A1
Authority
WO
WIPO (PCT)
Prior art keywords
self
display
information
display information
buffer
Prior art date
Application number
PCT/JP2005/024214
Other languages
English (en)
French (fr)
Inventor
Shuhei Kato
Koichi Sano
Koichi Usami
Original Assignee
Ssd Company Limited
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 Ssd Company Limited filed Critical Ssd Company Limited
Priority to EP05822791A priority Critical patent/EP1847965A4/en
Priority to CN2005800480027A priority patent/CN101116112B/zh
Priority to JP2006550871A priority patent/JP4725741B2/ja
Publication of WO2006073131A1 publication Critical patent/WO2006073131A1/ja
Priority to US12/108,393 priority patent/US20080273030A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining

Definitions

  • the present invention relates to a drawing apparatus and related technology capable of displaying a high-quality three-dimensional image without using a frame buffer.
  • a memory having a capacity for storing at least one entire image becomes indispensable, and the cost increases. If a double buffer method is used to display a high-quality three-dimensional image, a memory that can hold at least two frame buffers is required, which further increases the cost.
  • the line buffer that needs the frame buffer is sufficient until the secondary image is displayed.
  • the rendering capability of the conventional imaging device is limited to the number of polygons that can be drawn, such as a high-quality display that satisfies the viewer. I have trouble doing so.
  • an object of the present invention is to eliminate a drawing apparatus and related technology capable of displaying a high-quality three-dimensional image while using a small amount of drawing buffer. .
  • Another object of the present invention is to provide a semi-transparent composition while using a drawing buffer with a small storage capacity, enabling a higher quality display and display of a three-dimensional image. «Bi Doing related skills.
  • Another object of the present invention is to enable display of a high-quality three-dimensional image while using a small amount of buffer for drawing even when displaying by interlaced scanning. To do drawing equipment and related technologies. Disclosure of the invention
  • the drawing apparatus has a polygonal graphic on a screen configured by arranging a plurality of parallel lines each composed of a plurality of pixels in a direction perpendicular to the lines.
  • a drawing device that performs drawing for displaying a screen image composed of a combination of disgusting graphic elements based on display information for each graphic element, and includes tif self graphic elements included in IflB display information.
  • Sort means that rearranges the lift display information for each graphic element such that coordinates indicating the position in the direction perpendicular to the selfish line are arranged in either ascending or descending order, and Itrt self-sorting means are arranged. Read the changed ttrlB display information in order and draw the corresponding self graphic element based on the read self display information. And, equipped with a.
  • the display information for each graphic element is rearranged so that the coordinates indicating the position in the direction perpendicular to the line of the graphic element are arranged in ascending order V or descending order. /, Ru (sort). Therefore, since it is only necessary to read out the display information after sorting in order and perform the drawing process, there is no need to search the display information to be drawn at that time from all the display information each time drawing is performed. Therefore, the processing can be speeded up. As a result of the above, it is not necessary to implement a large-capacity buffer (such as a frame buffer) to store an image of one frame or more.
  • a large-capacity buffer such as a frame buffer
  • V means ordering from small to large.
  • a first buffer for example, corresponding to the line buffers LB1 and LB2 in FIG. 1 for storing new pixel information for displaying the screen image at a position where the screen image is displayed, and a second predetermined number of the graphic elements.
  • the WIS pixel information based on the self display information is stored in the first puffer, other pixel information based on the display '[ «
  • the display information is put in the crane in the order that it is sent for reuse, and the first tiff buffer is moved forward »f
  • the second buffer (for example, equivalent to the recycle notifier 110 in Fig. 1) that outputs the disgust display information in the order in which the pixel information is included when the period that includes the pixel information arrives, and the self-sorting means rearrange the data.
  • the self-indication information read out in the same order
  • the display information included in the display information for generating the hateful pixel information and the output from the second buffer The display information included in the self-display information is compared with the information, and according to a predetermined summary, one of the key self-display information 3 ⁇ 41 is selected and output from the comparison means and the self-comparison means.
  • writing new pixel information to the first buffer (display information can be reused for drawing new pixels). For this reason, every time a new pixel is drawn that uses the same display information, all the display information after sorting is edited, and it is not necessary to repeatedly read out the same display information from the memory. Processing speed can be increased.
  • a comparison means is provided, and a display newly read out in the order in which the sorting means is rearranged ',
  • the display information stored in the second buffer for reuse and the drawing order (that is, the hixel drawing order based on the display information) are determined. For this reason, after the judgment is completed, the reusable display information is simply sent to the second buffer and shelved in order, and the reusable display information is displayed on the second buffer by appropriate drawing fermentation.
  • ' ⁇ is enshrined. In this way, the second buffer contains the reusable display “ ⁇ ” in an appropriate drawing order.
  • the self-sort sort means displays self-display for the plurality of graphic elements
  • the display depth information included in the information is arranged in ascending order of display depth indicated by the display depth information, and the self-display information is arranged in either descending order.
  • a plurality of graphic elements are displayed, and the coordinates of the plurality of graphic elements are the same as the D3 ⁇ 4 ⁇ , and in each line constituting the screen, the display ⁇ g is either in ascending order or descending order.
  • the display information is arranged. Therefore, in each line, the graphic elements based on the display information are drawn with a large display depth and a certain order! /, Which are small and in order. If the display information is arranged in ascending order of display depth, graphic elements are drawn in the order of decreasing display depth. Therefore, if the display is large, the graphic element is not displayed in time. The impression of later appearance can be improved.
  • the display elements arranged in descending order of display depth can be performed in a semi-transparent composition since the graphic elements are drawn in the order of display size. This is because the drawing color of the translucent graphic element depends on the drawing color of the graphic element in the back of the graphic element, so that it is necessary to draw the graphic elements in order from the back.
  • the pixels that should be displayed on the first line of the clean ⁇ ⁇ ⁇ tiff self graphic element 3 ⁇ 4 ⁇ age, ⁇ 3 The sorting means will not change the size of the tiff self coordinate for the multiple graphic elements.
  • Relevant ⁇ tfff self display depth in either ascending order or descending order Line up the news.
  • the display information is arranged.
  • the graphic element based on the display information is drawn with either the largest display depth! /, In the order of objects, or in the order of objects in the order of objects.
  • the display information is sorted in display coordinate order (coordinate order indicating the position of the graphic element in the direction perpendicular to the line), and those with the same display coordinates are sorted in display depth order. In this case, drawing in ascending or descending order of the display depth is not necessarily guaranteed.
  • drawing in the order of display depth can be performed from the first line.
  • the effect of arranging in ascending order of display depth and the effect of arranging in descending order are the same as above.
  • the tirts means notifies the selfish drawing means of the completion of the rearrangement of the predetermined number of selfish display elements of the selfish graphic elements, and the self drawing means. Receives the notification from the sorting means, and sequentially reads the display information that has been sorted.
  • self-indication information of self-graphic elements corresponding to one's own part is self-display information of one tiff self-graphic element.
  • the selfish drawing means further includes a third buffer (for example, equivalent to the prefetch buffer 108 in FIG. 1) in addition to the first buffer and the second buffer.
  • the display information of the graphic elements for a predetermined number of 3 can be stored in a car
  • the MI self-display information that is read out in the order in which the steps are rearranged is carried in the order in which they are read out.
  • Tin self-display information for generating new pixel information is output in the order of the crane, and the self-comparison means includes display depth information included in the self-display information output from the key self third buffer and Compared with the display depth information included in the self-indication display output from the second buffer in the order that they were sent for reuse, and according to the predetermined IJ , V, Misalignment display information 3 ⁇ 41 is selected and output first.
  • the third buffer force S is provided, and this third buffer is a buffer mechanism between the input timing of the display information in the order sorted by the sorting means and the output timing of the display to the comparison means. is there.
  • the waiting time for the drawing means for inputting the display information in the order in which the sorting means sorts can be reduced.
  • the predetermined hate ij is to select the selfish display information including the selfish display depth information indicating a large selfish display key as a result of the selfishness ratio.
  • the tfrtfii mark of the graphic element when the key self-sorting means categorizes the reordering with the above drawing device is the coordinate of the vertex of the tin graphic element, which is either the largest coordinate or the smallest coordinate. is there.
  • the first puffer is a buffer that stores a plurality of ttff self-pixel information constituting at least one selfish line.
  • the frame buffer is shelved: cost can be kept lower than ⁇ .
  • cost can be kept lower than ⁇ .
  • the selfish sort means sorts the selfish display information into a heap sort. Prune more.
  • the self-sorting means is independent of the self display information for displaying polygons as tins graphic elements and the tiff self display information for displaying sprites as tiff self graphic elements. Save the time.
  • the drawing means includes Ml display information for the ItlfB polygon rearranged by the dislike sort means, and ⁇ display information for the previous IB ⁇ bright sorted by the sort means, Sorting by the self sorting means is further included a merge sorting means for performing a merge sort according to IJ.
  • the display information group for polygons and the display information group for sprites are merge-sorted before drawing processing. Appropriate drawing processing is possible.
  • the drawing apparatus has a polygonal shape on a screen configured by arranging a plurality of parallel lines each composed of a plurality of pixels in a direction perpendicular to the lines.
  • a drawing device that draws to display a screen image consisting of a combination of it's own graphic elements by interlaced scanning based on display information for each graphic element.
  • the display information for each graphic element is sorted according to the first ⁇ lj, and the display information for each graphic element is displayed in the second subdivision to display the field.
  • the display information rearranged by the sorting means for the display is ordered.
  • the sorting means has rearranged the display.
  • the self-display information is sequentially read out, and based on the read self-display information, a drawing means for drawing a corresponding self-graphic element is provided.
  • Self-display for each graphic element so that the coordinates indicating the position of the tiff self-graphic element in the direction perpendicular to the self-line included in the self-display information are arranged in ascending order or descending order.
  • the flBffi mark indicates the odd-numbered line to be scanned or the previous even-numbered line.
  • Ascending order of display depth indicated by the display depth information included in the report is to arrange the disliked display information in the descending order, and the disliked second IJ is included in the disgusting display information, ttff
  • the flfl mark is the even in or the one before that.
  • the dislike mark is the same, and the display depth information indicated by the display depth information included in the self display information is in ascending order or descending order! / If you are misplaced, display your dislikes.
  • the following operational effects are obtained.
  • Display information indicating the line where the display coordinates (coordinates indicating the position of the graphic element in the direction perpendicular to the line) are skipped by interlaced scanning
  • display information indicating the line where the display coordinates are the drawing line are displayed text. Both are read out during the drawing process of the line.
  • the display coordinates indicated by these display information are regarded as the same value, and the display processing in the display depth order is assured even with interlaced scan ⁇ : by sorting into display Fukaka jet.
  • the effect of arranging in ascending order of display depth and the effect of arranging in descending order are the same as above.
  • the ttrt self-drawing means can edit the pixel information of the first part of the tin self-pixels that make up the ttna clean, and display the clean tiriB pixel information in the crane.
  • a first buffer that displays a new pixel '! F3 ⁇ 4 to display the ttilS clean image at the position where the output pixel information was edited, and a second predetermined number of the graphic elements.
  • the display information can be stored in the memory, and after the pixel information based on the display information is transferred to the first buffer, another pixel is displayed based on the display information.
  • the display is reusable, the display information is stored in the order that it is sent for reuse, and the disgust first buffer stores the new pixel information.
  • the second buffer that outputs selfish display information in the order in which it was stored and the selfish strange field are displayed in order of storage.
  • Lift display information to generate pixel information The self-display depth information included is compared with the self-display depth information included in the self-display information output from the second buffer of the ttif self, and V Self-display information 3 ⁇ 41 selected and output first, and ttif self-pixel information is generated based on self-display information output from self-comparison means, and the above pixel information is stored in the tine first buffer. And writing means for writing.
  • the second buffer and the comparing means similar to the second buffer and the comparing means added to the invention according to the first aspect are provided. For this reason, the same effect as that of 3 ⁇ 4 ⁇ is obtained.
  • Pixels to be displayed are not sorted in the order of pixels, and the second and second fffl are not used, and for multiple graphic elements, either in ascending or descending order of the ttriB display depth. Arrange display information.
  • a plurality of graphic elements have the same ⁇ U as the rearrangement ⁇ ⁇ ⁇ ⁇ U of the pixels to be displayed on the first line of the screen. Speak. For this reason, the same effect is obtained.
  • the sorting of the display information of the S graphic elements in the place: ⁇ minutes (preferably one) is completed.
  • the self-sorting for displaying the self-interest field starts the clause immediately after the start of the vertical blanking period immediately before displaying the even field.
  • the drawing means can perform the drawing process without waiting for the completion of the sorting.
  • the vertical blanking period can be started immediately. Since the sorting starts later, it is possible to secure a sufficient time with a margin for the arithmetic processing before the sorting.
  • FIG. 1 (a) is an exemplary diagram of polygons # 0 to # 7 displayed on the screen SCR for explaining the sorting rule 1 that the YSU 19 is in accordance with the difficulty of the present invention.
  • Figure 1 (b) shows an example of sorting according to Sort Rule 1.
  • Figure 2 (a) is displayed on screen S0R to explain Sort Rule 2 where YSU19 is purple.
  • FIG. 6 is an exemplary diagram of polygons # 0 to # 7.
  • Figure 2 (b) is an illustration of sorting according to Sort / Rail 2.
  • FIG. 3 (a) is an illustration of polygons # 0 to # 7 displayed on the screen SCR for explaining the sorting rule 3 provided by YSU19.
  • Figure 3 (b) is an illustration of sorting according to sort rule 3.
  • FIG. 4 is an explanatory diagram of the front part of the RPU 19 according to the embodiment of the present invention.
  • FIG. 5 (a) is an example of polygons displayed on the screen SCR for explaining the processing of the prefetch buffer 108, the recycle buffer 110, and the depth comparator 112 of the RPU 9.
  • Fig. 5 (b) shows an example of the sorting result by YSU19 as the pre-processing of the drawing process by RPU9.
  • FIG. 6 (a) is a diagram illustrating the in-cabinet states of the prefetch buffer 108 and the recycle buffer 110 immediately after the drawing for displaying the previous line of the line Lc in FIG. 5 (a) is completed.
  • FIG. 6B is a diagram showing the flow of the polygon structure instance when pixels corresponding to the polygons # 1, # 2, and # 4 are drawn on the line Lc.
  • Fig. 6 (c) is a diagram showing the flow of Polygo: / «Build # ⁇ stance when drawing the corresponding pixels of polygons # 1, # 2 and # 4 on line Lc.
  • FIG. 6D is a diagram showing the flow of the polygon structure instance when the corresponding pixels of the polygons # 1, # 2, and # 4 are drawn on the line Lc.
  • FIG. 6 (e) is a diagram showing the internal state of the prefetch buffer 108 and the recycle buffer 110 immediately after the drawing for displaying the line Lc is completed.
  • FIG. 7A is a diagram showing a state in which the polygon structure instances # 0, # 3, # 1 and # 2 of FIG. 5B are stored in the prefetch buffer 108.
  • FIG. FIG. 7 (b) is a diagram showing the flow of the polygon structure # ⁇ stance when the corresponding pixels of polygons # 0 and # 3 in FIG. 5 (a) are drawn on the line La.
  • FIG. 7 (c) is a diagram showing the flow of the polygon structure instance when the corresponding pixels of polygons # 0 and # 3 in FIG. 5 (a) are drawn on the line La.
  • FIG. 7 (d) is a diagram showing the flow of the polygon structure material until the display final line Lb of polygons # 0 and # 3 is drawn.
  • Fig. 7 (e) shows the polygon structure instance in the drawing of the final display line Lb of polygons # 0 and # 3.
  • FIG. 7 (e) shows the polygon structure instance in the drawing of the final display line Lb of polygons
  • FIG. 8 is an explanatory diagram of sort rule 4 by YSU19 for displaying by interlaced scanning.
  • Figure 9 (a) is an explanatory diagram of ⁇ sorting at interlaced scan at mode 1 timing.
  • Fig. 9 (b) is an explanatory diagram of ⁇ , which performs the sort processing for displaying by interlaced scanning at the timing of mode 2.
  • FIG. 10 is a block diagram showing an internal configuration of the multimedia processor 1 according to the embodiment of the present invention.
  • FIG. 11 is a flowchart showing an overview of the flow of graphics processing by the multimedia processor 1 of FIG.
  • FIG. 12 is a block diagram showing the internal configuration of the RPU 9 of FIG.
  • FIG. 13 is a diagram showing a configuration of a polygon structure in the texture mapping mode.
  • FIG. 14 is a diagram showing the structure of the texture attribute structure.
  • FIG. 15 is a diagram showing a configuration of a polygon structure in the Gouraud shading mode.
  • FIG. 16 (a) is a diagram showing the configuration of the sprite structure when scissoring is disabled.
  • FIG. 16 (b) is a diagram showing the configuration of the sprite structure when scissoring is enabled.
  • FIG. 17 is an explanatory diagram of processing performed by the slicer 118 on the polygon in the Gouraud shading mode.
  • FIG. 18 is an explanatory diagram of processing for the polygon in the texture mapping mode by the slicer 118.
  • FIG. 19 is an explanatory diagram of the processing performed by the slicer 118 on the sprite. .
  • FIG. 20 is an explanatory diagram of dithering by the pixel dither 122.
  • FIG. 21 is an explanatory diagram of pilinear filtering by the nonlinear filter 130.
  • FIG. 22 is a diagram showing the heap structure after completion of the Y sort of array A by YSU19 in FIG.
  • Figure 23 shows the heap structure of Figure 22 to the main RAM 25! It is explanatory drawing of a method.
  • FIG. 24 is a flowchart showing an example of the overall flow of the Y sort processing of the polygon structure array by YSU 19 of FIG.
  • FIG. 25 is a flowchart showing an example of the heap construction process in step S21 of FIG.
  • FIG. 26 is a flowchart illustrating an example of the flow of the down heap process.
  • FIG. 27 is a flowchart showing an example of the first rank ratio. Best Mode for Invention
  • Y sorting unit hereinafter, referred to as" YSU " .
  • Sort by 19 (sometimes called "Y sort").
  • the sort sequence is each element of the structure array.
  • the structure array is a polygon structure array (hereinafter referred to as a polygonal graphic element for representing the shape of each surface of a 3D solid projected onto a 2D space.
  • sprite structure array a sprite structure ⁇ ⁇ ⁇ (hereinafter referred to as “sprite structure array”), which is a rectangular graphic element on the screen, and the main RAM (random access memory) described later.
  • the element of the polygo structure array is “polygon structure material instance”, and the element of the sprite structure array is “sprite structure! However, when there is no need to distinguish between the two, it is sometimes simply called “Structure #rstance”.
  • Each polygon structure stored in the crane in the polygon structure array contains display information for each polygon (vertex coordinates on the screen, information on texture patterns in texture mapping mode, color data in single bite shading mode) (RGB color components G) 3 ⁇ 4 ⁇ Mu. ), And one polygon structure instance corresponds to one polygon.
  • Each sprite structure instance enclosed in the sprite structure array is displayed information for each sprite.
  • one sprite structure corresponds to one sprite. These will be described in detail later.
  • the two-dimensional coordinate system used for actual display on a display device is called the screen coordinate system.
  • the screen coordinate system is composed of a two-dimensional pixel array of 2048 pixels in the horizontal direction and 1024 pixels in the vertical direction.
  • the coordinate origin is at the upper left, and corresponds to the positive of the horizontal right force 3 ⁇ 4 axis and the positive of the vertical downward force axis.
  • the actual displayed area is a part of the space, not between: ⁇ in the screen coordinate system. This display area is called the screen.
  • FIG. 1 (a) is an exemplary diagram of polygons # 0 to # 7 displayed on the screen SCR for explaining the sorting rule 1 that the YSU 19 implements.
  • Figure 1 (b) shows an example of sorting according to Sort Rule 1.
  • the polygon structure array PS includes the polygon structures # 0 to # 7 corresponding to the polygons # 0 to # 7 in FIG. 1 (a).
  • Corresponding polygons and polygon structure materials are denoted by the same reference numerals.
  • YSU19 sorts polygon structures # 0 to # 7 in ascending order of the coordinates of polygons # 0 to # 7. This: ⁇
  • the smallest coordinate among the three coordinates of the three vertices of the polygon (hereinafter referred to as the “minimum coordinate”) is the coordinate of the polygon used in this rearrangement.
  • the polygon structure instances # 0 to # 7 are rearranged in ascending order of the minimum coordinates.
  • sort rule 1 rearranging the polygon structure materials in ascending order of the minimum coordinate.
  • FIG. 2 (a) ′ is an exemplary diagram of polygons # 0 to # 7 displayed on the screen SCR for explaining the sort rule 2 that the YSU 19 performs.
  • Figure 2 (b) shows an example of sorting according to Sort Rule 2.
  • the minimum Y coordinates of polygons # 0, # 1, and # 7 are all "Ys" and are the same.
  • This ⁇ , YSU19 has a large depth value in each polygon structure #rstance # 0, # 1, and # 7! Reorder each polygo instance # 0, # 1, and # 7 in order.
  • the depth value (sometimes referred to as “display depth information”) is information indicating the age at which the pixels to be drawn overlap and the power to draw which pixel first, and the larger the value, the earlier (back Drawn), the smaller the value, the later (fore). That is, the larger the depth value, the deeper the screen SCR is displayed, and the smaller the value! /, The front is indicated.
  • sorting rule 2 is to arrange each polygon structure stance in descending order of the depth value.
  • YSU19 considers multiple polygons with pixels displayed in the first line of the screen SCR to be the same even if they have the minimum Y coordinate, and follows the sorting rule 2 that is not the sorting rule 1. Sort each polygon structure instance. In other words, if there are multiple polygons with pixels displayed on the first line of the screen SCR ⁇ 1, the minimum Y coordinate is assumed to be the same (that is, regardless of the minimum Y coordinate value), and the depth value is large. Sorted in the order of the records. This is called sort rule 3.
  • FIG. 3 (a) is an exemplary diagram of polygons # 0 to # 7 displayed on the screen SCR for explaining the sort rule 3 that YSU19 uses.
  • Figure 3 (b) shows an example of sorting according to Sort Rule 3.
  • the minimum Y coordinate of polygons # 2, # 5, and # 7 with pixels' displayed in the first line of the screen SCR is as follows. This is YSU19; Polygon # Assuming that the minimum Y coordinate of # 2, # 5, and # 7 is the same, the depth values included in instance # 2, # 5, and # 7 are larger in order, and each polygon structure Sort instances # 2, # 5, and # 7.
  • Sort No. 1 is to sort each polygon structure # ⁇ instance in descending order of the depth value.
  • the above sort rules 1 to 3 are also applied when rearranging the sprite structure instances of the sprite structure array.
  • the minimum ⁇ coordinate of the sprite is the smallest ⁇ coordinate among the ⁇ coordinates of the four vertices of the sprite.
  • the size of the polygon structure is 128 bits, and the size of the sprite structure is 64 bits.
  • the rearrangement of the structure material is performed separately for the polygon structure array and the sprite structure array.
  • sort rule 1 For comparison, every time each line is drawn, the polygon structure instance and sprite structure instance to be drawn on the corresponding line are also searched for all polygon structure material instances and the prerite structure instance force. Assume to do. In this comparative example, every polygon drawing and all polygon structure instances and bright structures need to be searched, and high-speed processing cannot be performed and many polygons and sprites cannot be displayed. Thus, there are also 3 ⁇ 4 ⁇ that cannot display a sufficient 3D image.
  • each polygon structure and each bright structure instance are sorted in advance in ascending order of the minimum coordinate, so that each polygon structure after sorting is sorted. It is only necessary to read the structure and the sprite structure in order and perform the drawing process. At this time, the structure instance force that the minimum Y coordinate is larger than the Y coordinate of the drawing 3 ⁇ 4 ⁇ position is read from the sorted structure array, but the drawing process of the line is stopped, so that unnecessary structure ⁇ instance It is not necessary to perform the search process. As a result, the search process as in the comparative example is not required, the processing speed can be increased, a large number of polygons and sprites can be displayed, and a sufficient tertiary image can be displayed. It becomes possible.
  • the depth value of the structure instance read from the sorted structure array is compared with the depth value of the buffer capacity for reuse and the read structure strength. Since there is a mechanism that draws structure instances with depth and depth values first, the depth value is always large for all structural materials by sorting rules 2 and 3! /, Can guarantee to draw from things.
  • Each structural material instance after sorting by YSU 19 is read from main RAM 25 into a rendering processing unit (hereinafter referred to as “RPU”) 9 for use in drawing processing.
  • RPU rendering processing unit
  • the preceding process of the drawing process will be described.
  • writing data to the line buffer LB1 or LB2 described later is called drawing.
  • Each line buffer LB1 and LB2 stores the pixel data corresponding to one line of the screen in H.
  • FIG. 4 is an explanatory diagram of the front part of the RPU 19 according to the embodiment of the present invention.
  • the RPU 19 includes a prefetch buffer 108, a recycle buffer 110, and a depth comparator 1123 ⁇ 4r ⁇ in the preceding stage.
  • the prefetch buffer 108 is a FIFO (first-in-first-out) structure buffer that sequentially reads the sorted structural instances from the main RAM 25 and outputs the structured material instances in the read order. That is, the structure instances are stored in the prefetch buffer 108 in the order rearranged by the YSU 19. The included structure instances are output in the order they were edited in the drawing cycle for the display of the corresponding polygon or sprite.
  • the prefetch buffer 108 is prepared as a buffer mechanism for the input timing from the main RAM 25 and the output timing to the depth comparator 112. This is because the main RAM 25 is connected to a functional unit other than the RPU 19, so that a waiting time occurs in acquiring data from the main RAM 25 6.
  • the recycle buffer 110 is a FIFO buffer that contains structure instances that can be shelfd (ie, reused) in the next rendering cycle. Therefore, the structure instance stored in the recycle buffer 110 is used in the next drawing cycle.
  • One drawing cycle is a drawing period for displaying one line. In other words, in one drawing cycle, all data necessary for displaying the corresponding line is drawn according to the level of the line buffer LB1 'or LB2. It is a period.
  • the depth in comparator 112 compares the depth value contained in the structure instance fetched from the prefetch buffer 108 with the depth value contained in the structure instance fetched from the recycle buffer 110, and has a larger depth value ( In other words, structure # ⁇ instance 3 ⁇ 41 should be selected and output to the subsequent stage.
  • the selected structure instance When the selected structure instance is used in the next drawing cycle (that is, used for drawing the next line), it is output to the subsequent stage and also output to the recycle buffer 110 for writing. However, if the selected structural material is not used in the next drawing cycle (that is, not used for drawing the next line), it is output only to the subsequent stage and is not written to the recycle buffer 110. .
  • FIG. 5 (a) is an example of polygons displayed on the screen SCR for explaining the processing of the prefetch buffer 108, the recycle buffer 110, and the depth comparator 112 of the RPU 9.
  • Fig. 5 (b) shows an example of the sorting result by YSU19 as the pre-processing of the drawing process by RPU9.
  • FIG. 6 (a) is a diagram showing the state of the prefetch buffer 108 and the recycle buffer 110 immediately after the drawing for displaying the previous line Lc in Fig. 5 (a) is completed.
  • Figures 6 (b) to 6 (d) show the flow of polygon structure instances when drawing pixels corresponding to the line Lc included in polygons # 1, # 2 and # 4.
  • Figure 6 (e) FIG. 4B is a diagram showing the internal state of the prefetch buffer 108 and the recycle buffer 110 immediately after drawing for display on the line Lc is completed.
  • the prefetch buffer 108 is shown in FIG. 5 (b).
  • Polygon in the order of the sorted order Structure f material instances # 4, # 7, # 6 and # 5 are carried in, and the recycling buffer 110 contains polygoles stances: ⁇ 1 and # 2 in descending order of depth value. Note that the polygon structures #stances # 0 and # 3 are not displayed in the line Lc and are not deceived by the recycle buffer 110.
  • the depth comparator 112 includes the l3 ⁇ 4 depth value included in the polygon structure instance # 4 at the top of the prefetch buffer 108 and the polygon structure instance # 1 at the top of the recycle buffer 110.
  • the polygote material material having a large depth value: S 1 is selected and output to the subsequent stage, and the polygote material # ⁇ stance # 1 is sent to the recycling buffer 110.
  • polygon # 1 is also displayed on the next line, it is the force used in the next drawing cycle.
  • This polygon structure instance # 4 is Debsconno. Since it is not selected by the data 112, the read pointer of the prefetch buffer 108 does not advance to the next point, but remains pointing to the polygo: ⁇ structure # 4.
  • the depth comparator 112 is included in the first polygon structure instance # 4 of the prefetch buffer 108 and the first polygon structure instance # 2 of the recycle buffer 110. Compare depth values, select depth of polygo «manufactured material instance # 4 and output it to the subsequent stage, and send polygo / « constructed # stance # 4 to recycling buffer 110 . Because polygon # 4 is also displayed on the next line, it is also the force used for ⁇ IJ in the next drawing cycle. Since the polygon structure material instance # 2 has not been selected by the depth comparator 112, the read pointer of the recycle buffer 110 does not proceed to the next point and remains pointing to the polygo instance # 2.
  • the depth comparator 112 reads the leading polygon # 2 of the recycling buffer 110 and outputs it to the subsequent stage, while the polygon structure f material instance # 2 is recycled. Sent to buffer 110. Because polygon # 2 is also displayed on the next line, it is also a force used in the next drawing cycle.
  • Figure 7 (a) shows the state where polygon structure instances # 0, # 3, # 1 and # 2 in Figure 5 (b) are placed in H in the prefetch buffer 108
  • Figure 7 (b) Fig. 7 (c) is a diagram showing the flow of Polygon f instance when drawing the pixel corresponding to line La included in polygon # 0 and # 3 in Fig. 5 (a)
  • Fig. 7 (d ) Is the polygon structure up to the final display line Lb of polygons # 0 and # 3.
  • Figure 7 (e) shows the polygon structure at the final display line Lb of polygons # 0 and # 3. It is a figure which shows the flow of a body instance.
  • the prefetch notifier 108 displays the sorted polygons shown in Fig. 5 (b). # ⁇ Stance force It is listed in the order of the line.
  • the first polygo / ⁇ structure # 0 force of the prefetch buffer 108 is read into the depth comparator 112, and the depth comparator 112 outputs this polygon structure instance # 0 to the subsequent stage.
  • Polygo V »Instance # 0 is sent to the recycling buffer 110 and stored. Because polygon # 0 is also displayed in the next line, it is also the force used in the next drawing cycle. It should be noted that the polygon structure material instance # 4 that is extracted from the main RAM 25 is written into the prefetch buffer 108.
  • the polygon structure instance # 3 at the head of the prefetch buffer 108 is read into the depth comparator 112 and output to the subsequent stage, and the polygon structure instance # 3 is It is sent to the recycle buffer 110 and stored. Because polygon # 3 is also displayed on the next line, it is also the force used in the next drawing cycle. It should be noted that the polygon structure material instance # 7 read from the main RAM 25 is written into the prefetch buffer 108. When the drawing for the display of the first line La is completed, the depth comparator 112 is connected to the polygon buffer from the recycle buffer 110 as shown in FIG. 7 (d) in order to draw for the display of the next line.
  • the material instance # 0 is read and output to the subsequent stage, and the polygon structure instance # 0 is sent to the recycle buffer 110 and stored therein. Because polygon # 0 continues to be displayed on the next line, it is also a force used in the next drawing cycle. Subsequently, the depth comparator 112 reads out the polygon structure # ⁇ stance # 3 from the recycle buffer 110 and outputs it to the subsequent stage, and the polygon structure # ⁇ stance # 3 is sent to the recycle buffer 110. Is done. Because polygon # 3 is also displayed on the next line, it is also the force used in the next drawing cycle. This process is repeated until drawing of M ⁇ , polygons # 0 and # 3 is completed. Since polygon # 1 is not yet displayed, the prefetch buffer 108 is not read.
  • depth comparator 112 reads polygon structure instance # 0 from recycle buffer 110, and However, the polygon structure # 0 is not sent to the recycle buffer 110. This is because polygon # 0 is not displayed on the next line and is unnecessary. Subsequently, the depth comparator 112 reads the polygon structure material instance # 3 from the recycle buffer 110 and outputs it to the subsequent stage, but the polygon structure instance # 3 is not sent to the recycle buffer 110. This is because polygon # 3 is also not displayed on the next line and is unnecessary.
  • the structural material instance read into the prefetch buffer 108 is only the polygon structural material instance.
  • the structure after the merge sort f material instance force prefetch buffer 108 Will be carried in. Therefore, ⁇ which displays both polygons and sprites is prefetched in the order according to the sorting rule ⁇ 3.
  • Each structure # ⁇ instance is stored in the buffer 108, and the above processing is performed.
  • the depth comparator 112 and the recycle buffer 110 are provided, and the structural instances used in the next drawing cycle are arranged in descending order of the depth value.
  • the drawing process is always performed on each line from the graphic element (polygon, sprite) of the large depth value in each line, regardless of the sort rule 1 sort by Y SU19.
  • the sorting rules 1 to 3 described above are not limited to display by non-interlaced scanning, but are similarly applied to display by interlaced scanning. However, it is desirable to add the following sort rule 4 for the interscan: ⁇ , which consists of only the sort rules 1-3.
  • Sort by 2 Such a sort is called sort rule 4.
  • FIG. 8 is an explanatory diagram of sort rule 4 by YSU19 for displaying by interlaced scanning. As shown in Fig. 8, assuming that polygons # 0 to # 3 are displayed on the screen SCR, first consider the sort processing to display odd fields. In the figure, pay attention to the second strange inn from the top.
  • the minimum ⁇ coordinate of polygon # 2 that is displayed for the first time in the second in is the same as the minimum ⁇ coordinate of polygon # 1 that is displayed for the first time in the previous even line.
  • Polygo Construction material instance # 2; then Polygon structure instance # 1 is arranged.
  • the polygon structure # ⁇ stance is rearranged in the order of # 0, # 2, # 1, and # 3 to display the field. .
  • polygon structure instances are sorted in the order of # 0, # 1, # 2, and # 3.
  • the polygon structure is sorted in the order of # 1, # 0, # 3, and # 2 for the field display.
  • polygon structure instances are sorted in the order of # 0, # 1, # 2, and # 3.
  • the above sort rule 4 is applied to the sorting of each sprite structure ⁇ (V stance in the sprite structure array in addition to the sort rules 1 to 3.
  • sort rule 4 is used for interlaced scanning.
  • Fig. 8 it is assumed that sorting is performed using only sorting rules:! In this order ⁇ , polygon structure instance # 0, # 1, # 2 and # 3, sorting is performed in ascending order of the smallest Y coordinate. Then, when an odd field is displayed, for example, in the figure, immediately after the drawing of the first odd-in is completed, the polygon structure instance # 1 force recycling buffer 110 At the top is Polygon Structure Material # 0. Therefore, when drawing the second odd line from ⁇ ⁇ in the figure, drawing is done in the order of polygons # 1, # 2 and # 0. In this way, with this odd ic ⁇ -in, drawing is not performed in descending order of depth value.
  • the polygon structure Sorting is done in the order of stance # 0, # 2, # 1 and # 3. Then, at the age of displaying the odd field, for example, immediately after the drawing of the first 3 ⁇ 4m ⁇ in, such as J ⁇ ⁇ , in the figure, at the exit of the prefetch buffer 108, the polygo material # 2 is At the exit of the recycle buffer 110, there is a polygon structure # 0. Therefore, when drawing the second 3 ⁇ 4 ⁇ -in from the top in the figure, drawing is performed in descending order of the depth value in the order of polygon # 2, # 1 and # 0.
  • Fig. 9 (a) is an explanatory diagram of 3 ⁇ 4 ⁇ sort processing performed at the timing of mode 1 when displaying by interlaced scanning.
  • Fig. 9 (b) is the sort processing of displaying by interlaced scanning in mode 2. It is explanatory drawing of 3 ⁇ 4 ⁇ performed at the timing of.
  • YSU 19 is displayed before even field B is displayed. 3 ⁇ 43 ⁇ 4 7 While displaying field A, YSU 19 displays the current field B. Perform sort B. Therefore, both the calculation B and sort B processing of the value (that is, the value of each structure instance) to be substituted into the polygon structure array or sprite structure array for the even field B are the same for the even field B. All must be completed while the previous odd field A is displayed. This is because the sort B is performed based on the result of the calculation B.
  • YSU 19 performs sort A to display odd field A while even field B is displayed before odd field 7 is displayed. Therefore, the calculation of the value to be assigned to the polygon structure array or sprite structure array for the odd field A and the processing of both the sort A are performed by the even field B displayed immediately before the 3 ⁇ 43 ⁇ 47 field A. All the items that must be completed while is displayed. Because the sort A is based on the result of the calculation A Because it is done.
  • YSU19 saves sort A for 3 ⁇ 41 ⁇ field A during the previous vertical blanking period and during the display of field A, as shown in Figure 9 (b).
  • «Calculation A for field A is performed during the display of ⁇ 3 ⁇ 43 ⁇ 4 field B immediately before 3 ⁇ 4 field A.
  • YSU 19 inputs a sort key for the even field ⁇ during the immediately preceding vertical blanking period and during the display of the field ⁇ .
  • the calculation ⁇ for the even field ⁇ is performed during the display of the «7 field ⁇ immediately before the « C field ⁇ ⁇ .
  • every time one structural material is determined from the highest ranking without waiting for the completion of sorting of all structural materials the structural instance is read into RPU9 and drawn each time.
  • Functions that can perform processing are provided. Specifically, every time a sorted polygon structure instance of the polygon structure array to be sorted is determined, a pulse signal PPL (described later) is transmitted from YSU19 to RP U9, and RPU9 determines the number of pulse signals PPL. Count and read from the main RAM 25 the number of polygons in the range not exceeding the count value. Also Sufu. Similar functions are also provided for sorting and reading the light structure array. Thus, as in Mode 2, the sorting of each structure instance for the field being displayed can be saved during the previous vertical blanking period and field display.
  • heap sorting is adopted in this difficult form.
  • Another advantage of adopting heap sort is that the sort performance is stable, that is, there is little variation in the time required for sorting.
  • FIG. 10 is a plot showing the internal configuration of the multimedia processor 1 according to the embodiment of the present invention.
  • this multimedia processor has an external memory interface. 3, DMAC (direct memory access controller) 4, a central processing unit (hereinafter referred to as “CPU”) 5, a CPU local RAM 7, Rendering processing unit (hereinafter referred to as “RPU”) 9, color palette RAM11, sound processing unit (hereinafter referred to as “SPU”) 13, SPU local RAM15, geometry engine (hereinafter referred to as “GE”).
  • DMAC direct memory access controller
  • CPU central processing unit
  • RPU Rendering processing unit
  • SPU sound processing unit
  • SPU sound processing unit
  • GE geometry engine
  • YSU Y sorting unit
  • Gaien ⁇ T interface block 21, Main RAM access arbiter 23, Main RAM 25, I / O path 27, Video DAC (digital to analog converter) ) 29, audio DAC block 31, and AZD converter (hereinafter referred to as "ADC") 33.
  • ADC AZD converter
  • the CPU 5 inputs the program stored in the memory MEM and controls various calculations and the entire system.
  • the CPU 5 can also request the program and data from the DMAC 4, and the external memory 50 directly fetches the program code through the external memory interface 3 and the external bus 51 without going through the DMAC 4. Data access to the memory 50 can be performed directly.
  • ⁇ Scaling / rotating / rotating each object and each sprite and Z or 5 motion parameters
  • viewpoint coordinates (Camera coordinates)
  • heel vector calculation a unit composed of one or more polygons and to which the same enlargement / reduction, rotation, and motion conversion are applied.
  • the I / O path 27 is a system control bus with CPU5 as the bus master, and each functional unit that is a bus slave (external memory interface 3, DMAC4, RPU9, SPU13, GE17, YSU19, external sound I interface) It is used to access the control registers of the block 21 and ADC33) and the local RAM 7, 11:15. In this way, these functional units are controlled by the CPU 5 through the IZO bar 27.
  • the CPU local RAM 7 is a RAM dedicated to the CPU 5, and is used as a stack area for executing data such as subroutine calls and interrupts, and as an internal area for variables handled only by the CPU 5.
  • RPU9 one of the traps of the present invention, generates a three-dimensional image composed of polygons and sprites in real time. Specifically, the RPU 9 reads each structure #H stance of the polygon structure array sorted by YSU19 and each structure instance of the sprite structure array from the main RAM 25, and the above-described depth comparator 112, etc. Through various processes described later, images are generated for each horizontal line in accordance with the screen scan. The generated image is converted into a data stream indicating a composite video signal waveform and output to the video DAC 29.
  • RPU9 also has a function to request DMAC4 for DMA ⁇ for capturing polygon and sprite texture pattern data. RPU 9 will be described in detail later.
  • Texture pattern data is two-dimensional pixel array data that is pasted on a polygon or sprite. Each pixel data is a part of information for designating an entry in the color palette RAM11. As described above, in this embodiment, an indirect designation method is adopted for color designation.
  • the pixels of the texture pattern data are referred to as “texels” and are distinguished from the “pixels” that indicate the pixels constituting the image displayed on the screen. Therefore, the texture pattern data is a set of texel data.
  • Video DAC29 is a digital Z analog pervert for converting analog video signals.
  • the video DAC 29 converts the data stream input from the RPU 9 into an analog composite video signal, and outputs a video signal output (not shown) power to a television monitor or the like (not shown).
  • the color palette RAMI 1 consists of 512 colors, that is, 512 color palettes in this form.
  • RPU9 refers to the color palette RAMI 1 using the texel data that can be obtained from the texture pattern data as part of the index that specifies the entry of the color palette. Converts no-turn data to color data (RGB color "component").
  • the SPU 13 performs PCM (pulse code modulation) waveform data (hereinafter referred to as “wave data”), amplified data, and main polyume data. Specifically, SPU 13 divides and multiplexes the wave data for up to 64 channels, generates envelope data for up to 64 channels, multiplies it with the channel polyme data, and outputs the amplified data. Is multiplexed. Then, the SPU 13 outputs the main volume data, the time-division multiplexed wave data, and the time-division multiplexed amplitude data to the audio DAC block 31. In addition, the SPU 13 has a function of making a DMA request for DMAC 4 to capture wave data and envelope data.
  • PCM pulse code modulation
  • the audio DAC block 31 converts the wave data, amplified data, and main volume data input from the SPU 13 into analog signals, and multiplies the results to generate an analog audio signal.
  • This analog audio signal is output from an audio signal output terminal (not shown) to an audio input terminal (not shown) of a television monitor or the like (not shown).
  • the SPU local RAMI 5 carries in parameters that are used when the SPU 13 performs wave reproduction and envelope generation (for example, internal address and pitch information of wave data and envelope data).
  • GE17 saves equitable operations for displaying 3D images. Specifically, GE17 performs operations such as matrix product, vector affine transformation, vector orthogonal transformation, transformation, vertex brightness Z polygon brightness calculation (vector inner product), and polygon back surface force ring processing (vector outer product). .
  • YSU19 one of the glue sheets of the present invention, is placed in the main RAM 25! /, And the structure of the polygo structure structure and the structure of the stance and sprite structure array are sorted by rules. Sort according to 1-4. This sort is done separately for the polygon structure array and the sprite structure array.
  • the external memory interface 3 reads data from the external memory 50 via the external bus 51. And writing data to the external memory 50.
  • EBI priority table is Te Bull that defines the priority of the outer ⁇ rather scan access request source also external bus access request source and DMAC4 force of the double flame class from CPU 5 0
  • External access request factors include a block request by an IPL (initial program loader) (not shown) included in the CPU 5, a data access request by the CPU 5, an instruction fetch request by the CPU 5, and a DMA request by the DMAC 4.
  • IPL initial program loader
  • the DMAC 4 performs DMA transfer between the main RAM 25 and the external memory 50 connected to the external memory 51.
  • DMAC4 follows CPU5, according to a DMA priority table (not shown).
  • the DMA priority table is a tape glue that defines the priority order of the DMA request factors from the CPU 5, RPU 9, and SPU 13.
  • the DMA request factors of SPU13 are (1) putting wave data into the wave buffer, and (2) putting envelope data into the envelope buffer.
  • the wave buffer and envelope buffer are set in the main RAM 25, respectively. This is a temporary storage area for wave data and envelope data, and the arbitration between the two DMA request factors of SPU13 is performed by hardware (not shown) in SPU13, and DMAC4 is not concerned.
  • the DMA request factor of RPU9 is to use texture pattern data as a texture buffer.
  • the texture buffer is a temporary area for texture pattern data set on the main RAM 25.
  • CPU5 DMA request factors are as follows: (1) A page miss occurred in memory management. Page 2 !, (2) Application program, etc.—data te. Note that the age at which multiple DMA key requests occur in the CPU 5 at the same time is performed by the software managed by the CPU 5, and the DMAC 4 is not concerned.
  • the DMAC 4 has a data decompression function based on the LZ77 algorithm, and can perform DMA while decompressing the compressed data stored in the external memory 50 in response to a DMA request from the CPU 5.
  • the external I interface block 21 is an interface with a peripheral device 54 and includes a 24-channel programmable digital input / output (IZO) port.
  • Each 24-channel I / O port has a 4-channel mouse interface function, a 4-channel light gun interface function, a 2-channel general-purpose timer / counter, and an asynchronous serial interface for 1 channel.
  • Internally connected to one or more general-purpose parallel Z serial conversion port functions for one channel.
  • the ADC 33 is connected to the 4-channel analog input ports, and converts the analog signal input from the analog input device 52 into a digital signal via these. For example, analog input signals such as microphone sound are sampled and converted to digital data.
  • the main RAM access arbiter 23 is a functional unit (CPU5, RPU9, GE17, YSU19, DM
  • the main RAM 25 is used as a work area for the CPU 5, a variable editing area, a virtual memory management area, and the like. In addition, the main RAM 25 receives data received from the CPU 5 by other functional units. »" Data storage area, RPU 9 and SPU 13 receive data from the external memory 50 via DMA.
  • the external bus 51 is a bus for accessing the external memory 50. It is accessed from CPU5 and DMAC4 via external memory interface 3.
  • Bund The data path of the memory 51 consists of 16 bits, and can connect an external memory 50 having a data bus width of 8 bits or 16 bits. It is possible to simultaneously connect external memories having a data bus width, and a function of automatically switching the data path width according to the external memory to be accessed is provided.
  • FIG. 11 is a flowchart showing an overview of the flow of graphics processing by the multimedia processor 1 of FIG.
  • CPU 5 determines each object (a unit composed of one or a plurality of polygons to which the same scaling, rotation, and movement conversion is applied) and each sprite. Calculate parameters for enlargement / reduction, rotation, and translation. From the calculated parameters, for each object and each sprite, a transformation sequence for scaling, rotation, and 5 W movement is generated. These transformation columns are based on the local coordinate system of each object and each sprite (local coordinate system), and it is a direct coordinate system that expresses all objects and all sprites in a unified coordinate system (world coordinate system). Used for conversion to!
  • the CPU 5 performs viewpoint (camera) coordinates, image image point coordinates, and a line / line vector. From these parameters, a transformation matrix is generated from the world coordinate system to a direct 3 ⁇ 43 ⁇ 4 target system (view coordinate system) centered on the viewpoint.
  • step S2 GE17 obtains a matrix product of the transformation matrix for each object and sprite, and there are multiple transformation matrices for scaling, rotation, and movement. Synthesize multiple transformation sequences into a single transformation matrix. Further, GE17 obtains a matrix product of the synthesized transformation matrix and a transformation matrix for coordinate system transformation, and transforms the object vertex coordinate array, the object object 3 ⁇ 4 ⁇ vector array, and the sprite coordinates. O Combine each matrix o
  • step S3 the GE 17 uses the synthesized transformation matrix to perform transformation of the object vertex marker array, the object sample vector array, and the sprite coordinates. Also, GE17 calculates the inner product of the converted object tuttle array and the light source vector, and calculates the brightness of each vertex or face (polygon) of the object. The result of such geometric transformations is the polygon structure. It is listed in the structure array and the sprite structure array.
  • step S4 before the drawing process by the RPU 9, the YSU 19 sorts the polygon structure and the sprite structure material according to the sorting rules 1 to 4.
  • step S5 RPU9 or Polygon after sorting by YSU19: / «Structure # ⁇ stance and sprite structure # ⁇ stance is read and texture attribute structure indicating polygon and sprite attributes in texture mapping mode While reading the instance, generate a pixel data string for each horizontal display line.
  • texture attribute structure indicating polygon and sprite attributes in texture mapping mode
  • Such pixel data string generation processing is called “lasting”.
  • Texture mapping is a drawing technique in which texel patterns arranged in a two-dimensional grid are pasted onto the polygon surface.
  • Gourothing is a type of smooth shading used to express a quasi-smooth curved surface with a small number of polygons. In Gouraud shading, the drawing color of each pixel in the polygon is obtained by complementing the vertex color of the polygon specified independently.
  • RPU9 performs scissoring. Scissoring is a process that removes and displays the part that extends beyond the specified viewport area when generating polygon and sprite pixel data sequences. The generated pixel data string is stored in the line buffer in RPU9.
  • the writing pixel is set to a translucent color, and power blending is performed to mix the color of the pixel in the line buffer with the color of the writing pixel.
  • step S6 the RPU 9 reads the information of each pixel of display from the line buffer LB1 or LB2, and uses the sync signal, color burst signal, etc. as a composite video signal.
  • the generated data stream is input to the video DAC 29, and an analog composite video signal is output from the video DAC 29.
  • FIG. 12 is a block diagram showing the internal configuration of the RPU 9 of FIG.
  • RPU9 is the RPU main RAM access arbiter 100, polygon prefetcher 102, sprite prefetcher 104, merge sorter 106, prefetch buffer 108, recycle buffer 110, depth comparator 112, vertex sorter 114, vertex.
  • the line buffer block 134 includes line buffers LB1 and LB2 each corresponding to one horizontal line of the screen.
  • the color palette RAMI 1 is included in the RPU 9 for convenience of explanation.
  • the RPU main RAM access arbiter 100 arbitrates access requests to the main RAM 25 from the polygon prefetcher 102, the sprite prefetcher 104, and the memory manager 140, and grants any access request permission.
  • the permitted access request is output to the main RAM access arbiter 23, and arbitration is performed with access requests from other functional units in the multimedia processor 1.
  • the polygon prefetcher 102 fetches each polygon structure stance after sorting by the YSU 19 from the main RAM 25.
  • Polygon prefetcher 102 receives a pulse PPL from YSU19.
  • YSU19 outputs a pulse PPL when one of the most powerful components in the sort is determined. Therefore, the polygon pre-fetcher 102 can know whether the sorting of the polygon structure #H stance of V and all of the polygon structures in the polygon structure array has been completed.
  • Polygon Prefetcher 102 waits for the completion of sorting all Polygons.
  • a polygon structure instance can be acquired each time a single polygon structure instance is confirmed, even if the one with the highest ranking is connected.
  • using the above-mentioned mode 2 (see Fig. 9 (b)) to perform display by interlace scanning it is correct even if sorting for the field is performed while the field is displayed! / A drawing result is obtained.
  • the polygon prefetcher 102 can know the switching of the frame and the field from the vertical run signal VC of 138 powers of the video timing generator.
  • Sprite Pre-Fetcher 104 is the main product from the main RAM25, sorted by YSU19. Capture the light structure stance.
  • the sprite prefetcher 104 receives a pulse SP L from the YSU 19.
  • the YSU 19 outputs a pulse SPL when the sorting order is high, and one of the sprite structure materials is determined. So Sufu.
  • the light prefetcher 104 can know whether the sorting of the sprite structure or the instance of the sprite structure array has been completed among the bright structure #r instances of the sprite structure array.
  • the sprite structure 104 has a high ranking without waiting for the completion of the sorting of the prite structure, so that one sprite structure is determined each time. You can get timber stance. As a result, the sprite structure instances for the frame can be sorted while the frame is displayed. In addition, display using the address scan: By using the above-mentioned mode 2 (see Fig. 9 (b)), even if sorting for the field is performed while the field is displayed, A correct drawing result can be obtained. Note that the sprite prefetcher 104 can know the frame and field switching from the vertical run signal VC from the video timing generator 138.
  • FIG. 13 is an exemplary view of a polygon structure in the texture mapping mode. As shown in FIG. 13, in this embodiment, this polygon structure is composed of 128 bits! This polygon structure
  • the body member Type indicates the drawing mode of the polygon, and “0” is set for the polygon in the texture mapping mode.
  • Members Ay, Ax, By, Bx, Cy, and Cx are the polygon's top Y coordinate, top XJM mark, vertex ⁇ ⁇ coordinate, vertex ⁇ mark, vertex C ⁇ coordinate, and vertex C respectively.
  • the Xffi mark is shown. These Y coordinates and indices are values in the screen coordinate system.
  • the members Tattribute, Map, Filter, Depth and Viewport are the texture attribute structure index, texture pattern data format 3 ⁇ 43 ⁇ 4, filtering mode, depth value, and extension indicating either nonlinear filtering or two-arrested nippers, respectively. Indicates viewport specification information for scissoring. For pilinear filtering and two-arrest neighbors, see later.
  • One polygon is defined by one polygon structure instance (value assigned to the polygon structure).
  • FIG. 14 is an example of a texture attribute structure. As shown in FIG. 14, in the present embodiment, this texture attribute structure is composed of 32 bits. The members Width, Height, M, N, Bit, and Palette of this texture attribute structure are smaller than the texture width (unit: number of texels) by 1 and smaller than the texture height (unit: number of texels). “1” small, value, “Width” upper mask bit number, “Height” upper mask bit number, color mode (1 bit per pixel), and palette block picker. The 512 color entries in the color palette are divided into multiple blocks according to the selected color mode, and the member palette indicates the palette block to be used.
  • FIG. 15 is an illustration of a polygon structure in the Gouraud shading mode.
  • the polygon structure in the Gouraud shading mode is composed of 128 bits, and members Ax (11 bits), Ay (10 bits), Bx (ll bits), By (10 bits), Cx (l 1 bit), Cy (10 bits), Ac (15 bits), Be (15 bits), Cc (15 bits), Depth (12 bits), Viewport (2 bits) and O ⁇ Nalpha (3 bits)
  • Member Type indicates the polygon drawing mode, and “1” is set for polygons in Gouraud shading mode.
  • Members Ay, Ax, By, Bx, Cy and Cx are the polygon's Y coordinate at the top, XJM mark at the top, ⁇ coordinate at vertex ⁇ , ⁇ coordinate at vertex ⁇ , ⁇ coordinate at vertex C, and Indicates the X coordinate of vertex C.
  • These ⁇ and X coordinates are values in the screen coordinate system.
  • Members Ac, Be, and Cc are the polygon color data for top 3A (RGB 5 bits each), vertex B color data (RGB 5 bits each), and vertex C color data (RGB 5 bits each) ).
  • the members Depth, Viewport, and Nalpha indicate the depth value, scissoring viewport designation information, and (1- ⁇ ) used for alpha plending, respectively.
  • (l- ⁇ ) indicates transparency
  • “000 (binary)” indicates 0% transparency, that is, completely opaque
  • “111 (binary)” indicates 87.5% transparency.
  • One polygon is defined by one polygon structure instance (value assigned to the polygon structure).
  • FIG. 16A is an exemplary diagram of a sprite structure when scissoring is disabled
  • FIG. 16B is an exemplary diagram of the sprite structure when scissoring is enabled.
  • the sprite structure when scissoring is disabled is composed of 64 bits.
  • the members Ax and Ay of this sprite structure are each Suff. Shows the Xffi standard and upper left coordinates of the light. These Y coordinates and indices are values in the screen coordinate system.
  • Members Depth, Filter and Tattribute indicate the depth value, filtering mode (bilinear filtering or two-arrested nipper), and index of the texture attribute structure, respectively.
  • Members ZoomX, ZoomY, and Tsegment indicate the sprite magnification (male rate) in the X-axis direction, the sprite magnification (male rate) in the Y # direction, and the placement of the texture pattern data.
  • the scuffing is enabled.
  • the light structure consists of 64 bits.
  • Each member A S XAy of this sprite structure indicates the x3 ⁇ 4 standard and Y coordinates of the upper left of the sprite. These ⁇ coordinates and marks are values in the screen coordinate system.
  • the members ZoomX, ZoomY, and Tsegment indicate the sprite enlargement rate in the X-axis direction (the vertical rate), the sprite enlargement rate in the Y-axis direction (the sickle rate), and the in-car position information of the texture pattern data.
  • the number of bits of the X coordinate and the horizontal coordinate is one bit less than that of the sprite structure when scissoring is disabled. Susfu when scissoring enable.
  • an offset of 512 pixels is added to the X coordinate and an offset of 256 pixels is added to the Y coordinate by a later-described expander expander 116.
  • the depth value bit is less by 1 bit, when scissoring is enabled, 1 bit “0” is added to the LSB side of the depth value stored in the structure by the texel mapper 124 described later. It is treated as a depth value of 8 bits as in the case of the Zaring disable.
  • One sprite structure is the value of one sprite structure (the value assigned to the sprite structure).
  • the structure of the texture attribute structure for sprites is The structure of the polygon texture attribute structure in Fig. 14 is the same. There are 64 instances of texture attribute structure for each drawing sprite. There are 64 texture attribute structures. Instance force All polygon structures in texture mapping mode. Is done.
  • the merge sorter 106 receives a polygon structure and an associated texture attribute structure # instance, and a sprite structure # ⁇ instance and a polygon shape structure from the polygon preset structure 102 and the sprite structure 104, respectively.
  • the merge sorter 106 uses the sorting rules 1 to 4 as polygo ⁇ !
  • the polygon structure instance is set to polygon / sprite data PSD (128 bits), and the associated texture attribute structure # ⁇ instance is the texture attribute structure.
  • the merge sorter 106 selects the polygon structure material instance according to the sorting rules 1 to 4. For the polygon in the Gouraud shading mode, the polygon structure instance is used as the polygon / sprite data PSD (128 bits) and the texture is selected. Attribute structure ⁇ material Instance ⁇ (32 bits) All bits are output as “0” to the prefetch buffer 108. — On the other hand, the merge sorter 106 selected the sprite structure # ⁇ stance according to the sorting rules 1 to 4 ⁇ . The light structure instance is output to the prefetch buffer 108 as polygon Z sprite data PSD (128 bits), and the texture attribute structure material instance attached thereto as texture attribute structure material material ⁇ (32 bits). However, the polygon / sprite data PSD of this ⁇ is packed from the effective data force SLSB, and the upper 64 bits indicate “0”.
  • the prefetch buffer 108 detailed above is the merge sort structure from the merge saw 106.
  • the prefetch buffer 108 can know the horizontal line being drawn from the vertical run signal VC from the video timing generator 138. That is, it is possible to know the switching of the drawing cycle. In this embodiment, for example, the prefetch buffer 108 can physically share a buffer with the recycle buffer 110, and the number of entries of the recycle buffer 110 is 3 ⁇ 4 ⁇ ⁇ (128 bits + 32 bits). ) X 128 entries.
  • the recycle buffer 110 will be stored in the next drawing cycle (that is, it can be reused) for a structural material instance (i.e., polygon ⁇ sprite data PSD and texture attribute structure ⁇ material instance ⁇ ).
  • This is a FIFO structure buffer received from the slicer 118. Therefore, the structure instance stored in the recycle buffer 110 is used in the next drawing cycle.
  • the recycle buffer 110 can physically buffer the prefetch buffer 108, and the number of entries of the prefetch buffer 108 is 3 ⁇ 4 ⁇ ⁇ (128 bits + 32 bits). X 128 entries.
  • the depth comparator 112 compares the depth value contained in the top structural instance of the prefetch buffer 108 with the depth value contained in the top structural instance of the recycle buffer 110. , Select a structure f material instance with a larger depth value (that is, it should be displayed deeper) and output it to the subsequent stage.
  • the age / depth comparator 112 outputs the polygon structure instance selected ⁇ to the vertex sorter 114 if the selected structure instance is a polygon structure instance, and outputs it to the vertex expander 116 if it is a sprite structure instance.
  • Ma The depth comparator 112 outputs the selected structural instance to the slicer 118.
  • the depth comparator 112 can know the horizontal line being drawn from the vertical run signal VC from the video timing generator 138. In other words, it is possible to know the switching of the drawing cycle.
  • the vertex expander 116 includes the sprite upper-left vertex coordinates (Ax, Ay) included in the received sprite structure, the zoom factor ZoomY in the Y-axis direction, the zoom factor ZoomX in the axial direction, Bright structure ⁇ Texture attribute structure associated with f instance
  • the coordinates of the vertex of the sprite (screen coordinate system) based on the value Height included in the instance, "1" smaller than the width of the texture, "1" smaller than the iiWidth and height.
  • Output to slicer 118 as write common data CI (208 bits).
  • the structure (format) of the polygon Z-sprite common data CI output from the vertex expander 116 is the same as the structure (format) of the polygon Z-sprite common data CI output from the notex soter 114.
  • the vertex expander 116 includes the top left vertex coordinates (Ax, Ay) of the sprite included in the received sprite structure instance, the zoom factor ZoomY in the Y-axis direction, the zoom factor ZoomX in the X-axis direction, and ⁇ Bright structure Texture attribute structure attached to the W stance f Included in the material stance, “1” smaller than the width of the texture Width SWidth and “1” smaller than the height! /, Based on the value Height, the vertex of the sprite Coordinates (Y coordinate in screen coordinate system and UV coordinate in UV coordinate system) are calculated and output to slicer 118 as polygon Z sprite common data CI (208 bits).
  • the structure (format) of the polygon / sprite common data CI output by the vertex expander 116 is the same as the structure (form 5) of the polygon / sprite common data CI output by the vertex extractor 114.
  • the screen coordinate system is as described above.
  • the UV coordinate system is used for each technology that makes up the texture. If the senor is a polygon, it is a two-dimensional linear ⁇ standard system arranged in a manner mapped to a sprite.
  • the vertex sorter 114 acquires and calculates the parameters (XYUV coordinates, perspective correction parameters, and color data) of each vertex of the polygon from the received polygon structure instance and the texture attribute structure instance that accompanies it. Reorder the vertex parameters with small ⁇ coordinates. Write common data Slicer as CI
  • the vertex sorter 114 outputs the calculation result, that is, the parameters of each vertex 0 to 2 (XY coordinates, UV coordinates after perspective correction, and parameters for perspective correction) to the polygon Z sprite. Output to slicer 118 as common data CI.
  • the vertex sorter 114 outputs the calculation result, that is, the parameters (XY coordinates and color data) of each vertex 0 to 2 to the slicer 118 as polygon Z sprite common data CI.
  • the configuration (format) of the polygon // sprite common data CI output from the vertex sorter 114 is the same as the configuration (format) of the polygon / sprite common data CI output from the vertex expander 116.
  • Finored F is a polygon Z sufu.
  • Light common data CI force This is a flag field indicating the force that is applied to the polygon and the force that is applied to the sprite. Accordingly, the vertex sorter 114 places “1 J indicating the polygon in the field F. On the other hand, the vertex expander 116 includes“ 0 ”indicating the sprite in the field F 3.
  • the fields KVR *, UB *, Y * and X * are the V coordinate, U coordinate, Y coordinate and X coordinate of the vertex *, respectively. It is.
  • ⁇ M the 3 ⁇ 4J jets of vertex * are vertex 0, vertex 1 and vertex 2 from the earliest.
  • polygon Z sprite common data CI which is the texture mapping trap output from the vertex sorter 114
  • the fields WG *, VR *, UB *, Y * and X * are the parameters for the perspective collection of the vertex *, respectively.
  • Polygon Z suf that is the target of Gouraud shading that is output from Partex Sorter 114.
  • the fields KWG *, VR *, UB *, Y * and X * are the integrity, red component, blue component, Y coordinate, and 3 ⁇ 43 ⁇ 4 of the vertex *, respectively.
  • FIG. 17 is an explanatory diagram of processing performed by the slicer 118 for polygons in the Gouraud shading mode.
  • the slicer 118 has the XY coordinates (Xs, Ys) of the intersection of the polygon (triangle) defined by the given polygon Z sprite common data CI and the horizontal line to be drawn. And (Xe, Ye).
  • Xs, Ys the intersection of the polygon (triangle) defined by the given polygon Z sprite common data CI and the horizontal line to be drawn.
  • Xe, Ye do not intersect with the horizontal line of the drawing text! /
  • the intersection on the side where the side lies is the end (Xe, Ye), and the intersection on the side where the side is grave is the starting point ( Xs, Ys).
  • the slicer 118 is based on the RGB value of the vertex 0 (VRO, WGO, UB0) and the RGB value of the vertex 2 (VR2, WG2, UB2) in the range of the drawing Y coordinate Yr force SY0 ⁇ YrrY1.
  • ⁇ Interpolation calculates the RGB value (Rs, Gs, Bs) of the start point of the intersection, and the RGB value of the vertex 0 (VR0, WGO, UB)
  • the slicer 118 is based on the RGB value of the vertex 0 (VRO, WGO, UB0) and the RGB value of the vertex 2 (V2, WG2, UB2) in the range where the drawing Y coordinate Yr is Yl ⁇ Yr ⁇ Y2.
  • the RGB value (Rs, Gs, Bs) of the start point of the intersection is calculated by interpolation, and based on the RGB value of vertex 1 (VR1, WG1, UB1) and the RGB value of vertex 2 (VR2, WG2, UB2)! / Calculate RGB values (Re, Ge, Be) at the end of intersection by line interpolation.
  • the slicer 118 calculates AR, AG, ⁇ , and AXg.
  • AR, AG, and ⁇ are the amount of change for each of R, G, and B per AXg in the horizontal line of drawing
  • ⁇ ⁇ is the amount of change in the mark per pixel in the horizontal line of drawing .
  • AXg is either “+1” or “—1”.
  • ⁇ B (Be-Bs) / (Xe.— Xs)
  • Slicer 118 together with the structure instance which is received from Debs comparator 112, calculated Xs, Rs, Gs, Bs, Xe, AR, AG, a ⁇ Pi AXG, also c sends to Pikuserusutetsupa 120, slicer 118,
  • the structural material instance received from the depth comparator 112 is written in the recycle buffer 110. Note that it is possible to know whether or not it is used in the next drawing cycle from the vertical pitch signal VC from the video timing generator 138 and the vertex coordinates of the polygon.
  • FIG. 18 is an explanatory diagram of the processing performed by the slicer 118 on the polygon in the texture mapping mode.
  • the slicer 118 is the intersection of the polygon (triangle) defined by the given polygon Z sprite common data CI and the horizontal line drawn, and the starting point C3 ⁇ 4 Ys) Find the end (Xe, Ye). This is the same as the process for polygons in Gouraud shading mode.
  • the perspective collect function will be described.
  • Perspective In texture mapping that expresses a transformed three-dimensional image
  • the texel corresponding to the drawing pixel on the screen is assigned to each vertex coordinate of the UV space texture corresponding to each vertex coordinate of the polygon.
  • Obtaining a line
  • the mapped image may be distorted.
  • the perspective correct function is erased. Specifically, the following processing is performed.
  • the view coordinate system (from the three axes of XYZ) is a three-dimensional direct reference system, with the viewpoint as the origin and the machine as the positive of the Z axis.
  • the slicer 118 has the drawing Y coordinate Yr in the range YO ⁇ Yr and Y1, the vertex 0 (UBO, VO, WG0) and the vertex 2 (UB2, VR2, WG2) Based on the above, calculate (Us, Vs, Ws) at the start point of the intersection by linear interpolation, and (UBO, VRO, WG0) at vertex 0 and (UB1, VR1, WG1) at vertex 1 Based on the above, (Ue, Ve, We) at the end of the intersection is calculated by linear interpolation.
  • the slicer 118 has the (U) of vertex 0 in the range where the drawing Y coordinate Yr is Yl ⁇ Yr ⁇ Y2.
  • the slicer 118 calculates ⁇ , ⁇ , AW and AXt.
  • AXt is the amount of change in the X coordinate per pixel in the horizontal line of the drawing ⁇ . AXt is either “+1” or “one 1.”
  • Slicer 118 calculates along with the structural materials received from depth comparator 112
  • the vertical signal VC and the vertex of the polygon from the video timing generator 138 can be used to determine whether they are used in the next drawing cycle.
  • FIG. 19 is an explanatory diagram of the processing performed by the slicer 118 on the sprite.
  • the slicer 118 obtains the intersection of the sprite ( ⁇ ) defined by the given polygon Z sprite common data CI and the horizontal line of drawing, the key mark (Xs, Ys) and (Xe, Ye).
  • the intersection of the sprite
  • Xs, Ys the intersection on the side drawn first is the start (Xs, Ys), and the intersection on the side drawn later is the end (Xe, Ye).
  • the coordinates when the vertices 0, 1, 2, 3 of the sprite are mapped to the UV space are (UB0, VRO), (UB1, VR1), (UB2, VR2), (UB3, VR3).
  • UB3 and VR3 are not input to the slicer 118, but are obtained in the slicer 118 as follows.
  • the slicer 118 calculates the UV coordinates (Us, Vs) of the start point of the intersection by the interpolation based on (UBO, V0) of vertex 0 and (UB2, VR2) of vertex 2 and Based on (UB1, VR1) and (UB3, VR3) at top point 3, calculate the UV coordinates (Ue, Ve) at the end of the intersection by spring interpolation.
  • the slicer 118 calculates AU and AV.
  • ⁇ and ⁇ are the changes in the U and V coordinates per AXs in the drawn horizontal line. Since AXs is always “1”, which is the amount of change in the mark per pixel on the horizontal line to be drawn, it is not calculated.
  • the slicer 118 calculates, along with the structure f material received from the depth comparator 112; ⁇ Xs, Us, Vs, Xe, ⁇ , AV, and ⁇ Xs are sent to the pixel stepper 120. Also, the slicer 118 is a polygon Z sprite common data received from the vertex expander 116.
  • the structural material instance received from the fat comparator 112 is written in the recycle buffer 110.
  • video timing From the vertical run signal VC and sprite mark from 138, the presence or absence of use in the next drawing cycle can be known.
  • the slicer 118 can recognize different polygons and sprites from the field F of the polygon / sprite common data CI, and can recognize further IJ of goulsing and texture mapping from the member type of the polygon structure instance.
  • the pixel stepper 120 determines that the polygons in Gouraud shading mode are based on the parameters (Xs, Rs, Gs, Bs, Xe, AR, AG, ⁇ and AXg) given by the slicer 118. Then, the drawing target and the RGB value of the drawing text pixel are obtained and sent to the pixel dither 122 together with the (1—) value. Specifically, the pixel stepper 120 calculates the red component change ⁇ per pixel in order from the red component Rs of the start point (drawing start point) X s of the intersection, and the red component of each pixel. Ask for RX. This process is performed until the end of the intersection (the drawing end) Xe is reached.
  • the pixel stepper 120 outputs the obtained RGB value (RX, GX, BX) of each pixel and the drawing Xl3 ⁇ 4target r to the pixel dither 122 together with (1—spiciously the depth value (Depth)).
  • the pixel stepper 120 is for the texture mapping mode polygon V and the parameters (Xs, Us, Vs, Ws, Xe, ⁇ , AV, 1 ⁇ , etc.) given by the slicer 118 '(U, V) when mapping to the UV space. Specifically, the pixel stepper 120 uses the start point of the intersection (the drawing start point) Xs as the perspective correction parameter Ws-
  • ⁇ Xs is entered in order at the start point Xs of the intersection point, and the drawing X3 ⁇ 4t! Xr is obtained.
  • X 0 to I Xe— Xs
  • VX (AXt- AV-X + Vs) ⁇ (1 / WX)
  • Pixel stepper 120 uses the obtained UV coordinates (UX, VX) and drawing X coordinates ⁇ Xr for each pixel together with the structure instance (texture mapping polygon structure instance and texture attribute structure # ⁇ stance) received from slicer 118. Output to Texel Matsupa 124.
  • UX AXs- AU-X + Us
  • VX AXs- AV-X + Vs
  • the pixel stepper 120 calculates the UV coordinates (UX, VX) of each pixel and the drawing X ⁇ mark Xr Is output to the texel mapper 124 together with the structure instance received from the slicer 118 (spite structure instance and texture attribute structure H stance).
  • the pixel dither 122 performs dithering that adds noise to the fractional portion of the RGB value given by the pixel stepper 120 to make the Mach panda less noticeable.
  • the pixel dither 122 outputs the RGB value of the dithered pixel together with the mx mxr, ( ⁇ — ⁇ ) value, and the depth value to the power error blender 132.
  • FIG. 20 is an explanatory diagram of dithering by the pixel dither 122.
  • the dither pattern is set in a control register (not shown) of RPU 9 in units of 2 ⁇ 2 grid pixel blocks.
  • Drawing pixel screen coordinate system The LSB value of the ⁇ coordinate determines the force to which one of the four patterns “00”, “01”, “10”, or “11” is applied.
  • Each pattern is 2 bits in size and is added to each fractional part of the RGB value.
  • a carry is added to the difficult part in order to generate a carry force S on the difficult part.
  • the part that is actually used as the display color ⁇ the RGB value passing part. Unless the values set as the dither pattern are all the same, noise at the color boundary part makes the Mach Pand inconspicuous.
  • the texel mapper 124 indicates that the member Filter of the texture attribute structure indicates “0”.
  • ⁇ 1 This is the neighborhood of the coordinates (UX, VX).
  • Address WAD and bit address BAD, member Filter force “1” is indicated, and ⁇ 1 is a set of word address WAD and bit address BAD indicating the one texel data closest to the coordinates (UX, VX) And output.
  • the bilinear filter parameter BBP corresponding to the coefficient part of each texel in the linear filtering is calculated and output.
  • the sprite when the scissoring enable is set, the sprite when the scissoring is disabled, and the polygon are exchanged with each other. Outputs the same value format (member depth).
  • the texture cache block 126 uses the word address WAD, the bit address BAD, and the member Tsegment of the structural material output from the texel mapper 124 to add the address of each texel. Calculate The texel data indicated by the calculated address is already in the cache! An index for selecting an entry in the color palette RAMI 1 is generated from the internal Palette and the attribute structure member Palette, and output to the color palette RAMI 1.
  • the texture cache block 126 outputs the texel data to the memory manager 140.
  • the memory manager 140 acquires the corresponding texture pattern data from the main RAM 25 and puts it in the cache of the texture cache block 126. Further, the memory manager 140 acquires the texture pattern data required in the subsequent stage according to the instruction from the merge sorter 106 and stores it in the main RAM 25.
  • the memory manager 140 obtains the entire texture data mapped to one polygon at a time for the texture pattern data for polygons in the texture mapping mode and shelves them in the main RAM 25, whereas the texture pattern data for the sprites.
  • the data mapped to one sprite is acquired in units of lines and loaded into the main RAM 25. This is because when a pixel group that can be drawn to the horizontal line of the drawing is mapped to UV space, the polygon may be mapped to any female in the UV space, whereas the sprite is parallel to the u axis. It is also a force that can only be mapped to a smt.
  • the cache of the texture cache block 126 is 64 bits ⁇ 4 entries, and the block replacement algorithm is LRU (least recently used).
  • the color palette RAMI 1 uses the bilinear filter for the RGB and translucent composition (1- ⁇ ) values included in the entry indicated by the index where the texel data input from the texture cache block 126 and the member Palette are connected. Output to 130. Bilinear filter.
  • the parameter BFP, depth value, and drawing X coordinate Xr are output to the linear filter 130 as they are.
  • the bilinear filter 130 performs bilinear filtering.
  • the simplest pixel drawing color calculation method is the pixel coordinates (UX,
  • FIG. 21 is an explanatory diagram of pilinear filtering by the pilinear filter 130.
  • the pi-linear filter 130 calculates the calorimetric average of RGBiiS! Kl—H) values of 4 texels near the pixel coordinates (UX, VX) mapped to the UV space, and draws the pixels. Determine the color. This complements the texel color smoothly and makes the texel boundary in the mapping result inconspicuous.
  • bilinear filtering is expressed by the following equation (pilinear filtering equation). However, according to the following equation, “u” is the decimal part of the U coordinate UX, “v” is the decimal part of the V coordinate VX, “nu” is (1 ⁇ u), “nv” is (1 ⁇ v) .
  • R R0-nu-nv + Rl -u-nv + R2-nu'v + R3-u'v
  • G G0-nu-nv-t-Gl-u-nv + G2-nu-vH-G3-u-v
  • B B0-nu-nv + Bl -u-nv + B2-nu-v + B3'U-v
  • ⁇ 0 ⁇ ⁇ ⁇ ⁇ + ⁇ 1 ⁇ ⁇ ⁇ ⁇ + ⁇ 2 ⁇ ⁇ ⁇ ⁇ + ⁇ 3 ⁇ ⁇ ⁇ ⁇ ⁇
  • R0, Rl, R2 and ⁇ 3 are the S4 texel 0R values, respectively
  • GO, Gl, G2 and G3 are the G values of the upper texels
  • BO, Bl, B2 B and B3 are the B values of the four texels, respectively
  • AO, Al, A2 and A3 are the (1 ⁇ ) values of the upper B4 texels, respectively.
  • the bilinear filter 130 calculates the RGB value and the power value (that is, (1 ⁇ 1) value) of the calculated pixel, Draw in depth and output to force-render blender 132 along with i3 ⁇ 4mark x.
  • FIG. Line buffer block 134 is line buffer LB1 and 1LB2 ⁇ ", and when one line buffer is shelved for display, it is used for drawing» line bufferer, and alternates between display and drawing.
  • the line buffer LB1 is used for display and LB2 is used for display according to the horizontal scan count signal HC and vertical scan count signal VC from the video timing generator 138.
  • the RGB value for each pixel is output to the video encoder 136.
  • the Power Rablender 132 allows for translucent synthesis. Specifically, it is as follows.
  • the color renderer 132 displays the RGBifi3 ⁇ 4 (1— ⁇ correction of the pixel supplied from the pixel dither 122 or the linear filter 130 and the drawing ⁇ pixel position (the pixel indicated by the drawing mark ⁇ r) of the line buffer LB of the drawing 3 ⁇ 4 ⁇ . ) ! Using the RGB values contained in the ⁇ , save the alpha blending according to the following formula, and write the result to the drawing pixel position of the same line buffer LB.
  • Rb Rf- (l- ar) + Rr
  • “l ⁇ a r” is a value (1 ⁇ a) given from the pixel dither 122 or the bilinear filter 130.
  • “Rr”, “Gr”, and “Br” are RGB values given by the pixel dither 122 or the linear filter 130, respectively.
  • “Rf J,“ Gf ”, and“ Bf ” are the fcRGB values obtained by drawing pixel position movement of the line buffer LB, which are used for drawing, respectively.
  • the Rr, Gr, and Br terms in the above equation are Rr. Ar, Gr-ar, and Br 'ar respectively.
  • the calculation circuit is simplified by preparing the calculation results of ⁇ , G r- ⁇ ⁇ , and Br'ar as Rr, Gr, and Br.
  • the video encoder 136 receives the RGB value input from the live buffer LB1 or LB2 used for display and the timing information input from the video timing generator 138 (composite sync signal SYN, composite blanking signal BLK, first flag signal). BST and line alternating signal LA) are converted into a data stream VD representing a composite video signal corresponding to signal VS.
  • the signal VS is a signal for instructing the television; 3 ⁇ 43 ⁇ 4 (NTSC, PAL, etc.).
  • the video timing generator 138 uses the horizontal clock signal HC and vertical signal VC as well as the composite sync signal SYN, composite blanking signal BLK, burst flag signal BST, and line alternation based on the input clock. Generate timing signals such as signal LA. ⁇ ⁇ Count signal HC is counted up every system clock cycle and is reset when scanning of one horizontal line is completed. Also, the vertical count signal VC is counted up at the end of scanning of the 1Z2 horizontal line, and the vertical count signal VC is reset when one frame scan is completed.
  • the sort used in the sorting process by YSU19 is heap sorting.
  • the polygon structure array sorting process and the sprite structure array sorting process are performed separately.
  • the array element is the polygon structure array in the 3 ⁇ 4 ⁇ of the polygon structure array sort processing. This refers to the instance of the polygon structure, and for the sorting process of the sprite structure array, refers to the sprite structure array and the sprite structure material instance, respectively.
  • an array element is defined as an indexed variable ( ⁇ ⁇ ) for assigning a value, or as the value itself assigned to an indexed variable.
  • ⁇ ⁇ an indexed variable
  • the element of the array as a variable (Ai) is “element”, and the value assigned to that variable is “element value” or “element value”. Call it.
  • Figure 22 shows the heap structure after array heap construction by YSU19 in Figure 10.
  • Figure 2 the number of elements in array A is 10, and the element values of elements A [0] to A [9] before Y sorting are expressed as element values ev0 to ev9, respectively.
  • the heap structure in this embodiment has a binary tree structure, and two children are connected to one parent.
  • parents who have only one child.
  • Parents have a high level of power over their children. No particular rules are set for the ranking between two children.
  • the ranking means sort rules 1 to 4 ( ⁇ for non-interlaced scan is sort rules 1 to 4.
  • the rank is the element value defined by sort rules 1 to 4 ( ⁇ for non-interlaced scans is sort rule ⁇ to 3) (gamma sort of polygon structure array ⁇ is the element value of polygon structure array)
  • Y sort of the sprite structure array it indicates the priority order (between element values of the sprite structure array). Since the rank is higher at the top of the tree structure, the element value ev3 is the highest rank element value in the example of FIG.
  • the method of the heap structure to main RAM25 is explained.
  • the highest order of parent elements is ordered from the top of the array in memory.
  • the element values whose rank is determined are the element values of the children of the heap structure and A i Changed and stored. Therefore, the element value of the parent with the highest rank is placed at the end of the array and separated from the heap structure.
  • the heap structure is carried into the memory array by ll, which is the reverse of general fermentation. This point will be described using the heap structure of FIG. 22 as an example.
  • FIG. 23 is an explanatory diagram of a method for storing the heap structure of FIG. 22 into the main RAM 25.
  • the element values are input from the end of the array A on the main RAM 25 in the descending order of the parent element value.
  • the rank is fixed and the highest rank placed at the end A [9] of the array A, the parent element value ev3, and the array A
  • the element value ev5 of the child of the heap structure created in the crane at HA [0] is ⁇ ⁇ 1 and the element value ev
  • the first element A [0] with 3 in Tsuruuchi is separated from the heap structure.
  • the reason is as follows. '' As mentioned above, YSU19 uses the pulse signal (polygon
  • ⁇ pulse signal PPL, sprite: 3 ⁇ 4 ⁇ pulse signal SPL is output to RPU9.
  • the RPU 9 Upon receiving these pulse signals, the RPU 9 reads out the element value whose order has been determined, that is, the structure instance whose order has been determined, from the top of the array and performs drawing processing. For this reason, the heap structure is carried into an array on the main RAM 25 in 1 fermentation (reverse to the general order).
  • the size of one element of the array differs between the polygo »structure and the sprite structure.
  • one element of the array (one polygon structure instance) consists of 16 bytes.
  • one element of (one sprite structure f material instance) consists of 8 bytes. Consists of (see Figure 13, Figure 15, and Figure 16).
  • polygon structure In the case of a polygon structure, one element of the array (one polygon structure instance) consists of 16 bytes. In the case of a sprite structure, one element of (one sprite structure f material instance) consists of 8 bytes. Consists of (see Figure 13, Figure 15, and Figure 16).
  • polygon structure see Figure 13, Figure 15, and Figure 16.
  • YSU19 sorts the polygon structure array and performs sawing of the splice structure array independently.
  • FIG. 24 is a flowchart showing an example of the overall flow of the process of sorting the polygon structures by YSU 19 in FIG. In FIG. 24 and FIGS. 25 to 27, which will be described later, unless otherwise specified, when referring to an array, it indicates a polygon structure array.
  • the head address of the sprite structure array is also obtained from the YSU19 ⁇ control register ⁇ Sprite-Array-YSU-Base-AddressJ (not shown) force, and The number of elements “s #” of the right structure array is taken from the control register “Number—of—Sorted—Spritesj (not shown) in YSU19.
  • YSU19 constructs a heap structure (heap construction process S). Details of heap construction processing will be described later. After this process is completed, the entire array becomes a heap structure, and in the connection of each element, it is guaranteed that the rank of the parent element is higher than the rank of the child element. Therefore, after the heap construction process, it is determined that the rank of the highest-ranked parent, that is, the parent element of “root” is the highest among all the elements of the array.
  • YSU19 exchanges the value of the element of the parent of “root” and the value of the element of the child of the heap structure each time one element is determined from the highest ranked one (alternatively, A L). This means that the parent element of the “root” whose order has been determined is separated from the heap structure and aligned from the top of the array on the main RAM 25.
  • YSU19 determines the value of the parent element identified as the highest-ranked element in step S22 after step S21, that is, the value of element [s-l] and the value of the child element of the heap structure
  • “0” is set in the variable
  • step S23 the value of element [0] and the value of element [s—1] are exchanged.
  • the value of element [0] is changed to element [s—1]
  • the value of element [s—1] is changed to element [0], and 3 ⁇ 4A.
  • element [0] is detached from the heap structure.
  • step S23 determines the value of the parent element determined as the highest-ranked element in the current heap structure, that is, the value of element [s2 1] and the end of the heap structure at that time. Is replaced with the value of the child element, that is, the value of element [i] after increment (step S25).
  • the value of element [i] is assigned to element [s—1]
  • the value of element [s—1] is assigned to element [i].
  • element [i] is detached from the heap structure.
  • step S24 YSU19 sends a signal PPL to notify the confirmation of the order of one element. 1 pulse is output to RPU9. By the way, one pulse of the norse signal SPL is output to RPU9 in 3 ⁇ 4 ⁇ of the sorting of the sprite structure array.
  • step S25 YSU19 increments the value of the variable. Therefore, the .variable is always set to point to the heap structure. This means that the element [i] before incrementing is disconnected from the heap structure, and the element [i] after incrementing becomes a new heap structure.
  • step S26 determines in step S26 that the variable is equal to “s ⁇ 1”
  • the Y-sort processing is complete and the processing proceeds to step S27.
  • step S27 the order of any child element is higher than the parent element 3 ⁇ 4 ⁇ , and the value of the child element and the value of the parent element are changed by A i and ⁇ ⁇
  • the process of performing the same process up to the end of the heap structure with the child element as the new parent element is called “down heap process”. The details of the down heap process will be described later 0 "
  • step S27 down heap processing is performed with element [s-1] as the parent at the start of processing and "s-i" as the number of elements in the heap structure.
  • a heap structure is built. Therefore, it is determined that the parent of the “root” after step S27 is the highest in the current heap structure. After that, the process returns to step S23 and sort processing is performed.
  • FIG. 25 is a flowchart showing an example of the flow of heap construction processing in step S21 of FIG. Referring to FIG. 25, in step S40, YSU 19 sets “0” to variable j. Change 3 ⁇ 4j is Dow In the initial state, it points to the element of the entire heap structure, that is, element [0].
  • YSU 19 specifies the parent element [P] of element [j].
  • the index “p” of the parent element [P] is calculated by the following formula.
  • “s” is element i e of the entire heap structure. However, the quotient of the right side must always be obtained »e and the remainder is rounded down.
  • p s— (s— j) / 2
  • step S42 YSU19 uses the parent element [p] identified in step S41 as the parent, and performs “down heap processing with sj as the number of elements in the entire heap structure. Details of down heap processing will be described later.
  • YSU19 increments the value of variable j in step S43, and in step S44, YSU19 is an incremented variable; If smaller than “1”, the process returns to step S41.
  • the value of the variable j after the increment is equal to “s ⁇ l”, the YSU 19 ends the heap construction process and proceeds to step S22 in FIG.
  • FIG. 26 is a flowchart illustrating an example of the flow of the down heap process. This down heap processing is described in step S27 in FIG. 24 and step S42 in FIG.
  • YSU 19 determines how many children 3 ⁇ 4 ⁇ are in the parent from the index of the parent element and the number of elements in the heap structure 3 ⁇ 4 ⁇ . Identify. YSU19 sets the index of the parent element to “pj” and the number of elements in the heap structure to be “sj” and the value of 2 (s ⁇ p) is less than “s”. 3 ⁇ 4, same as “s”, C ⁇ is the number of children c ⁇ i, larger than “ s ”, and is the number of children.
  • step S61 when the YSU 19 determines that the number of children is “0”, it ends the down heap processing.
  • step S62 if YSU19 determines that the child is 3 ⁇ 4 ⁇ "1", it proceeds to step S63, sets that one child as a comparison with the parent, and proceeds to step S66. On the other hand, if YSU19 determines in step S62 that the child is not “1”, that is, “2”, it proceeds to step S64. ,
  • step S64 YSU19 has “2” children, so which child has the higher rank.
  • a rank comparison process is performed. Details of the rank comparison process will be described later.
  • step S65 YSU 19 sets the child with the higher rank as the ratio ⁇ with the parent as a result of the rank comparison process, and proceeds to step S66.
  • step S66 after step S63 or after step S65, the YSU 19 performs a rank comparison process between the child element set in the comparison table and the parent element.
  • step S67 YSU 19 determines that the parent rank is high: ⁇ , and the down heap process is terminated there.
  • YSU 19 exchanges the value of the child element of the ratio ⁇ with the value of the parent element in step S68.
  • step S69 YSU19 sets the child element whose value has been exchanged (that is, the element in the crane whose value is the parent element before the exchange) as a new parent, and proceeds to step S60.
  • FIG. 27 is a flowchart illustrating an example of the flow of rank comparison processing. This rank comparison process is performed in steps S64 and S66 of FIG.
  • ranks are compared between two polygon structure materials based on sort rules 1 to 4 (non-interlaced scan: ⁇ is sort rules 1 to 3).
  • is sort rules 1 to 3
  • rank comparison process ranks are compared between two elements of an array based on sort rules 1 to 4 (non-interlaced scan 1 sort rule:! To 3).
  • the two elements (polygon structure instances) of the ratio ⁇ are written as elements “ ⁇ ” and “ ⁇ ”, respectively.
  • step S80 YSU 19 compares the minimum ⁇ coordinate with the ⁇ coordinate of the drawing start line (drawing top line) for each element “ ⁇ ” and “ ⁇ ”.
  • the elements “ ⁇ ⁇ ” and “ ⁇ ” of the ratio ⁇ are polygon structures, they have the smallest value among the members Ay, By and Cy (see Fig. 13 and Fig. 15). , Treated as the minimum Y coordinate.
  • the elements “A” and “B” of the comparison are sprite structure frl stance, the value of member Ay +256 when scissoring is enabled, the value of member Ay itself when scissoring is disabled Minimum Y Treated as coordinates (see Figure 16).
  • step S81 YSU19 determines that only the minimum Y coordinate of element “A” is less than or equal to the Y coordinate of the drawing start line, that is, only the polygon based on element “A” is the drawing destination line. Interact with Otherwise, if it is determined that it is above the drawing start line, the process proceeds to step S82, where it is determined that the heel of the element “A” is high! /, And the rank comparison process is terminated (sort rule 1).
  • step S83 YSU19 determines that only the minimum Y coordinate of element “B” is less than or equal to the Y coordinate of the first drawing line of the element: ⁇ , that is, only the polygon based on element “B” is intersected with the first drawing line. Or, it is determined that it is above the drawing start line ⁇ , proceed to step S84, determine that the rank of element “B” is high, and end the rank comparison process (sort rule 1) .
  • the minimum Y coordinate of both elements “A” and “B” is less than or equal to the Y coordinate of the drawing start line: ⁇ means that the polygon based on the elements “AJ and“ BJ ”intersects the drawing start line. Force ⁇ or means that it is above the drawing start line. Polygons based on elements "A” and “B” where the minimum Y coordinate of both element "A” and “BJ is above drawing start line Is not drawn on the screen, the order determined by Sort Rule 1 does not affect the drawing result. This also applies to the sprite.
  • step S85 YSU19 determines that the minimum Y coordinate of both elements “A” and “B” is less than or equal to the Y coordinate of the drawing start line ⁇ , that is, elements “A” and “B”. 3 ⁇ 4 ⁇ , when both polygons based on are crossed with the drawing start line, proceed to step S86, and the depth value that compares the rank between elements “A” and “B” by comparing the minimum Y coordinate (Sort rule 3).
  • the polygon structure has a member depth (see FIGS. 13 and 15), and the order is determined by the magnitude of this value. The same applies to sprites, and the order is determined by the magnitude of the member Depth value of the sprite structure (see Fig. 16).
  • the number of bits of member Depth is the polygon structure, the sprite structure when scissoring is enabled, and the fluff when scissoring is disabled. Since the YSU19 compares the structure of the right structure with the structure of the same format fr V stances, it is possible to perform large / J IJ determination simply by comparing the member Depth values. .
  • step S86 YSU19 determines that the depth value of element "A" is greater than or equal to the depth value of element "B" as a result of the depth value comparison ⁇ ⁇ Proceeds to step S88 ,element “It is determined that AJ has a higher rank, and the rank comparison process is terminated. On the other hand, YSU19 determines that the depth value of element“ A ”is smaller than the depth value of element“ B ”as a result of the depth value comparison. If it is determined, the process proceeds to Step S89, where it is determined that the rank of the element “B” is high, and the rank ratio »the process is terminated.
  • step S85 YSU19 determines that the minimum Y coordinate of both elements “A” and “B” is greater than the Y coordinate of the drawing start line! / Compare coordinates.
  • the minimum Y coordinate value on the line of the field to be drawn and the smallest minimum Y coordinate on the line of the previous field Comparison is made assuming that the value of is the same (sort rule 4).
  • the rank comparison process in the non-interlaced scan mode the maximum / J and the large Y coordinate / J are simply compared.
  • step S91 YSU19 determined that the minimum Y coordinate of both elements ⁇ A '' and ⁇ B '' are the same: ⁇ , proceeding to step S86, and comparing element ⁇ A '' ”And“ B ”are judged (sort rule 2). On the other hand, in step S91, YSU 19 determines that the minimum Y coordinate of elements “A” and “B” is obtained: ⁇ , and proceeds to step S92.
  • step S92 YSU 19 determines that the minimum Y coordinate of element “A” is smaller than the minimum Y coordinate of element “B”, proceeds to step S93, and determines that element “A” has a higher rank. Then, the rank comparison process ends (sort rule 1). On the other hand, YSU19 determines that the minimum Y coordinate of element “A” is greater than or equal to the minimum Y coordinate of element “B”. ⁇ ⁇ Goes to step S94 and determines that element “B” has a higher rank. End the rank comparison process (sort rule 1).
  • the minimum of graphic elements (polygon, sprite)
  • the structural materials for each graphic element are sorted (sort).
  • the structure instance that is rounded once is placed in the recycle buffer, and the ⁇ coordinate of the drawing line Until the maximum Y coordinate of the stance is exceeded (for the polygon, the largest coordinate of the three vertex coordinates, and for the splice, the largest coordinate of the four vertex coordinates) Used. Therefore, since it is only necessary to read out the sorted structure instances in order and perform the drawing process, the process of searching for the structure instance to be drawn at that time from all the structure instances each time drawing is performed. S is not necessary, and processing can be speeded up.
  • a large-capacity buffer such as a frame buffer
  • a smaller-capacity buffer a line buffer or a pixel that is less than one line
  • a pixel buffer that renders it is possible to display a 3D image that combines many graphic elements.
  • writing new pixel information to the line buffer LB1 or LB2 (a structure instance can be reused for drawing a new pixel 3 ⁇ 4 ⁇ Are stored in the recycle buffer 110. Therefore, each time a new pixel that shelves the same structure instance is drawn, the same structure instance is retrieved from the main RAM 25 in which all the sorted structure instances are stored. The process of repeatedly reading out is no longer necessary, and the processing speed can be further increased.
  • a depth comparator 112 is provided, and the newly read structure instance in the order in which the YSU 19 is rearranged and the structure instance stored in the recycle buffer 110 for reuse. And the drawing order (that is, the pixel drawing order based on these structural instances). For this reason, after recognizing, the reusable structure # ⁇ stance is sent to the recycle / rebuffer 110 in order; The structure # ⁇ stance is totaled in the proper drawing order (that is, in descending order of depth). As described above, in the recycle buffer 110, the reusable structural materials are edited in an appropriate drawing order, and these are the newly read structural instances in the order in which the YSU 19 is rearranged. In addition, since the drawing I fermentation is further determined, it is possible to always draw in an appropriate drawing order (that is, in order of increasing depth value).
  • a plurality of graphic elements are displayed, and the minimum ⁇ coordinate of the plurality of graphic elements is the same 3 ⁇ 4 ⁇ , and the sorting rule 2 force S is applied to form a screen.
  • each line Te per cent Rere, c descending order (ZJ, the jig) in the structure instance aligned depth value Thus, in each line, the graphic elements based on structure instances are drawn in the order of magnitude potato Debs value .
  • the structure instances are sorted in the order of the smallest Y coordinate in ascending order (sort rule 1), and in the same order of the smallest Y coordinate, in order of increasing depth value 3 ⁇ 4 ⁇ (sort rule 2)
  • sort rule 1 the sorting rules 1 and 2
  • the depth value is not necessarily large, and drawing in the order of the items is not guaranteed.
  • the sort rule 3 is applied to the plurality of graphic element force pixels that should be displayed on the first line of the screen, and the minimum Y coordinate is related to the minimum Y coordinate. Assuming that they are the same, the structural elements are arranged in descending order of the depth value, so the graphic elements based on the structural elements are drawn in the order of the depth value even in the first line.
  • a prefetch buffer 108 is provided, and this prefetch buffer 108 is input to the structure f material instance in the order in which the YSU 19 is sorted and the output of the structure material instance to the deb compander 112. It is a buffer mechanism with timing. This can reduce the waiting time for RPU9 to input structure instances in the order sorted by ⁇ SU19.
  • the line buffers LB1 and LB2 are mounted, the cost can be kept lower than using a frame buffer, and the number of pixels less than the number of pixels in one line can be achieved. Rendering can be done with simpler circuit configuration (with easy control) than using a pixel buffer that contains pixel data.
  • the polygon structure instance and the sprite structure instance are sorted separately, the polygon structure instance and the sprite structure # ⁇ instance form Sorting is easy even with different ⁇ , which increases the effectiveness of the memory area to make the structure instance in the crane.
  • the merge sorter 106 is provided so that the polygon structure instance group and the sprite structure before the drawing process are finished. Since the group is merge-sorted, an appropriate drawing process can be performed.
  • the depth value is drawn from the large size, so that appropriate translucent composition can be realized.
  • YSU 19 outputs pulses PPL and SPL to RPU 9 each time it determines one structural instance force S1 from the highest in sorting. For this reason, YSU9 can read the structure instance sequentially without waiting for completion of sorting of all structure instances.
  • Sort of the instance, V, which is the previous vertical blanking period, starts with ⁇ 1 while the field is displayed, so that there is room for calculation before sorting. You can secure a sufficient amount of time.
  • sorting is performed immediately after the start of the vertical blanking period, so a sufficient time can be secured for the calculation before sorting (see Fig. 9 (a)). ).
  • the sorting technique implemented by YSU19 is heap sorting
  • the sorting results for the structural material instance are determined one by one, and each time the sorting result is confirmed, the sorting method is determined.
  • the mechanism that outputs the loss PPL and SPL can be made easy.
  • the time required for sorting the entire structure can be reduced.
  • the coordinates of ⁇ are the minimum Y coordinates in the sorting rules 1 to 4. For this reason, since all graphic elements can be sorted under the same conditions, drawing can be performed in the correct drawing order.
  • each line is The graphic elements (polygon, soft, light) were drawn first in descending order of depth values.
  • by drawing from a graphic element with a small depth value it is not necessary to draw the graphic element that should be displayed in the back because it does not need to be drawn for the part that overlaps the already drawn graphic element. It is a group that can plan.
  • the line buffers L Bl and LB2 capable of carrying data for one line of the screen are provided in the RPU 9 for drawing.
  • the RPU 9 employs a V and a double buffer; 3 ⁇ 4, however, a single buffer method can be employed, or three or more buffers can be employed.
  • YSU19 is not updated whenever the sorting of one polygon structure instance is confirmed.
  • Pulse PPL can be output when the sort of the material structure is determined. No. The same is true for Rus SPL.

Abstract

YSU(19)は、ポリゴン#0~#7の最小Y座標が小さいもの順で並ぶように、対応する構造体インスタンス#0~#7をソートする。RPU(9)は、YSU(19)がソートした構造体インスタンス#0~#7を順番に読み出して、読み出した構造体インスタンスに基づいて、対応するポリゴンの描画を実行する。

Description

明細書 描画装 び描画方法 技術分野
本発明は、フレームバッファを使用せずに品質の高レ、三次元イメージの表示を可能とする 描画装 びその関連技術に関する。 背景技術
従来では、三次元イメージを表^ rる 、 1フレーム以上のイメージデータを描画するこ とが可能なフレームバッファやビデオメモリを、画像生成装置に実装するのが一般的であつ た (特開 6— 348861号公報、特開平 7— 282270号公報)。
しかしながら、画像生成装置にフレームバッファ等を実装しょうとするど、少なくとも一つの イメージ全体を格納する容量のメモリが必要不可欠となり、コストが高くなる。高品質の三次 元イメージを表示するために、ダブルバッファ方式を採用すると、少なくとも二つのフレーム バッファを! ^内可能な容量のメモリが必要となるため、更にコストが高くなる。
一方、二次^メージを表示する^ 1ま、必ずしもフレームバッファは必要なぐラインパッ ファでも十分である。しかし、ラインバッファを用いて、三次元イメージを表示しょうとすると、 従来の画 装置の描画能力では、描画可能なポリゴンの ¾ ^限られてくる等、見る者が 満足するような品質の高い表示を行うことが困 i ある。
そこで、本発明は、少ない記'隨量の、描画のためのバッファを用いながらも、品質の高い 三次元イメージの表示を可能とする描画装置及びその関連技術を撤することを目的とす る。
また、本発明の他の目的は、少ない記憶容量の、描画のためのバッファを用い がらも、 半透明合成を可能として、より品質の高レ、三次元イメージの表示を可能とする描南装«び その関連技 を»することである。
さらに、本発明の他の目的は、インタレーススキャンによる表示を行う においても、少 ない記' »量の、描画のためのバッファを用いながらも、品質の高い三次元イメージの表示 を可能とする描画装»びその関連技術を することである。 発明の開示
本発明の第 1の観点によれば、描画装置は、それぞれが複数のピクセルから構成される平 行な複数のラインを、そのラインに垂直な方向に並べて構成されるスクリーンに、多角形状 のグラフィック要素 むグラフィック要素ごとの表示情報に基づ 、て、嫌己グラフィック要素 の組み合わせからなるスクリーンイメージを表示するための描画を行う描画装置であって、 IflB表示情報に含まれる、 tiff己グラフィック要素の嫌己ラインに垂直な方向の位置を示す座 標が、昇順あるいは降順のいずれかで並ぶように、謝己グラフィック要素ごとの lift己表示情 報を並べ替えるソート手段と、 Itrt己ソート手段が並べ替えた ttrlB表示情報を順番に読み出し て、読み出した肅己表示情報に基づいて、対応する膽己グラフィック要素の描画を菊 る 描画手段と、を備える。
この構成によれば、グラフィック要素のラインに垂直な方向の位置を示す座標が、昇順ある V、は降順の 、ずれかで並ぶように、グラフィック要素ごとの表示情報を並べ替えて!/、る (ソー ト)。従って、ソート後の表示情報を順番に読み出して、描画処理を行うだけでよいため、描 画のたびに、全ての表示情報の中から、そのとき描画すべき表示情報を検索する処理が不 要になり、処理を高速化できる。以上の結果、 1フレーム以上のイメージを樹内するための大 容量のバッファ (フレームバッファ等)を実装する必要は必ずしもなぐより容量の小さ ヽパッ ファ (ラインバッファや、 1ラインに満たな 、ピクセルを描画するピクセルバッファ等)を実装し た場合であっても、多くのグラフィック要素を組み合わせたスクリーンイメージの表示が可能 になる。特に、二次元イメージ表示のための描画処理と比較して、高い処理能力が必要な三 次元イメージ表示のための描画処理にも好適である。 ここで、昇順とは、小さいほうから大きいほうへの順に ベることを意味し、降順とは、大き
V、ほうから小さ 、ほうへの順に並べることを意味する。
上記描画装置において、 it己描画手段は、 ΙίίΙΒ^クリーンを構成する tiff己ピクセルのうち 第 1の所; »分のピクセル情報を 内可能であって、鶴内した廳己ピクセル情報を鎌 3^ク リーンイメージを表示するために出力し、出力した嫌己ピクセル情報が 内されて!/ヽた位置 に、前記スクリーンイメージを表示するための新たなピクセル情報を格納する第 1バッファ (例えば、図 1のラインパッファ LB1, LB2に相当)と、第 2の所定数分の前記グラフィック要 素の嫌己表示情報を搬内可能であって、膽己表示情報に基づく WISピクセル情報が肅己第 1パッファに櫞内された後に、当該表示' [«に基づく他のピクセル情報を嫌已第 1バッファに 搬内するために、当該表示情報が再利用可能なときに、再利用のために送られてくる順番で、 当該表示情報を鶴内し、 tiff己第 1バッファが前 »fたなピクセル情報を 内する期間が到来 したときに、辦内した順番で嫌己表示情報を出力する第 2バッファ (例えば、図 1のリサイクル ノッファ 110に相当)と、灘己ソート手段が並べ替えた順番で読み出された嫌己表示情報の うち、鍵己第 1バッファに編内すべき期間が到来した嫌 ef?たなピクセル情報を生成するた めの嫌己表示情報に含まれる表示滅情報と、辦己第 2バッファから出力される觸己表示情 報に含まれる表示 «情報と、を比較し、予め定められた纏 従って、いずれかの鍵己表 示情報 ¾1択して先に出力する比較手段と、嫌己比較手段から出力された fit己表示情報に 基づレ、て膽己ピクセル情報を生成し、嫌己生成したピクセル情報を鍵己第 1バッファに書き 込む書き込み手段と、 ¾ra p0
この構成によれば、第 1バッファへの新たなピクセル情報の書き込み (新たなピクセルの描 爾のために、表示情報が再利用可能な^ ^は、その表示情報は、第 2バッファに觸内され る。このため、同じ表示情報を使用する新たなピクセルの描画のたびに、ソート後の全ての 表示情報が編内され モリから、その同じ表示情報を繰り返し読み出す処理が不要になつ て、より処理の高速化を図ることができる。
また、比較手段を設けて、ソート手段が並べ替えた順番で新たに読み出されだ表示',と、 再利用のための第 2バッファに觸内された表示情報と、の描画順序 (つまり、これら表示情報 に基づくヒ。クセルの描画順序)を判定している。このため、判定終了後に、再利用可能な表 示情報を第 2バッファに送って順番に棚するだけで、第 2バッファには、再利用可能な表 示情報について、適切な描卿酵で表示'隨が辦内される。このように、第 2バッファには、 再利用可能な表示'隨について適切な描画順序で ¾内されているところ、これらは、ソート 手段が並べ替えた順番で新たに読み出された表示情報との間で、さらに描画順序が判定さ れるので、常に適切な描画順序での描画が可能となる。
上記描画装置において、複数の fit己グラフィック要素を表示する ^であって、その複数 のグラフィック要素の前 標が同じ^ \嫌己ソート手段は、その複数のグラフィック要素 に対しては、賺己表示情報に含まれる表示深度情報が示す表示深度の昇順ある ヽは降順 のいずれかで肅己表示情報を並べる。
この構成によれば、複数のグラフィック要素を表示する であって、その複数のグラフィ ック要素の座標が同 D¾^、スクリーンを構成する各ラインにおいて、表示^ gの昇順あるい は降順のいずれかで表示情報が並べられる。従って、各ラインにおいて、表示情報に基づく グラフィック要素は、表示深度の大きレ、もの順ある!/、は小さ 、もの順のレ、ずれかで描画され る。表示深度の昇順で表示情報を並べる は、グラフィック要素は、表示深度が小さいも の順で描画されるので、仮に表示 ί«が大き ヽグラフィック要素の描画処¾ ^間に合わなか つた ¾^でも、表示後の見た目の印象を良くすることができる。一方、表示深度の降順で表 示情報を並べる^は、グラフィック要素は、表示 «が大きレ、もの順で描画されるので、半 透明合成 ¾1切に行うことができる。何故ならば、半透明のグラフィック要素の描画色は、当 該グラフィック要素の奥にあるグラフィック要素の描画色に依存するため、グラフィック要素を 奥から順に描画する必要がある。
この描画装置において、複数の tiff己グラフィック要素が、辦 クリーンの先頭ラインに表 示すべきピクセル ¾ ^む齢、肅 3ソート手段は、その複数のグラフィック要素に対しては、 tiff己座標の大小に関係な《 tfff己表示深度の昇順あるいは降順のいずれかで Hit己表示情 報を並べる。
この構成によれば、複数のグラフィック要素が、スクリーンの先頭ラインに表示すべきピクセ ル む^ \それらの座標に関係なぐつまり、それらの座標を同一とみなして、表示渡 の昇順あるいは降順のいずれかで表示情報が並べられる。 て、先頭ラインにおいて、表 示情報に基づくグラフィック要素は、表示深度の大き!/、もの順ある 、は小さレ、もの順の 、ず れかで描画される。表示情報を表示座標順 (グラフィック要素の、ラインに垂直な方向の位置 を示す座標順)でソートし、表示座標の同じものについては表示深度順でソートする 、 先頭ラインの描画にお!/、ては、必ずしも表示深度の昇順または降順での描画が保証されな V、が、この構成によれば、先頭ラインから表示深度順での描画を行うことが可能となる。表示 深度の昇順で並べる効果及び降順で並べる効果は上記と同様である。
上記描画装置において、 tirts —ト手段は、所定数分の肅己グラフィック要素の嫌己表示 情報の並ぺ替えが完了するたぴに、その旨を嫌己描画手段に通知し、搬己描画手段は、前 記ソート手段からの前記通知を受けて、並べ替えが完了した前記表示情報を順次読み出 す。
この構成によれば、表示情報のソートが確定するたぴに、その都度、その旨の通知がなさ れるので、描画手段は、全表示情報のソートの完了を待つことなぐ逐次、表示情報を読み 込むことができる。
この描画装置において、辦己所 分の膽己グラフィック要素の嫌己表示情報は、 1つ分 の tiff己グラフィック要素の ΙίΐΙ己表示情報である。
この構成によれば、 1つ分のグラフィック要素のソートが確定するたびに、その旨の通知が なされるので、描画手段は、ソートが確定したグラフィック要素の表示情報をソート完了直後 から読み込むことができる。
上記描画装置において、嫌己描画手段は、第 1バッファ及ぴ第 2バッファに加えて、さらに、 第 3バッファ (例えば、図 1のプリフェッチバッファ 108に相当)を含み、この第 3バッファは、 第 3の所定数分の前記グラフィック要素の前記表示情報を觸内可能であって、前記ソート手 段が並べ替えた順番で読み出される MI己表示情報を、読み出された順番で搬内し、 m 1バッフナに鶴内すべき期間が到来した辦3¾?たなピクセル情報を生成するための tin己表 示情報を鶴内された順番で出力し、廳己比較手段は、鍵己第 3バッファから出力される肅己 表示情報に含まれる表示深度情報と、再利用のために送られてきた順番で m内された 己 第 2バッファから出力される嫌己表示'隨に含まれる表示深度情報と、を比較し、歸己予め 定められた纖 IJに従って、 V、ずれかの觸己表示情報 ¾1択して先に出力する。
この構成によれば、第 3バッファ力 S設けられ、この第 3バッファは、ソート手段がソートした順 番での表示情報の入力タイミングと比較手段への表示' ft¾の出力タイミングとの緩衝機構で ある。これにより、ソート手段がソートした順番での表示情報の入力の、描画手段にとっての 待ち時間を削^ eきる。
上記描画装置において、嫌己予め定められた纖 ijは、嫌己比 の結果、大きい嫌己表示 鍵を示す嫌己表示深度情報 む嫌己表示情報 ¾1択することである。
この構成によれば、グラフィック要素は、表示深度の大きいもの順で描画される。その結果, 半透明合成 ¾ 切に行うことができる。
上記描画装置にぉ ヽて、鍵己ソート手段が並べ替えを節する際の グラフィック要素 の tfrtfii 標は、 tin己グラフィック要素の頂点の座標であって、最も大きい座標あるいは最も 小さい座標のいずれかである。
この構成によれば、全てのグラフィック要素に対して同じ条件でソートができるので、正しい 描卿醉で描画を行うことができる。
上記描画装置にぉレ、て、爾己第 1パッファは、少なくとも 1つの嫌己ラインを構成する複数 の ttff己ピクセル情報を觸内するバッファである。
この構成によれば、フレームバッファを棚する:^よりもコストを低く抑えることができる。 また、 1ラインに満たな Vヽピクセルを格納するピクセルバッファを使用する齢よりも簡素な 回路構成で (簡 よ制御で)描画を難できる。
上記描画装置にぉレ、て、嫌己ソート手段は、肅己表示情報の並べ替えを、ヒープソートに より剪 る。
この構成によれば、表示情報のソートが 1つずつ確定されるので、ソートの確定のたびに、 その旨を «1する機構を容易に »できる。また、全表示情報のソートに必要な時間のパラ ツキを少なくできる。
上記描画装置にお!/ヽて、膽己ソート手段は、 tinsグラフィック要素としてのポリゴンを表示 するための l己表示情報と、 tiff己グラフィック要素としてのスプライトを表示するための tiff己 表示情報と、で独立して肅碰ぺ替えを節する。
この構成によれば、ポリゴンのための表示情報と、スプライトのための表示情報と、の形式 及ぴサイズが異なって!/ヽる場合でも容易にソートが可能であり、表示情報を m内するための メモリ領域の使用効 高まる。
この描画装置において、肅雕画手段は、嫌己ソート手段が並べ替えた ItlfBポリゴンのた めの Ml己表示情報と、前記ソート手段が並べ替えた前 IB ^ブライトのための ΜΙΒ表示情報と、 を肅己ソート手段による並べ替えの纖 IJに準じてマージソートするマージソート手段をさらに 含む。
この構成によれば、ポリゴン及びスプライトが独立してソートされた^であっても、描画処 理の前にポリゴンのための表示情報群とスプライトのための表示情報群がマージソートされ るため、適切な描画処 可能となる。
本発明の第 2の観点〖こよると、描画装置は、それぞれが複数のピクセルから構成される平 行な複数のラインを、そのラインに垂直な方向に並べて構成されるスクリーンに、多角形状 のグラフ ック要素 ¾r ^むグラフィック要素ごとの表示情報に基づレ、て、インタレーススキャン により it己グラフィック要素の組み合わせからなるスクリーンイメージを表示するための描画 を行う描画装置であって、偶数フィールドを表示するために、嫌己グラフィック要素ごとの表 示情報を、第 1の纖 ljに従って並べ替え、 つ、 フィールドを表示するために、廳己グ ラフィック要素ごとの表示情報を、第 2の細 ijに従って並べ替えるソート手段と、
一ルドを表示する場合、その表示のために前記ソート手段が並べ替えた前記表示情報を順 番に読み出して、読み出した嫌己表示情報に基づいて、 応する Ml己グラフィック要素の描 画を実行し、かつ、前記偶数フィールドを表示する場合、その表示のために前記ソート手段 が並べ替えた肅己表示情報を順番に読み出して、読み出した肅己表示情報に基づいて、対 応する歸己グラフィック要素の描画を菊汁る描画手段と、を備え、鍵己第 1の細 Uは、肅己 表示情報に含まれる、 tiff己グラフィック要素の l己ラインに垂直な方向の位置を示す座標が、 昇順あるレ、は降順の 、ずれかで並ぶように、肅己グラフィック要素ごとの肅己表示情報を並 ベ替える際に、 flBffi標が、スキャンする奇数ライン又はその 1つ前の偶数ラインを示す前 記グラフィック要素については、当該グラフィック要素の嫌己座標が同一であるとして、嫌己 表示情報に含まれる表示深度情報が示す表示深度の昇順ある ヽは降順の 、ずれかで嫌己 表示情報を並べることであり、嫌己第 2の纖 IJは、嫌己表示情報に含まれる、 ttff己グラフイツ ク要素の fttM標が、昇順あるいは降順のいずれかで並ぶように、嫌己グラフィック要素ごと の嫌己表示情報を並べ替える際に、廳 flffi標が、スキャンする偶 イン又はその 1つ前の 奇 インを示す ilBグラフィック要素については、嫌继標が同一であるとして、肅己表示 情報に含まれる表示深度情報が示す表示深度の昇順ある 、は降順の!/ヽずれかで嫌己表示 'If報を並べることである。
この構成によれば、第 1の観点による発明と同様の作用効果を奏することに加えて、次の作 用効果を針る。
Figure imgf000010_0001
表示座 標 (グラフィック要素の、ラインに垂直な方向の位置を示す座標)が飛び越し走査により飛び 越されたラインを示す表示情報と、表示座標が描画纖のラインを示す表示情報とが、表示 文檢ラインの描画処理にぉレ、て共に読み出される。した力つて、これらの表示情報の示す表 示座標を同じ値とみなし、表示深鹿噴にソートを行うことにより、インタレーススキャンの:^ でも表示深度順での描画処理が保証される。表示深度の昇順で並べる効果及ぴ降順で並 ベる効果は上記と同様である。
以上の結果、インタレーススキャンによる表示を行う:^においても、 z少ない記'慮容量の、 描画のためのバッファ(第 1パッファ)を用レ、ながらも、品質の高!/ヽ三次元イメージの表示を 親できる。
上記描 装置において、 ttrt己描画手段は、 ttna クリーンを構成する tin己ピクセルのうち 第 1の所 分のピクセル情報を編内可能であって、鶴内した tiriBピクセル情報を嫌 ク リーンイメージを表示するために出力し、出力した前記ピクセル情報が編内されていた位置 に、 ttilS クリーンイメージ 示するための新たなピクセル'! f¾を する第 1バッファと、 第 2の所定数分の前記グラフィック要素の前記表示情報が 内可能であって、前記表示情 報に基づく歸己ピクセル情報が鍵己第 1バッファに搬内された後に、当該表示情報に基づく 他のピクセル†錄を黼 3第 1バッファに編内するために、当該表示 ' が再利用可能なとき に、再利用のために送られてくる順番で、当該表示情報を 内し、嫌己第 1バッファが膽己 新たなピクセル情報を格納する期間が到来したときに、格納した順番で嫌己表示情報を出 . 力する第 2バッファと、廳己奇 ¾ ィールドを表示する その表示のために嫌己ソート手 段が並べ替えた順番で読み出された膽己表示情報のうち、嫌己第 1パッファに格納すべき 期間が到来した前言 BSfたなピクセル情報を生成するための前記表示情報に含まれる前記表 示深度情報と、 tins第 2バッファから出力される嫌己表示情報に含まれる嫌己表示深度情報 と、を比較し、予め定められた纖 IJに従って、レ、ずれかの嫌己表示情報 択して先に出力 し、前記偶数フィールドを表示する場合、その表示のために前記ソート手段が並べ替えた順 番で読み出された廳己表示情報のうち、嫌己第 1パッファに編内すべき期間が到来した Iff!己 新たなピクセル情報を生成するための lift己表示情報に含まれる l己表示深度情報と、 ttif己 第 2バッファから出力される嫌己表示情報に含まれる歸己表示深度情報と、を比較し、前記 予め定められた麵 ϋに従って、 Vヽずれかの嫌己表示情報 ¾1択して先に出力する比較手段 と、觸己比較手段から出力された肅己表示情報に基づいて ttif己ピクセル情報を生成し、前 記 したピクセル情報を tine第 1バッファに書き込む書き込み手段と、 む。
この構成によれば、第 1の観点による発明に加えた第 2バッファ及び比較手段と同様の第2 バッファ及び比較手段を有している。このため、その ¾ ^と同様の作用効果を奏ずる。
上記描画装置にぉレ、て、複数の嫌己グラフィック要素が、嫌 3^クリーンの先頭ラインに表 示すべきピクセル む 、 ΙΐίΐΒソート手段は、 Ιίίΐ己第; Lの 及び fffl己第 2の 用せず、 の複数のグラフィック要素に対しては、 ttriB表示深度の昇順あるいは降順のいず れかで ΙΐίΙΒ表示情報を並べる。
この構成によれば、第 1の観点による発明に加えた、複数のグラフィック要素がスクリーンの 先頭ラインに表示すべきピクセル ¾ ^む^の並べ替えの纖 Uと同じ纖 Uを有して 1/ヽる。こ のため、その と同様の作用効果を奏する。
上記描画装置にぉレ、て、 MISソート手段は、所:^分 (好ましくは、 1つ分)の歸 Sグラフィ ック要素の謝己表示情報の並べ替えが完了するたぴに、その旨を前記描画手段に通知し、 かつ、嫌己奇¾7ィールドを表示するための嫌己並べ替えを、当該 ¾¾7ィ一ルドを表示す る直前の垂直ブランキング期間の開始直後に実行開始し、 l己偶^ィールドを表示するた めの歸己並べ替えを、当該偶数フィールドを表示する直前の垂直プランキング期間の開始 直後に節開始する。
ソートが確定する毎にその旨を脑することにより、描画手段はソートの完了を待たずに描 画処理を行うことが可能であるが、さらにこの構成によれば、垂直プランキング期間の開始直 後にソートが実行開始されるので、ソート前の演算処理のために余裕を持ったより十分な時 間を確保できる。
本発明の新規な糊敫は、請求の範囲に記載されている。しかしながら、発明そのもの及び その他の糊敷と効果は、 図面を参照して具体的な 例の詳細な説明を読むことにより 容易に藝される。 図面の簡^ ¾説明
図 1 (a)は、本発明の難の形態による YSU19が菊 るソートルール 1を説明するため の、スクリーン SCRに表示されたポリゴン # 0〜 # 7の例示図である。図 1 (b)は、ソートルー ル 1に従ったソートの例示図である。
図 2 (a)は、 YSU19が紫 "るソートルール 2を説明するための、スクリーン S0Rに表示さ れたポリゴン #0〜# 7の例示図である。図 2(b)は、ソート/レール 2に従ったソートの例示図 . である。
図 3 (a)は、 YSU19が るソートルール 3を説明するための、スクリーン SCRに表示さ れたポリゴン #0〜# 7の例示図である。図 3 (b)は、ソートルール 3に従ったソートの例示図 である o
図 4は、本発明の実施の形態による RPU19の前段部分の説明図である。
図 5 (a)は、 RPU9のプリフェッチバッファ 108、リサイクルバッファ 110、及ぴデブスコンパ レータ 112の処理を説明するための、スクリーン SCRに表示されたポリゴンの例示図である。 図 5 (b)は、 RPU9による描画処理の前処理としての YSU19によるソーティング結果の例示 図である。
図 6 (a)は、図 5 (a)のライン Lcの 1つ前のラインの表示のための描画が終了した直後の、 プリフェッチバッファ 108及ぴリサイクルバッファ 110の櫞内状態を示す図である。図 6 (b)は、 ポリゴン # 1, # 2及び # 4の対応するピクセルをライン Lcに描画する際のポリゴン構造^ ンスタンスの流れを示す図である。図 6 (c)は、ポリゴン # 1, # 2及ぴ #4の対応するピクセ ルをライン Lcに描画する際のポリゴ: /«造 # ^ンスタンスの流れを示す図である。図 6 (d)は、 ポリゴン # 1, # 2及び #4の対応するピクセルをライン Lcに描画する際のポリゴン構造^ ンスタンスの流れを示す図である。図 6 (e)は、ライン Lcの表示のための描画が終了した直 後の、プリフェッチバッファ 108及ぴリサイクルバッファ 110の 内状態を示す図である。
図 7 (a)は、図 5 (b)のポリゴン構造体インスタンス #0, # 3, # 1及び # 2がプリフェッチパ ッファ 108に觸内された状態を示す図である。図 7(b)は、図 5 (a)のポリゴン #0及び # 3の 対応するピクセルをライン Laに描画する際のポリゴン構造 # ^ンスタンスの流れを示す図で ある。図 7 (c)は、図 5 (a)のポリゴン # 0及び # 3の対応するピクセルをライン Laに描画する 際のポリゴン構造体インスタンスの流れを示す図である。図 7 (d)は、ポリゴン # 0及び # 3の 表示最終ライン Lbの描画に至るまでのポリゴン構造 ί材ンスタンスの流れを示す図である。 図 7 (e)は、ポリゴン # 0及ぴ # 3の表示最終ライン Lbの描画でのポリゴン構造体インスタン スの流れを示す図である。
図 8は、インタレーススキャンによる表示を行う の YSU19によるソートルール 4の説明 図である。
図 9 (a)は、インタレーススキャンによる表示を行う^^のソート処理をモード 1のタイミング で行う の説明図である。図 9 (b)は、インタレーススキャンによる表示を行う のソート 処理をモード 2のタイミングで行う^^の説明図である。
図 10は、本発明の実施の形態によるマルチメディアプロセッサ 1の内部構成を示すプロッ ク図である。
図 11は、図 10のマルチメディアプロセッサ 1によるグラフィックス処理の流れの概要を示す フローチャートである。
図 12は、図 10の RPU9の内部構成を示すプロック図である。
図 13は、テクスチャマッピングモードのポリゴン構造体の構成を示す図である。
図 14は、テクスチャアトリビュート構造体の構成を示す図である。
図 15は、グーローシェーディングモードのポリゴン構造体の構成を示す図である。
図 16 (a)は、シザリングディセーブル時のスプライト構造体の構成を示す図である。図 16 (b)は、シザリングイネーブル時のスプライト構造体の構成を示す図である。
図 17は、スライサ 118による、グーローシェーディングモードのポリゴンに ¾ "る処理の説 明図である。
図 18は、スライサ 118による、テクスチャマッピングモードのポリゴンに対する処理の説明 図である。
図 19は、スライサ 118によるスプライトに る処理の説明図である。 .
図 20は、ピクセルディザ 122によるディザリングの説明図である。
図 21は、ノ ィリニアフィルタ 130によるパイリニアフィルタリングの説明図である。
図 22は、図 10の YSU19による配列 Aの Yソート完了後のヒープ構造を示す図である。 図 23は、図 22のヒープ構造のメイン RAM25への!^方法の説明図である。 図 24は、図 10の YSU19によるポリゴン構造体配列の Yソート処理の全体的な流れの一例 を示すフローチャートである。
図 25は、図 24のステップ S21のヒープ構築処理の流れの一例を示すフローチャートであ る。
図 26は、ダウンヒープ処理の流れの一例を示すフローチャートである。
図 27は、順位比 理の»1の一例を示すフローチャートである。 発明を するための最良の形態
以下、本発明の実施の形態にっ 、て、図面を参照しながら説明する。なお、図中、同一ま たは相当部分にっ 、ては同一の参照符号を付してその説明を翻する。数式中「· Jは乗算 を意味する Q
まず、本発明の »の形態による 3次元イメージ表示のための描画処理の原理を説明する c 本難の形態では、描画処理の前処理として、後述の Yソーティングユニット (以下、「YSU」 と呼ぶ。) 19によるソート(「Yソート」と呼ぶこともある。)処^ ^節される。ソートの通は、 構造体配列の各要素である。構造体配列は、二次元空間に投影された三次元立体の各面 の形状を表すための多角形状のグラフィック要素であるポリゴンのための構造体配列 (以下,
「ポリゴン構造体配列」と呼ぶ。)と、スクリーンに φ ^な矩形状のグラフィック要素であるスプ ライトのための構造体酉 Β ^(以下、「スプライト構造体配列」と呼ぶ。)と、が後述のメイン RAM (random access memory) 25に用意される。ポリゴ 造体配列の要素は、「ポリゴン構 造 ί材ンスタンス」であり、スプライト構造体配列の要素は、「スプライト構造! ^ンスタンス」で ある。ただし、両者を区別して説明する必要がないときは、単に「構造 # rンスタンス」と呼ぶ こともある。
ポリゴン構造体配列に鶴内された各ポリゴン構造 ί材ンスタンスは、ポリゴンごとの表示情 報 (スクリーンにおける頂点座標、テクスチャマッピングモードでのテクスチャパターンに関 する情 ぴグ一口一シェーディングモードでのカラーデータ (RGBのカラーコンポーネン ト) ¾ ^む。)であり、 1つのポリゴン構造体インスタンスに 1 のポリゴンが対応している。スプ ライト構造体配列に撫内された各スプライト構造 ンスタンスは、スプライトごとの表示情報
(スクリーンにおける座標及びテクスチャパターンに関する' ¾ ^む。)であり、 1つのスプ ライト構造 ^ンスタンスに 1つのスプライトが対応している。これらについては、後で詳述す る。
以下、 YSU19によるソートルール 1, 2及ぴ 3について説明する力 その前に座標系につ V、て説明する。ディスプレイ装置 (図示せず)への実際の表示に用 ヽられる二次元座標系を スクリーン座標系と呼ぶ。本実施の形態では、スクリーン座標系は、水平方向 2048ピクセル X垂直方向 1024ピクセルの 2次元ピクセル配列から構成される。座標原点は左上にあり、 水平右方向力 ¾軸の正、垂直下方向力 軸の正に相当する。ただし、実際に表示される領域 は、スクリーン座標系の:^間ではなく一部の空間である。この表示領域をスクリーンと呼ぶ ことにする。
図 1 (a)は、 YSU19が実 ί ^Τるソートルール 1を説明するための、スクリーン SCRに表示さ れたポリゴン # 0〜 # 7の例示図である。図 1 (b)は、ソートルール 1に従ったソートの例示図 である。図 1 (b)に示すように、ポリゴン構造体配列 PSには、図 1 (a)のポリゴン #0〜 # 7に 対応するポリゴン構造 ί材ンスタンス # 0〜# 7が 内されている。なお、対応するポリゴン 及びポリゴン構造 ί材ンスタンスには、同一の参照符号を付してレ、る。
YSU19は、ポリゴン #0〜# 7の Υ座標が小さい順に、各ポリゴン構造 ンスタンス #0 〜# 7を並べ替える。この:^、ポリゴンの 3頂点の Υ座標のうち、最も小さい Υ座標 (以下、 「最小 Υ座標」と呼ぶ。 )が、この並べ替えで用レヽるポリゴンの Υ座標とする。
このソートの結果、図 1 (b)の右側に示すように、最小 Υ座標が小さい順に、各ポリゴン構造 インスタンス # 0〜 # 7が並べ替えられる。
以上のように、最小 Υ座標が小さい順に、各ポリゴン構造 ί材ンスタンスを並べ替えることを ソートルール 1と呼ぶ。
ただし、最小 Υ座標が同一である複数のポリゴ^ しうる。この^は、ソートルール 2 に従う c
図 2(a)'は、 YSU19が実 frfるソートルール 2を説明するための、スクリーン SCRに表示さ れたポリゴン #0〜# 7の例示図である。図 2(b)は、ソートルール 2に従ったソートの例示図 である。図 2 (a)に示すように、スクリーン SCRにおいて、ポリゴン #0、 # 1、及び # 7の最小 Y座標は、共に「Ys」であり同一である。この^、 YSU19は、各ポリゴン構造 # rンスタン ス # 0、 # 1、及ぴ # 7に含まれるデプス値が大き!/、順に、各ポリゴ ^造インスタンス # 0、 # 1、及ぴ # 7を並べ替える。
このソートの結果、図 2 (b)の右側に示すように、ポリゴン構造 #H スタンス #0、 # 1、及 ぴ # 7につレヽては、デプス値が大き!/ヽ順に並べ替えられて ヽる。
デプス値 (「表示深度情報」と呼ぶこともある。 )は、描画 のピクセルが重なった齢、ど のピクセルを先に描画する力を示す情報であり、その値が大き 、ほど先に (奥に)描画され、 その値が小さいほど後で (手前に)描画される。つまり、デプス値が大きいほどスクリーン SC Rの奥に表示することが示され、小さ!/、ほど手前に表示することが示される。
以上のように、最小 Y座標が同じである複数のポリゴンについては、デプス値が大きい順 に、各ポリゴン構造 スタンスを並べることがソートルール 2である。
ただし、 YSU19は、スクリーン SCRの先頭ラインに表示されるピクセルを持つ複数のポリ ゴンについては、最小 Y座標が つている でも、それらが同一であるとみなして、ソー トルール 1ではなぐソートルール 2に従って、各ポリゴン構造体インスタンスの並べ替えを行 う。つまり、スクリーン SCRの先頭ラインに表示されるピクセルを持つポリゴンが複数 す る^ 1ま、最小 Y座標が同一であるとみなして (つまり、最小 Y座標の値に関係なく)、デプス 値が大きレヽ順に並べ替えられる。これをソートルール 3と呼ぶことにする。
図 3 (a)は、 YSU19が 汁るソートルール 3を説明するための、スクリーン SCRに表示さ れたポリゴン #0〜# 7の例示図である。図 3 (b)は、ソートルール 3に従ったソートの例示図 である。図 3 (a)に示すように、スクリーン SCRの先頭ラインに表示されるピクセル'を持つポリ ゴン # 2、 # 5、及ぴ # 7の最小 Y座標は、 つている。この 、 YSU19は;ポリゴン # 2、 # 5、及ぴ # 7の最小 Y座標が同一であるとみなして、务ポリゴン構造 ンスタンス # 2、 # 5、及ぴ # 7に含まれるデプス値が大き 、順に、各ポリゴン構造 ί材ンスタンス # 2、 # 5、 及び # 7を並べ替える。
このソートの結果、図 3 (b)の右側に示すように、ポリゴン構造 ^ンスタンス # 2、 # 5、及 ぴ # 7につ 、ては、デブス値が大き!/、順に並べ替えられて 、る。
以上のように、先頭ラインに表示されるピクセルを持つ複数のポリゴンについては、最小 Υ 座標が ¾つている ¾^でも、ソートルール 1ではなぐ最小 Υ座標が同一であるとみなして、 ソートルール 2に従い、デブス値の大きい順に、各ポリゴン構造 # ^ンスタンスを並べ替える ことがソートノレ一ノレ 3である。
上記のソートルール 1〜3は、スプライト構造体配列の各スプライト構造 ンスタンスを並 ベ替える際にも適用される。ここで、スプライトの最小 Υ座標は、スプライトの 4頂点の Υ座標 のうち、最も小さい Υ座標である。
後で詳述するが、本 »の形態では、ポリゴン構造体のサイズは、 128ビットであり、スプラ イト構造体のサイズは、 64ビットである。このように、ポリゴンとスプライトでは、構造体のサイ ズが異なるので、構造 ί材ンスタンスの並べ替えは、ポリゴン構造体配列とスプライト構造体 配列とで、それぞれ別個に行われる。
ここで、ソートルール 1によるソートを行う効果を説明する。比較のため、各ラインの描画の たびに、該当ラインに描画すべきポリゴン構造体インスタンス及びスプライト構造体インスタ ンスを、全ポリゴン構造材ンスタンス及ぴ^ プライト構造 ンスタンス力も検索して、描 画処理を行うことを想定する。この比較例では、各ラインの描画のたびに、全ポリゴン構造体 インスタンス及ぴ^ ブライト構造 ンスタンス力もの検索処理が必要となり、高速処理が できず、多くのポリゴン及びスプライトの表示ができない場合も発生して、十分な三次元ィメ ージの表示が不可能な ¾ ^もある。
この点、本実施の形態のように、最小 Υ座標が小さい順に、各ポリゴン構造 ί材ンスタンス 及ぴ各スブライト構造 ί材ンスタンスを予めソートしておくことにより、ソート後の各ポリゴン構 造 # ^ンスタンス及び各スプライト構造^ンスタンスを順番に読み出して、描画処理を行う だけでよい。この際に、最小 Y座標が描画 ¾ ^位置の Y座標より大きい構造インスタンス 力 Sソート済みの構造体配列より読み出された に、そのラインの描画処理を停止すること により、不要な構造^ンスタンスの検索処理を全く行わずに済む。その結果、比較例のよう な検索処¾ ^不要になって、処理の高速化を図ることができ、多くのポリゴン及ぴスプライト の表示が可能になって、十分な三次 ¾ ^メージの表示が可能になる。
但し、本 の形態では、ピクセルを觸内するバッファに る描画処理を水平ライン単 位で行って ヽるので、 ¾ ^となる水平ラインに描画すべきピクセルを持つポリゴン及びスプラ イトの構造 ンスタンスを、水平ライン毎に順番に読み出して処理する必要がある。
そこで、本実施の形態にぉレ、ては、後述するように、複 インに跨るポリゴン及びスプラ イトの構造 ί材ンスタンスを再利用することにより、それらをメモリから毎回取得することを避 ける機構、新たにメモリから読み出した構造 ί材ンスタンスと再利用のためのバッファに辦内 された構造^ンスタンスとの描画順序を判定する機構、及ぴ全てのピクセルを描画し終え た構造^ンスタンスを再利用のためのバッファに ずに «する機構を備える。 上記のように、表示先頭ラインでの複数グラフィック要素 (ポリゴン、スプライト)の描画や、 同じラインで最小 Υ座標が同一の複数グラフィック要素の描画の に、ソートルール 2及び 3を il¾口したのは、各ラインにおいて、必ず、デプス値が大きいものから描画されるようにす るためである。本実施の形態においては、ソート済みの構造体配列から読み出された構造 ンスタンスのデプス値と、再利用のためのバッファ力 読み出された構造 ί材ンスタンス のデプス値とを比較し、より大きレ、デブス値を持つ構造体インスタンスを先に描画する機構 を備えているので、ソートルール 2及ぴ 3の 卩によって、全ての構造 ί材ンスタンスに対し て、必ずデプス値が大き!/、ものから描画を行うことを保証できる。
このように、各ラインにおいて、デプス値の大きい、より奥に表示されるべきグラフィック要 素から先に描画処理を行うようにしたのは、半透明合成を実現するためである。奥に描画さ れるべき不透明のグラフィック要素が、手前に描画されるべき半透明のグラフィック要素の後 に描画された^ \透けて見えるべき両者が重なった部 の描画を正しく処理することがで きない。このため、各ラインにおいて、デプス値の大きい、より奥に表示されるべきグラフイツ ク要素から先に描画処理を行うのである。
さて、 YSU19によるソート後の各構造 ί材ンスタンスは、メイン RAM25から、後述のレン ダリングプロセッシングユニット (以下、「RPU」と呼ぶ。 ) 9に読み込まれ、描画処理に利用さ れる。この描画処理の前段の処理を説明する。ここで、本 »の形態では、後述のラインパ ッファ LB1あるいは LB2にデータを書き込むことを描画と呼ぶ。各ラインバッファ LB1及び L B2は、スクリーンの 1ラインに対応したピクセルのデータを H内する。
図 4は、本発明の »の形態による RPU19の前段部分の説明図である。図 4に示すように. RPU19は、その前段部分に、プリフェッチバッファ 108、リサイクルバッファ 110、及ぴデプ スコンパレータ 112¾r ^む。
プリフェッチバッファ 108は、メイン RAM25から、ソート後の構造 ンスタンスを順次読 み込み、読み込んだ順番で構造 ί材ンスタンスを出力する FIFO (first— in first- out)構 造のバッファである。つまり、プリフェッチバッファ 108には、 YSU19により並ぺ替えられた 順番で構造インスタンスが ¾内される。そして、 内された構造インスタンスは、対応するポリ ゴンある 、はスプライトの表示のための描画サイクルにおレ、て、編内された順番で出力され る。プリフェッチバッファ 108は、メイン RAM25からの入力タイミングとデプスコンパレータ 1 12への出力タイミングの緩衝機構として用意されている。これは、メイン RAM25は、 RPU1 9以外の機能ユニットと ^"されて 、るため、メイン RAM25からのデータ取得に待ち時間が 発生し 6ためである。
リサイクルバッファ 110は、次の描画サイクルでも棚される (つまり、再利用できる)構造体 インスタンスを 内する FIFO構造のバッファである。従って、リサイクルバッファ 110に編内 された構造体インスタンスは、次の描画サイクルで使用される。 1描画サイクルは、 1ラインの 表示を行うための描画期間である。つまり、 1描画サイクルは、ラインバッファ LB1 'あるいは L B2のレヽずれかに、対応するラインの表示のために必要な全てのデータの描画が行われる 期間である。
デプス inンパレータ 112は、プリフェッチバッファ 108から取り出した構造 ンスタンスに 含まれるデプス値と、リサイクルバッファ 110から取り出した構造 ί ンスタンスに含まれるデ ブス値と、を比較して、より大きなデプス値を持つ (つまり、より奥に表示されるべき)構造 # Γ ンスタンス ¾1択して、後段に出力する。
この 、選択された構造インスタンスが、次の描画サイクルでも使用される (つまり、次 のラインの描画にも使用される) は、後段に出力されるとともに、リサイクルバッファ 110 にも出力され書き込まれる。ただし、選択された構造 ί材ンスタンスが、次の描画サイクルで 使用されない (つまり、次のラインの描画には使用されない) ま、後段に出力されるだけ で、リサイクルバッファ 110には書き込まれなレヽ。
て、リサイクルバッファ 110には、現ラインの描画に棚される構造 ンスタンスであ つて、次ラインの描画にも使用される構造 #^ンスタンスのみ力 デプス値の大きい順に格 糸内される。以下、具体例を挙げながら説明する。
図 5 (a)は、 RPU9のプリフェッチバッファ 108、リサイクルバッファ 110、及ぴデブスコンパ レータ 112の処理を説明するための、スクリーン SCRに表示されたポリゴンの例示図である。 図 5 (b)は、 RPU9による描画処理の前処理としての YSU19によるソーティング結果の例示 図である。
図 6 (a)は、図 5 (a)のライン Lcの 1つ前のラインの表示のための描画が終了した直後の、 プリフェッチバッファ 108及びリサイクルバッファ 110の櫞內状態を示す図、図 6 (b)〜図 6 (d)は、ポリゴン # 1, #2及び #4に含まれる、ライン Lcに対応するピクセルを描画する際の ポリゴン構造体インスタンスの流れを示す図、図 6 (e)は、ライン Lcへの表示のための描画が 終了した直後の、プリフェッチバッファ 108及びリサイクルバッファ 110の 内状態を示す図、 である。
図 6 (a)に示すように、図 5 (a)のライン Lcの 1つ前のラインの表示のための描画が終了した 直後では、プリフェッチバッファ 108には、図 5 (b)に示したソート後の並びの順で、ポリゴン 構造 f材ンスタンス #4, # 7, #6及び #5が搬内され、リサイクルバッファ 110には、デプス 値が大きい順番で、ポリゴ^ 造 スタンス: ίΐ 1及 #2が觸内されている。なお、ポリゴン 構造 # スタンス #0及び #3は、ライン Lcに表示されないため、リサイクルバッファ 110に は穩されていない。
そして、図 6 (b)に示すように、デブスコンパレータ 112は、プリフェッチバッファ 108の先頭 のポリゴン構造 ンスタンス #4と、リサイクルバッファ 110の先頭のポリゴン構造 ンス タンス # 1と、に含ま l¾デプス値を比較し、デプス値が大きいポリゴ 造 ί材ンスタンス: S 1を選択して、後段に出力するとともに、ポリゴ «造 # ^ンスタンス # 1は、リサイクルパッフ ァ 110に送られる。なぜなら、ポリゴン # 1は、次のラインにも表示されため、次の描画サイク ルでも利用される力らである。この 、ポリゴン構造^ンスタンス # 4は、デブスコンノヽ。レ ータ 112に選択されていないので、プリフェッチバッファ 108のリードポインタは、次に進ま ず、ポリゴ: ^造 ンスタンス #4を指したままである。
次に、図 6 (c)に示すように、デブスコンパレータ 112は、プリフェッチバッファ 108の先頭 のポリゴン構造体インスタンス #4と、リサイクルバッファ 110の先頭のポリゴン構造体インス タンス # 2と、に含まれるデプス値を比較し、デプス値が大きレ、ポリゴ «造 ί材ンスタンス # 4を選択して、後段に出力するとともに、ポリゴ/ «造# ^ンスタンス #4は、リサイクルパッフ ァ 110に送られる。なぜなら、ポリゴン #4は、次のラインにも表示されため、次の描画サイク ルでも禾 IJ用される力もである。この 、ポリゴン構造 ί材ンスタンス # 2は、デプスコンパレ ータ 112に選択されていないので、リサイクルバッファ 110のリードポインタは、次に進まず、 ポリゴ 造インスタンス # 2を指したままである。
そして、図 6 (d)に示すように、デプスコンパレータ 112は、リサイクルバッファ 110の先頭 のポリゴ^^造 ンスタンス # 2を読み込んで、後段に出力するとともに、ポリゴン構造 f材 ンスタンス # 2は、リサイクルバッファ 110に送られる。なぜなら、ポリゴン # 2は、次のライン にも表示されるため、次の描画サイクルでも利用される力もである。
以上の結果、ライン Lcの表示のための描画が終了した直後では、リサイクルバッファ 110 には、次のラインの描画に利用されるポリゴン構造^ rンスタンス # 1, #4及び #2が、デプ ス値の大きい順に!^内される。なお、ライン Lcには、ポリゴン # 7は表示されないため、図 6 (e)において、ポリゴン構造 ί材ンスタンス # 7は、プリフェッチバッファ 108から読み出され ない。
図 7 (a)は、図 5 (b)のポリゴン構造体インスタンス # 0, # 3, # 1及ぴ # 2がプリフェッチパ ッファ 108に H内された状態を示す図、図 7(b)及び図 7(c)は、図 5 (a)のポリゴン #0及ぴ # 3に含まれる、ライン Laに対応するピクセルを描画する際のポリゴ^ f造インスタンスの 流れを示す図、図 7(d)は、ポリゴン #0及び # 3の表示最終ライン Lbに至るまでのポリゴン 構造 ンスタンスの流れを示す図、図 7 (e)は、ポリゴン # 0及ぴ # 3の表示最終ライン Lb でのポリゴン構造体インスタンスの流れを示す図、である。
図 7 (a)に示すように、図 5 (a)の先頭ライン La^の表示のための描画の前に、プリフェッチ ノッファ 108には、図 5 (b)に示したソート後のポリゴ «造 # ^ンスタンス力 その並びの順 で欄される。
そして、図 7(b)に示すように、プリフェッチバッファ 108の先頭のポリゴ /^造 ンスタン ス # 0力 デプスコンパレータ 112に読み込まれ、デプスコンパレータ 112は、このポリゴン 構造 ンスタンス #0を後段に出力するとともに、ポリゴ V»造 ンスタンス #0は、リサイ クルバッファ 110に送られ 内される。なぜなら、ポリゴン #0は、次のラインにも表示された め、次の描画サイクルでも利用される力もである。なお、プリフェッチバッファ 108には、メイ ン RAM25から み出されたポリゴン構造 ί材ンスタンス #4が書き込まれる。
次に、図 7(c)に示すように、プリフェッチバッファ 108の先頭のポリゴン構造 ί材ンスタンス # 3が、デプスコンパレータ 112に読み込まれ、後段に出力されるとともに、ポリゴン構造体 インスタンス # 3は、リサイクルバッファ 110に送られ 内される。なぜなら、ポリゴン # 3も、 次のラインに表示されため、次の描画サイクルでも利用される力もである。なお、プリフェッチ バッファ 108には、メイン RAM25から読み出されたポリゴン構造 ί材ンスタンス' # 7が書き 込まれる。 先頭ライン Laの表示のための描画が終了すると、次のラインの表示のための描画をすべく, 図 7(d)に示すように、デブスコンパレータ 112は、リサイクルバッファ 110から、ポリゴ «造 f材ンスタンス #0を読み出して、後段に出力するとともに、ポリゴン構造 ンスタンス # 0 は、リサイクルバッファ 110に送られ 内される。なぜなら、ポリゴン #0は、引き続き次のライ ンに表示されるため、次の描画サイクルでも利用される力もである。続レヽて、デプスコンパレ ータ 112は、リサイクルバッファ 110から、ポリゴン構造 # ^ンスタンス # 3を読み出して、後 段に出力するとともに、ポリゴン構造 # ^ンスタンス # 3は、リサイクルバッファ 110に送られ 櫞内される。なぜなら、ポリゴン # 3もまた、引き 次のラインに表示されるため、次の描画 サイクルでも利用される力もである。このような M^、ポリゴン # 0及び # 3の描画が終了す るまで繰り返される。なお、ポリゴン # 1は未だ表示されないため、プリフェッチバッファ 108 力もは読み出されない。
そして、図 7(e)に示すように、ライン Lbへポリゴン #0及び # 3を表示するための描画処理 では、デプスコンパレータ 112は、リサイクルバッファ 110から、ポリゴン構造インスタンス # 0を読み出して、後段に出力するが、ポリゴン構造 ί材ンスタンス # 0は、リサイクルパッフ ァ 110には送られない。なぜなら、ポリゴン #0は、次のラインでは表示されず不要だからで ある。続いて、デプスコンパレータ 112は、リサイクルバッファ 110から、ポリゴン構造 ί材ン スタンス # 3を読み出して、後段に出力するが、ポリゴン構造体インスタンス # 3は、リサイク ルバッファ 110に送られない。なぜなら、ポリゴン # 3もまた、次のラインには表示されず不 要だからである。
上記では、ポリゴンのみをスクリーン SCRに表示する場合を例に挙げたため、プリフェッチ バッファ 108に読み込まれる構造 ί材ンスタンスは、ポリゴン構造 ί材ンスタンスのみであつ た。しかし、後述するように、ソート後のポリゴン構造インスタンスと、ソート後のスプライト構 造材ンスタンスと、はソートルール 1〜3に従ってマージソートされるため、マージソート後 の構造 f材ンスタンス力 プリフェッチバッファ 108に搬内されることになる。従って、ポリゴン 及びスプライトの双方を表示する^は、ソートルール 〜 3に従った順番で、プリフェッチ バッファ 108に、各構造 # ^ンスタンスが櫞内され、上記のような処應行われる。 以上のように、デブスコンパレータ 112及ぴリサイクルバッファ 110を設け、次の描画サイク ルで利用する構造 ンスタンスを、デプス値の大きい順に 内していった。これにより、 Y SU19によるソートルール 1のソートを行うにも力かわらず、各ラインにおいて、必ず、デブス 値の大き ヽグラフィック要素 (ポリゴン、スプライト)から描画処趣行われる。
さて、上記のソートルール 1〜3は、ノンインタレーススキャンによる表示を行う^に限ら ず、インタレーススキャンによる表示を行う にも、同様に適用される。ただし、インタレー ススキャンの:^は、ソ—トルール 1〜3だけでなぐ次のようなソートルール 4をさらに加える ことが望ましい。
インタレーススキャンの:^でも、上記ソートルール 1〜3が適用される。ただし、奇数フィ 一ルドを表示するためのソートでは、 ¾m ^インに表示されるポリゴンの最小 γ座標及ぴ 又はその インの 1つ前の偶数ラインに表示されるポリゴンの最小 Y座標とが同一であ るとみなして、ソートルール 2によるソートを行う。ただし、先頭の奇 インは除く。なぜなら、 その 1つ前の偶 インが ¾Eしないからである。一方、 »C7ィールドを表示するためのソ ートでは、偶数ラインに表示されるポリゴンの最小 Y座標及び Z又はその偶翁 インの 1つ 前の奇 インに表示されるポリゴンの最小 γ座標とが同一であるとみなして、ソートルール
2によるソートを行う。このようなソートをソートルール 4と呼ぶ。
図 8は、インタレーススキャンによる表示を行う の YSU19によるソートルール 4の説明 図である。図 8に示すように、スクリーン SCRに、ポリゴン #0〜# 3を表示する を想定し、 まず、奇数フィールドを表示するためのソート処理を考える。図中、上から第二番目の奇 » インに注目する。
この 、ソートルール 4によれば、第二番目の インに初めて表示されるポリゴン # 2の最小 Υ座標とその 1つ前の偶数ラインに初めて表示されるポリゴン # 1の最小 Υ座標と、 が同一であるとみなして、デプス値の大きい順に、ポリゴ: 造 ί材ンスタンス # 2;次にポリ ゴン構造インスタンス # 1と並べられる。 図 8の例では、ソートルール 1〜4によるソートの結果、 ィールドの表示のために、ポ. リゴン構造 #^ンスタンスは、 #0、 # 2、 # 1、及び # 3の順番で並べ替えられる。ちなみに、 ソートルール 1〜3のみでは、ポリゴン構造体インスタンスは、 #0、 # 1、 #2、及ぴ #3の順 番で並べ替えられる。
次に、 «7ィールドを表示するためのソート処理を考え、図中、一番上の偶 インに注 目する。この^^、ソートルール 4によれば、一番上の偶 インに初めて表示されるポリゴ ン # 1の最小 Y座標とその 1つ前の奇懇ラインに初めて表示されるポリゴン # 0の最小 Y座標 と、が同一であるとみなして、デプス値の大きい順に、ポリゴン構造 スタンス # 1、次に ポリゴ/ ¾造 ンスタンス # 0と並べられる。
図 8の例では、ソートルール 1〜4によるソートの結果、 ィールドの表示のために、ポ リゴン構造 ί材ンスタンスは、 # 1、 #0、 # 3、及び # 2の順番で並べ替えられる。ちなみに、 ソートルール 1〜3のみでは、ポリゴン構造体インスタンスは、 #0、 # 1、 # 2、及び # 3の順 番で並べ替えられる。
上記ソートルール 4は、ソートルール 1〜3に加えて、スプライト構造体配列の各スプライト 構造^ (Vスタンスを並べ替える際にも適用される。
ここで、インタレーススキャンの に、ソートルール 4を i ¾した理由を説明する。図 8に おいて、ソートルール:!〜 3のみでソートを行う場合を想定する。この^^、ポリゴン構造体ィ ンスタンス #0, # 1, # 2及び # 3という順番で、最小 Y座標が小さい順にソートが行われる。 すると、奇数フィールドを表示する場合、例えば、図中、— ゝら第一番目の奇^インの描画 が終了した直後では、プリフェッチバッファ 108の先頭には、ポリゴン構造インスタンス # 1 力 リサイクルバッファ 110の先頭には、ポリゴン構造 ί材ンスタンス #0がある。従って、図 中、 ± ^ら第二番目の奇 インの描画を行う際、ポリゴン # 1, #2及び #0という順番で描 画が行われる。このように、この奇 ic^インでは、デプス値が大きい順に、描画が行われなく なる。
ソートルール 4を ίΙΛ口することにより、奇¾ ィールドを表示する^、ポリゴン構造 ί材ン スタンス # 0, # 2, # 1及ぴ # 3という順番に並べ替えが行われる。すると、奇数フィールド を表示する齢、例えば、図中、 J ^ゝら第一番目の ¾m ^インの描画が終了した直後では、 プリフェッチバッファ 108の出口には、ポリゴ #造 f材ンスタンス # 2が、リサイクルバッファ 110の出口には、ポリゴン構造 ί材ンスタンス # 0がある。従って、図中、上から第二番目の ¾^インの描画を行う際、ポリゴン # 2, # 1及ぴ # 0という順番で、デプス値の大きい順に 描画処親嚇される。
以上のことは、 «7ィールド ¾r¾示する際にも言える。
さて、インタレーススキャンによる表示を行うためのソート処理においては、ソートを^ fi1す るタイミングによって、 ィールド用のソート処理と偶 フィールド用のソート処理を行うタ イミングが異なる。そこで、本実施の形態では、モード 1とモード 2の二つのソートのモードが 用意されて 、る。これらを図面を用 、て説明する。
図 9 (a)は、インタレーススキャンによる表示を行う ¾ ^のソート処理をモード 1のタイミング で行う の説明図、図 9 (b)は、インタレーススキャンによる表示を行う のソート処理を モード 2のタイミングで行う ¾ ^の説明図、である。
図 9 (a)に示すように、モード 1では、 YSU19は、偶 ¾ ィールド Bが表示される前に表示 される ¾¾7ィールド Aの表示中に、当該偶 ^ィ一ルド Bを表示するためのソート Bを行う。 従って、偶¾ ィールド Bのための、ポリゴン構造体配列ゃスプライト構造体配列に代入する 値 (つまり各構造 ンスタンスの値)の計算 B及びソート Bの双方の処理は、当該偶数ブイ 一ルド Bの 1つ前に表示される奇数フィールド Aの表示中に全て完了しなければならない。 なぜなら、計算 Bの結果に基づ 、て、ソート Bが行われる力もである。
同様に、モード 1では、 YSU19は、奇¾7ィールド Aが表示される前に表示される偶数フィ 一ルド Bの表示中に、当該奇数フィールド Aを表示するためのソート Aを行う。従って、奇数 フィールド Aのための、ポリゴン構造体配列ゃスプライト構造体配列に代入する値の計算 A 及びソート Aの双方の処理は、当該 ¾¾7ィールド Aの 1つ前に表示される偶 一ルド B の表示中に全て完了しなければならなレヽ。なぜなら、計算 Aの結果に基づレ、て、ソート Aが 行われるからである。
一方、 *ード 2では、図 9 (b)に示すように、 YSU19は、直前の垂直プランキング期間中及 ぴ » ィールド Aの表示中に、当該 ¾1 ^ィールド Aのためのソート Aを節する。 «フ ィールド Aのための計算 Aは、当該 ¾ ィールド Aの 1つ前の ί¾¾ ィールド Bの表示中に 行われる。同様に、モード 2では、 YSU19は、直前の垂直プランキング期間中及び ί»ィ 一ルド Βの表示中に、当該偶数フィールド Βのためのソート Βを 亍する。偶数フィールド Β のための計算 Βは、当該 «C ィールド Βの 1つ前の «7ィールド Αの表示中に行われる。 従って、モード 2では、奇^ 7ィールド Aの表示中に、奇数フィールド Aのためのソート Aと « ィールド Bのための計算 Bとを並列に菊 することができ、また、 « ィールド Βの表 示中に、偶 ¾7ィ一ルド Βのためのソート 8と フィールド Αのための計算 Αとを並列に実 ることができる。その結果、計算 Α¾ΌΦのための期間を十分に確保できる。
本実施の形態では、全構造 ί材ンスタンスのソートの完了を待つことなぐ順位の高いもの から構造 ί材ンスタンスが 1つ確定するたびに、その都度、 RPU9に構造 ンスタンスが読 み込まれ、描画処理を行うことができる機能が用意されている。具体的には、ソートされるポリ ゴン構造体配列のソート済みポリゴン構造体インスタンスが確定するたび、 YSU19から RP U9にパルス信号 PPL (後述)が伝達され、 RPU9は、このパルス信号 PPLの数をカウントし、 カウント値を超えない範囲の数のポリゴ ^/«造{材ンスタンスをメイン RAM25から読み出す。 また、スフ。ライト構造体配列のソート及び読み出しについても、同様の機能が用意されている。 このため、モード 2のように、表示中のフィールドに対する各構造体インスタンスのソートを、 直前の垂直プランキング期間及ぴフィールド表示中に節できる。
順位の高 、ものから 1つずつ構造 ί材ンスタンスを送り出すことができるソート技法の一例 として、本難の形態では、ヒープソートを採用している。また、ヒープソートを採用する他の 利点として、ソート性能が安定している、すなわちソートに必要な時間にばらつきが少ないこ とが挙げられる。
図 10は、本発明の実施の形態によるマルチメディアプロセッサ 1の内部構成を示すプロッ ク図である。図 10に示すように、このマルチメディアプロ ッサは、外部メモリインタフェース. 3、 DMAC (direct memory access controller) 4、中央演算処理装置 (以下、「CPU」 と呼ぶ。)5、 CPUローカル RAM7、レンダリングプロセッシングユニット(以下、「RPU」と呼 ぶ。)9、カラーパレット RAM11、サウンドプロセシングユニット (以下、「SPU」と呼ぶ。) 13、 SPUローカル RAM15、ジオメトリエンジン (以下、「GE」と呼ぶ。 ) 17、 Yソーティングュニッ ト (以下、「YSU」と呼ぶ。 ) 19、外咅^ Tンタフェースプロック 21、メイン RAMアクセスアービタ 23、メイン RAM25、 I/Oパス 27、ビデオ DAC (digital to analog converter) 29、ォ 一ディォ DACプロック 31、及び AZDコンバータ(以下、「ADC」と呼ぶ。)33を具備する。 メイン RAM25及び外部メモリ 50を区別して説明する必要がな ヽときは、「メモリ MEM」と表 記する。
CPU5は、メモリ MEMに編内されたプログラムを 亍して、各種演算やシステム全体の制 御を行う。また、 CPU5は、 DMAC4にプログラム及ぴデータの 要求を行うこともできる し、 DMAC4を介さずに、外部メモリインタフェース 3及ぴ外部バス 51を通じて、外部メモリ 5 0力も直接プログラムコードをフェッチし、外部メモリ 50に直接データアクセスを行うこともで きる。
グラフィックス処理に関する CPU5の処理として、メモリ MEMに; ^内されたプログラムを実 行して、各オブジェクト及ぴ各スプライトの拡大 ·縮小、回転、及ぴ Z又は5 動のパラメ ータ、視点座標 (カメラ座標)、並びに 镍ベクトルの算出等を行う。ここで、 1または複数の ポリゴンから構成され、同じ拡大 ·縮小、回転、及び 動の変換が適用される単位を「ォ ブジェクト」と呼ぶ。
I/Oパス 27は、 CPU5をバスマスタとするシステム制御用のバスであり、.バススレイブであ る各機能ユニット (外部メモリインタフェース 3、 DMAC4, RPU9、 SPU13、 GE17、 YSU1 9、外音 I ンタフェースプロック 21、及び ADC33)の制御レジスタ及ぴローカル RAM7, 11: 15へのアクセスに用いられる。このようにして、これらの機能ユニットは、 IZOバ 27を通じ て、 CPU5により制御される。 CPUローカル RAM7は、 CPU5専用の RAMであり、サブルーチンコールや割り込み時 におけるデータの などを行うためのスタック領域、及ぴ CPU5のみ力 S扱う変数の編内領 域等として使用される。
本発明の赚の 1つである RPU9は、ポリゴン及ぴスプライトから構成される三次元ィメー ジをリアルタイムに生成する。具体的には、 RPU9は、 YSU19によるソート済みの、ポリゴン 構造体配列の各構造 #H スタンス及ぴスプライト構造体配列の各構造 ί材ンスタンスを、メ イン RAM25から読み出し、上述したデプスコンパレータ 112等による処通ぴ後述する 様々な処理を新して、スクリーンのスキャンに合わせて水平ラインごとにイメージを^^す る。生成されたイメージは、コンポジットビデオ信号波形を示すデータストリームに変換され、 ビデオ DAC29に出力される。また、 RPU9は、 DMAC4に対して、ポリゴン及びスプライト のテクスチャパターンデータの取り込みのための DMA ^^要求を行う機能を有する。 RPU 9については、後で詳述する。
テクスチャパターンデータとは、ポリゴンまたはスプライトに貼り付けられる 2次元の画素配 列データであり、各画素データは、カラーパレット RAM11のエントリを指定するための情報 の一部である。このように、本実施の形態では、カラーの指定には、間接指定方式を採用す る。以降、テクスチャパターンデータの画素を「テクセル」と呼称し、スクリーンに表示されるィ メージを構成する画素を指す「ピクセル」とは区別して棚する。従って、テクスチャパターン データは、テクセルデータの集合である。
ビデオ DAC29は、アナログのビデオ信号を^^するためのデジタル Zアナログ変婦で ある。ビデオ DAC29は、 RPU9から入力されたデータストリームをアナログのコンポジットビ デォ信号に変換し、ビデオ信号出力 (図示せず)力もテレビジョンモニタ等 (図示せず) に出力する。
カラーパレット RAMI 1は、本^の形態では 512色すなわち 512エントリのカラーパレツ トからなる。 RPU9は、テクスチャパターンデータに^ ¾れるテクセルデータをカラーパレット のエントリを指定するインデックスの一部として、カラ一パレット RAMI 1を参照し、テクスチャ ノターンデータを、カラーデータ (RGBのカラ"コンポーネント)に変換する。
SPU13は、 PCM(pulse code modulation)波形データ (以下、「ウェーブデータ」と呼 ぶ。 )、アンプリチユードデータ、及びメインポリユームデータを する。具体的には、 SPU 13は、最大 64チャンネル分のウエーブデータを して^割多重化するとともに、最大 6 4チャンネル分のエンベロープデータを生成してチャンネルポリユームデータと乗算し、アン プリチユードデータを 割多重化する。そして、 SPU13は、メインボリュームデータ、時分 割多重化されたウエーブデータ、及ぴ時分割多重化されたアンプリチユードデータを、ォー ディォ DACブロック 31に出力する。また、 SPU13は、 DMAC4に対して、ウェーブデータ 及びエンベロープデータの取り込みのための DMA¾¾要求を行う機能を有する。
オーディオ DACプロック 31は、 SPU13から入力されたウエーブデータ、アンプリチユード データ、及びメインボリュームデータをそれぞれアナログ信号に変換し、結果をアナログ乗 算して、アナログオーディオ信号を生成する。このアナログオーディオ信号は、オーディオ 信号出力端子 (図示せず)からテレビジョンモニタ等 (図示せず)のオーディオ入力端子 (図 示せず)に出力される。
SPUローカル RAMI 5は、 SPU13がウェーブ再生及びエンベロープ生成を行う際に用 V、るパラメータ (例えば、ウェーブデータやエンベロープデータの 内アドレスやピッチ情報 など)を搬内する。
GE17は、三次元イメージを表示するための衡可演算を節する。具体的には、 GE17は、 行列積、ベクトルァフィン変換、ベクトル直交変換、 変換、頂点明度 Zポリゴン明度 計算 (ベクトル内積)、及ぴポリゴン裏面力リング処理 (ベクトル外積)などの演算を^ る。 本発明の糊敷の 1つである YSU19は、メイン RAM25に!^内されて!/、るポリゴ ^造体配 列の各構造^ スタンス及びスプライト構造体配列の各構造^ンスタンスを、ソートルー ル 1〜4に従ってソートする。この^、ポリゴン構造体配列とスプライト構造体配列とで、別 個にソートが行われる。
外部メモリインタフェース 3は、外部バス 51を介して、外部メモリ 50からのデータの読み出 し、及び外部メモリ 50へのデータの書き込みを司る。この:^、外部メモリインタフェース 3は、 図示しない EBI優先順位テーブルに従って、 CPU5及び DMAC4力もの外部バスアクセス 要求要因 (外部バス 51へのアクセスを要求する要因)を調停して、レ、ずれか 1つの外部パス アクセス要求要因 ¾1択する。そして、選択した外部バスアクセス要求要因に対して外¾ ス 51へのアクセスを許可する。 EBI優先順位テーブルは、 CPU5からの複難類の外部バ スアクセス要求要因及び DMAC4力もの外咅 くスアクセス要求要因の優先順位を定めたテ ブルである 0
外咅 くスアクセス要求要因として、 CPU5に含まれる図示しない IPL (initial program lo ader)によるブロック^ ¾要求、 CPU5によるデータアクセス要求、 CPU5による命令フェツ チ要求、及ぴ DMAC4による DMA要求がある。
DMAC4は、メイン RAM25と、外咅 [^くス 51に接続された外部メモリ 50と、の間で DMA転 送を行う。この場合、 DMAC4は、図示しない DMA優先順位テーブルに従って、 CPU5、
RPU9、及ぴ SPU13からの DMA繊要求要因 (DMA鍵を要求する要因)を調停して、 いずれか 1つの DMA 要求要因を選択する。そして、外部メモリインタフェース 3に対し て、 DMA要求を行う。 DMA優先順位テーブルは、 CPU5、 RPU9、及び SPU13からの D MA要求要因の優先順位を定めたテープノレである。
SPU13の DMA要求要因として、(1)ウェーブデータをウェーブバッファに "ること、 (2)エンベロープデータをエンベロープバッファに^すること、がある。ウェーブバッファ 及びエンベロープバッファは、それぞれメイン RAM25上に設定されるウェーブデータ及び エンベロープデータのテンポラリ格納領域である。なお、 SPU13の 2つの DMA要求要因 間の調停は、 SPU13内のハードウェア(図示せず)で行われ、 DMAC4は関知しない。
RPU9の DMA要求要因として、テクスチャパターンデータをテクスチャバッファに す ること、がある。テクスチャバッファは、メイン RAM25上に設定されるテクスチャパターンデ ータめテンポラリ 瞧域である。
CPU5の DMA要求要因として、(1) 想記憶管理にぉレ、てページミスが発生した ΐ の ぺ一ジ^!、(2)アプリケーションプログラム等が要求する—データ te、がある。なお、 CPU 5内で複数の DMA鍵要求が同時に発生した齢は、その調停は CPU5で節されるソ フトウェアにて行われ、 DMAC4は関知しない。
DMAC4は、 LZ77アルゴリズムに基づくデータ伸張機能を備えており、 CPU5による DM A¾¾要求に対して、外部メモリ 50に編内された圧縮データを伸張しながら DMA する ことが可能である。
外咅 I ンタフェースブロック 21は、周辺装置 54とのインタフェースであり、 24チャンネルの プログラマブルなデジタル入出力 (IZO)ポートを含む。 24チャンネルの I/Oポートの各々 は、 4チャンネル分のマウスインタフェース機能、 4チャンネル分のライトガンインタフェース 機能、 2チャンネル分の汎用タイマ/カウンタ、 1チャンネル分の調歩同期式シリアルインタ フェース機言 g、 1チャンネル分の汎用パラレル Zシリアル変換ポート機能のうち 1または複数 に内部接続されている。
ADC33は、 4チャンネルのアナログ入力ポートに接続され、これらを介して、アナログ入力 装置 52から入力されたアナログ信号をデジタル信号に変換する。例えば、マイク音声等の アナログ入力信号をサンプリングしてデジタルデータに変換する。
メイン RAMアクセスアービタ 23は、機能ユニット (CPU5、 RPU9、 GE17、 YSU19、 DM
AC4、及び外咅 I ンタフェースブロック 21 (汎用パラレル Zシリアル変換ポート)力ものメイン
RAM25へのアクセス要求を調停して、 V、ずれかの機能ユニットにアクセス許可を出す。 メイン RAM25は、 CPU5のワーク領域、変数編内領域、および仮想記憶管理領域等とし て利用される。また、メイン RAM25は、 CPU5が他の機能ユニットに受け » "データの格 糸觸域、 RPU9及び SPU13が外部メモリ 50から DMAによって取得したデータの格^ ^域、
GE17及ひ YSU19の入力データ及ぴ出力データの ! ^域等としても使用される。
外咅 ス 51は、外部メモリ 50にアクセスするためのバスである。 CPU5および DMAC4か ら、外部メモリインタフェース 3を介してアクセスされる。外部バス 51のアドレスパスは、 30ビ ットから成り、最大で 1Gバイト(=8Gビット)の外部メモリ 50を接続することができる。外咅 ス 51のデータパスは、 16ビットから成り、 8ビット又は 16 、ットのデータバス幅を持つ外部メ モリ 50を接続できる。 ¾るデータバス幅を持つ外部メモリを同時に接続可能であり、ァクセ スする外部メモリによってデータパス幅を自動的に切り替える機能が備えられる。
次に、マルチメディアプロセッサ 1によるグラフィックス処理の概要を説明する。
図 11は、図 10のマルチメディアプロセッサ 1によるグラフィックス処理の流れの概要を示す フローチャートである。図 11に示すように、ステップ S1にて、 CPU5は、各オブジェクト(1ま たは複数のポリゴンから構成され、同じ拡大'縮小、回転、及び 移動の変換が適用され る単位)及び各スプライトの拡大'縮小、回転、及ぴ平行移動のパラメータを算出する。算出 されたパラメータから、各オブジェクト及ぴ各スプライトに対し、拡大'縮小、回転、及び5 W 移動のための変衡亍列が生成される。これらの変衡亍列は、各オブジェクト及び各スプライト のローカルな座標系 (ローカル座標系)から、全てのオブジェクト及び全てのスプライトを統 一の座標系で表現する直 ¾¾標系 (ワールド座標系)への変換に用!/ヽられる。
また、 CPU5は、視点 (カメラ)座標、文像点座標、及ぴ ¾ /線ベクトルの を行う。これ らのパラメータから、ワールド座標系から視点を中心とした直 ¾¾標系 (ビュー座標系)への 変換行列が生成される。
ステップ S2にて、 GE17は、各オブジェクト及ぴ各スプライトに対し、拡大'縮小、回転、及 ぴ 動のための変換行列が複数 する^、それらの変衡亍列の行列積を求めるこ とにより、複数の変衡亍列を単一の変換行列に合成する。さらに、 GE17は、合成された変換 行列と、座標系変換のための変換行列と、の行列積を求めて、オブジェクト頂点座標配列、 才ブジェクト¾ ^ベクトル配列、及びスプライト座標を変換するための変換行列をそれぞれ 合成する o
ステップ S3にて、 GE17は、合成された変換行列を用い、オブジェクト頂雄標配列、ォプ ジェクト¾ ^ベクトル配列、及びスプライト座標の^ {¾換を行う。また、 GE17は、'変換後の オブジェクト タトル配列と光源べタトルとの内積を演算し、オブジェクトの各頂点または 面 (ポリゴン)の明度を算出する。このような幾何変 »ぴライティングの結果は ポリゴン構 造体配列及びスプライト構造体配列に欄される。
ステップ S4にて、 RPU9による描画処 ¾^行われる前に、 YSU19は、ソートルール 1〜4 に従って、ポリゴ^ ft造 ンスタンスおよびスプライト構造 ί材ンスタンスをソートする。
ステップ S5にて、 RPU9〖ま、 YSU19によるソート後のポリゴ:/ «造# ^ンスタンスおよぴス プライト構造 #^ンスタンスを読み出すとともに、テクスチャマッピングモードのポリゴン及び スプライトの属性を示すテクスチャアトリビュート構造体インスタンスを読み出しつつ、各水平 表示ラインのピクセルデータ列を生成する。また、テクスチャマッピングモードのポリゴン及 ぴスプライトのピクセルデータ列生成には、これらに貼り付けるテクスチャパターンデータを, 外部メモリ 50から読み出すことが必要とされる。このようなピクセルデータ列生成処理を「ラス タライジング」と呼ぶ。
本難の形態では、ポリゴンの描画モードとして、テクスチャマッピングを用いて描画を行う テクスチャマッピングモードと、グーローシェーディングを用レヽてポリゴンの描画を行うグー口 一シェーディングモードと、を実装している。テクスチャマッピングは、二次元の格子状に並 ベられたテクセルのパターンをポリゴン表面に貼り付ける描画手法である。グーローシエー デイングは、少ない個数のポリゴンで擬似的に滑らカな曲面を表現するために用いられるス ムーズシェーディングの一種である。グーローシェーディングでは、独立に指定されたポリゴ ンの頂点色を 線補完することでポリゴン内の各ピクセルの描画色を求める。
また、 RPU9は、シザリングを する。シザリングとは、ポリゴン及ぴスプライトのピクセル データ列生成時に、指定されたビューポートの領域からはみ出して ヽる部分 り取って表 示しなレ、ようにする処理である。生成されたピクセルデータ列は、 RPU9内のラインバッファ
LB1ある 、は LB2に書き込まれる力 この際に書き込みピクセルが半透明色に設定されて レ、る 、ラインバッファ内のピクセルのカラーと書き込みピクセルのカラーを混ぜ合わせる 力ラーブレンデイングが行われる。
ステップ S6にて、 RPU9は、ラインバッファ LB1あるいは LB2から表示 の各ピクセル の情報を読み出し、同期信号及ぴカラーバースト信号等を てコンポジットビデオ信号 のデジタルデータストリームを生成する。生成されたデータストリームは、ビデオ DAC29に 入力され、ビデオ DAC29からは、アナログのコンポジットビデオ信号が出力される。
次に、 RPU9の詳細を説明する。
図 12は、図 10の RPU9の内部構成を示すブロック図である。図 12に示すように、 RPU9 は、 RPU内メイン RAMアクセスアービタ 100、ポリゴンプリフェツチヤ 102、スプライトプリフ エツチヤ 104、マージソータ 106、プリフェッチバッファ 108、リサイクルバッファ 110、デプス コンパレータ 112、パーテックスソータ 114、バーテックスエキスパンダ 116、スライサ 118、 ピクセルステツパ 120、ピクセルディザ 122、テクセルマツパ 124、テクスチャキャッシュプロ ック 126、パイリニアフィルタ 130、カラープレンダ 132、ラインバッファプロック 134、ビデオ エンコーダ 136、ビデオタイミングジェネレータ 138、メモリマネージャ 140、及ぴ DMACィ ンタフェース 142を含む。ラインバッファブロック 134は、各々スクリーンの 1水平ラインに対 応するラインバッファ LB1及び LB2を含む。なお、図 12では、説明の便宜のため、カラーパ レット RAMI 1を RPU9に含めて記載してレヽる。
RPU内メイン RAMアクセスアービタ 100は、ポリゴンプリフェツチヤ 102、スプライトプリフ エツチヤ 104、及びメモリマネージャ 140からメイン RAM25へのアクセス要求を調停して、 いずれか〖こアクセス要求の許可を出す。許可されたアクセス要求は、メイン RAMアクセスァ ービタ 23に出力され、マルチメディアプロセッサ 1内の他の機能ユニットからのアクセス要求 との間で調停が行われる。
ポリゴンプリフェツチヤ 102は、メイン RAM25から、 YSU19によるソート後の各ポリゴン構 造 スタンスを取り込む。ポリゴンプリフェツチヤ 102には、 YSU19から、パルス PPLが 入力される。 YSU19は、ソートにおいて順位の高いもの力もポリゴン構造 ί材ンスタンスが 1 つ確定するたぴに、パルス PPLを出力する。従って、ポリゴンプリフェツチヤ 102は、ポリゴン 構造体配列の全ポリゴ^造 ί材ンスタンスのうち、 V、くつのポリゴン構造 #H スタンスのソ ートが完了したかを知ることができる。
このため、ポリゴンプリフェツチヤ 102は、全ポリゴ^ «造# ^ンスタンスのソートめ完了を待 つことなぐ順位の高いものカゝらポリゴン構造体インスタン が 1つ確定するたぴに、その都 度、ポリゴン構造体インスタンスを取得できる。その結果、フレームの表示中に、当該フレー ムのためのポリゴン構造 # ^ンスタンスのソートを行うことができる。また、インタレーススキヤ ンによる表示を行う にも、前述のモード 2 (図 9(b)参照)を用いることにより、フィールドの 表示中に当該フィールドのためのソートを行っても、正し!/、描画結果が得られる。なお、ポリ ゴンプリフェツチヤ 102は、ビデオタイミングジェネレータ 138力もの垂直走 ゥント信号 V Cから、フレームおよびフィールドの切り替わりを知ることができる。
スプライトプリフェツチヤ 104は、メイン RAM25から、 YSU19によるソート後の各スフ。ライト 構造 スタンスを取り込む。スプライトプリフェツチヤ 104には、 YSU19から、パルス SP Lが入力される。 YSU19は、ソートにぉ 、て順位の高 、ものからスプライト構造 ί材ンスタン スが 1つ確定するたぴに、パルス SPLを出力する。従って、スフ。ライトプリフェツチヤ 104は、 スプライト構造体配列の^ ブライト構造 # rンスタンスのうち、 、くつのスプライト構造 ί材 ンスタンスのソートが完了したかを知ることができる。
このため、スプライトプリフェツチヤ 104は、 プライト構造 ί材ンスタンスのソートの完了 を待つことなぐ順位の高レ、ものからスプライト構造 ί材ンスタンスが 1つ確定するたぴに、そ の都度、スプライト構造 ί材ンスタンスを取得できる。その結果、フレームの表示中に、当該 フレームのためのスプライト構造体インスタンスのソートを行うことができる。また、インタレ ススキャンによる表示を行う:^にも、前述のモード 2 (図 9 (b)参照)を用いることにより、フィ 一ルドの表示中に当^ ィールドのためのソートを行っても、正しい描画結果が得られる。な お、スプライトプリフェツチヤ 104は、ビデオタイミングジェネレータ 138からの垂直走^ 7ゥ ント信号 VCから、フレームおよびフィールドの切り替わりを知ることができる.。
ここで、ポリゴ^ «造体、テクスチャアトリビュート 造体、およぴスプライト構造体の構成に ついて詳しく説明する。
図 13は、テクスチャマッピングモードのポリゴン構造体の例示図である。図 13に示すように, 本 の形態では、このポリゴン構造体は、 128ビットで構成されて!/ヽる。このポリゴン構造 体のメンバ Typeは、ポリゴンの描画モードを示し、テクスチャマッピングモードのポリゴンに 対しては「0」が設定される。メンバ Ay, Ax, By, Bx, Cy及び Cxは、それぞれ、ポリゴンの、 頂 の Y座標、頂 の XJM標、頂点 Βの Υ座標、頂点 Βの 標、頂点 Cの Υ座標、及ぴ 頂点 Cの Xffi標を示す。これらの Y座標及ひ 標は、スクリーン座標系の値である。
メンバ Bw, Cw, Light及び Tsegmentは、それぞれ、ポリゴンの、頂;^ Bのパースぺクティ ブコレクト用パラメータ(=AzZBz)、頂点 Cのパースペクティブコレクト用パラメータ(二 Az /Cz)、明度、及びテクスチャパターンデータの ¾¾ί立置情報を示す。
メンバ Tattribute, Map, Filter, Depth及ひ Viewportは、それぞれ、テクスチャアトリビ ユート構造体のインデックス、テクスチャパターンデータのフォーマット ¾¾、ノ ィリニアフィ ルタリングあるいは二アレストネィパーのいずれかを示すフィルタリングモード、デプス値、 及ぴシザリングのビューポート指定情報を示す。パイリニアフィルタリング及び二アレストネィ バーについては後 ¾ ^る。
以上が、テクスチャマッピングモードのポリゴン構造体の各メンバの内容であり、 1つのポリ ゴン構造体のインスタンス (ポリゴン構造体に代入された値)により 1つのポリゴンが定義され る。
図 14は、テクスチャアトリビュート構造体の例示図である。図 14に示すように、本実施の形 態では、このテクスチャアトリビュート構造体は、 32ビットで構成されている。このテクスチャ アトリビュート構造体のメンバ Width, Height, M, N, Bit及び Paletteは、それぞれ、テク スチヤの幅 (単位:テクセル数)より「1」小さい値、テクスチャの高さ(単位:テクセル数)より 「1」小さ 、値、「Width」の上御ものマスクビット数、「Height」の上御らのマスクビット数、 カラーモード(1ピクセル当りのビット数一 1)、及びパレットプロックナンパを示す。カラーパレ ットの 512色のエントリは、選択されたカラーモードに応じて複数のプロックに分割されており、 メンバ Paletteにより、使用するパレットプロックが示される。
テクスチャアトリビュート構造体のインスタンスは、描画ポリゴン毎に 1つずつ用意されるも のではなぐ 64個のテクスチャアトリビュート構造 ンスタンス力 テクスチャ ッピングモ 一ドの全ポリゴ i造 ンスタンス及び^ ブライト構 5¾ ンスタンスで雜される。
図 15は、グーローシェーディングモードのポリゴン構造体の例示図である。図 15に示すよ うに、本実施の形態では、グーローシェーディングモードのポリゴン構造体は、 128ビットで 構成されており、メンバ Ax (11ビット), Ay (10ビット), Bx(llビット), By (10ビット), Cx(l 1ビット), Cy (10ビット), Ac (15ビット), Be (15ビット), Cc (15ビット), Depth (12ビット), Viewport (2ビット)及 O^Nalpha (3ビット)を有する。
メンバ Typeは、ポリゴンの描画モードを示し、グーローシェーディングモードのポリゴンに 対しては「1」が設定される。メンバ Ay, Ax, By, Bx, Cy及ぴ Cxは、それぞれ、ポリゴンの、 頂 の Y座標、頂 の XJM標、頂点 Βの Υ座標、頂点 Βの难標、頂点 Cの Υ座標、及ぴ 頂点 Cの X座標を示す。これらの Υ座標及ひ X座標は、スクリーン座標系の値である。
メンバ Ac, Be,及び Ccは、それぞれ、ポリゴンの、頂 ¾Aのカラーデータ (RGB各 5ビット)、 頂点 Bのカラーデータ (RGB各 5ビット)、及ぴ頂点 Cのカラーデータ (RGB各 5ビット)を示 す。
メンバ Depth, Viewport及ぴ Nalphaは、それぞれ、デブス値、シザリングのビューポート 指定情報、及びアルファプレンディングで使用する(1— α )を示す。 (l- α )は透明度を示 し、「000 (二進数)」が透明度 0%、すなわち完全不透明を表し、「111 (二進数)」が透明度 8 7. 5%を表す。
以上が、グーローシェーディングモードのポリゴン構造体の各メンバの内容であり、 1つの ポリゴン構造体のインスタンス (ポリゴン構造体に代入された値)により 1つのポリゴンが定義 される。
図 16 (a)は、シザリングディセーブル時のスプライト構造体の例示図、図 16 (b)は、シザリ ングイネーブル時のスプライト構造体の例示図である。図 16 (a)に示すように、本実施の形 態では、シザリングディセーブル時のスプライト構造体は、 64ビットで構成されている。この スプライト構造体のメンバ Ax及び Ayは、それぞれ、スフ。ライトの左上の Xffi標及ひ Ύ座標を 示す。これらの Y座標及ひ 標は、スクリーン座標系の値である。 メンバ Depth, Filter及び Tattributeは、それぞれ、デブス値、フィルタリングモード (バイ リニアフィルタリングあるいは二アレストネィパー)、及ぴテクスチャアトリビュート構造体のィ ンデックスを示す。メンバ ZoomX, ZoomY及び Tsegmentは、それぞれ、 X軸方向のスプ ライト拡大率 (雄率)、 Y#方向のスプライト拡大率 (雄率)、及びテクスチャパターンデー タの 立置†青報を示す。
図 16(b)に示すように、本»の形態では、シザリングイネーブル時のスフ。ライト構造体は、 64ビットで構成されている。このスプライト構造体のメンバ A S XAyは、それぞれ、スプラ イトの左上の x¾標及ひ Y座標を示す。これらの γ座標及ひ: 標は、スクリーン座標系の値 である。
メンバ Depth, Scissor, Viewport, Filter及び Tattributeは、それぞれ、デフ。ス値、シザ リング適用フラグ、シザリングのビューポート指定情報、フィルタリングモード (バイリニアフィ /レタリングある 、は二アレストネィバー)、及ぴテクスチャアトリビュート構造体のインデックス を示す。メンバ ZoomX, ZoomY及び Tsegmentは、それぞれ、 X軸方向のスプライト拡大 率 (纖率)、 Y軸方向のスプライト拡大率 (鎌率)、及ぴテクスチャパターンデータの搬内 位置情報を示す。
シザリングイネーブル時のスプライト構造体においては、シザリングディセーブル時のスプ ライト構造体に比べ、 X座標及ひ Ύ座標のビット数がそれぞれ 1ビット少ない。シザリングイネ 一ブル時にスフ。ライトがスクリーンに配置される際には、後述のパーテックスエキスパンダ 11 6によって、 X座標に 512ピクセル分のオフセット、 Y座標に 256ピクセル分のオフセットが加 えられる。また、デプス値のビット »1ビット少ないが、シザリングイネ一プル時には、後述 のテクセルマツパ 124によって、構造体に觸内されて ヽるデブス値の LSB側に 1ビットの「0」 が付加され、シザリングディセープル時と同様に 8 ットのデプス値として扱われる。
以上が、シザリングディセープル時及ぴシザリングイネ一プル時のスプライト構造体の各メ ンバの内容であり、 1つのスプライト構造体のインスタンス (スプライト構造体に代入された値) により 1つのスプライトが定義される。スプライトのテクスチャアトリビュート構造体の構成は、 図 14のポリゴンのテクスチャアトリビュート構造体の構成と.同じである。テクスチャァトリビュー ト構造体のインスタンスは、描画スプライト毎に 1つずつ用意されるものではなぐ 64個のテ タスチヤアトリビュート構造 ンスタンス力 テクスチャマッピングモードの全ポリゴ «造体 インスタンス及ぴ^ ブライト構造 ンスタンスで される。
図 12に戻って、マージソータ 106は、ポリゴンプリフェツチヤ 102及びスプライトプリフェツ チヤ 104から、それぞれ、ポリゴ «造 ί材ンスタンス及びそれに付随するテクスチャアトリビ ユート構造 # ンスタンス、並びに、スプライト構造 # ^ンスタンス及ぴそれに付随するテクス チヤアトリビュート構造 # ^ンスタンスを受け取り、 _ ϊϋした YSU19によるソートルール:!〜 4 と同じソートルール 1〜4に従って、マージソートを実行し、結果をプリフェッチバッファ 108 に送出する。
つまり、マージソータ 106は、ソートルール 1〜4に ί^ て、ポリゴ ^!造 ンスタンス ¾1 択した^^、テクスチャマッピングモードのポリゴンについては、ポリゴン構造体インスタンス をポリゴン/スプライトデータ PSD (128ビット)として、それに付随するテクスチャアトリビュ ート構造 # ^ンスタンスをテクスチャアトリビュート構造 ί材ンスタンス ΤΑΙ (32ビット)として、 プリフェッチバッファ 108に出力する。
また、マージソータ 106は、ソートルール 1〜4に従って、ポリゴン構造 ί材ンスタンスを選 択した 、グーローシェーディングモードのポリゴンについては、ポリゴン構造体インスタ ンスをポリゴン/スプライトデータ PSD (128ビット)として、テクスチャアトリビュート構造 ί材 ンスタンス ΤΑΙ (32ビット)の全ビットを「0」として、プリフェッチバッファ 108に出力する。 —方、マージソータ 106は、ソートルール 1〜4に従って、スプライト構造 # Γンスタンスを 選択した^、スフ。ライト構造体インスタンスをポリゴン Zスプライトデータ PSD (128ビット) として、それに付随するテクスチャアトリビュート構ίί材ンスタンスをテクスチャアトリビュート 構造 ί材ンスタンス ΤΑΙ (32ビット)として、プリフェッチバッファ 108に出力する。ただし、この : ^のポリゴン/スプライトデータ PSDは、有効データ力 SLSBから詰められ、上位 64ビット は「0」を示す。 上で詳述したプリフェッチバッファ 108は、マージソー 106から、マージソート後の構造
# rンスタンス (つまり、ポリゴン zスプライトデータ PSD及びテクスチャアトリビュート構造体 インスタンス TAI)を順次読み込み、読み込んだ順番で構造 ンスタンスを出力する FIFO (first— in first— out)構造のバッファである。つまり、プリフェッチバッファ 108には、マー ジソータ 106により並べ替えられた順番で構造インスタンスが搬内される。そして、編内され た構造インスタンスは、対応するポリゴンあるレ、はスプライトの表示のための描画サイクルに おいて、編内された順番で出力される。なお、プリフェッチパッファ 108は、ビデオタイミング ジェネレータ 138からの垂直走 ゥント信号 VCから、描画中の水平ラインを知ることがで きる。つまり、描画サイクルの切り替わりを知ることができる。本»の形態では、例えば、プ リフエツチバッファ 108は、物理的にはリサイクルバッファ 110とパッファを共有することが可 能であり、リサイクルパッファ 110のエントリ数 ¾Τ ^め、(128ビット +32ビット) X 128エントリ とする。
上で詳述したリサイクルバッファ 110は、次の描画サイクルでも棚される (つまり、再利用 できる)構造 ί材ンスタンス (つまり、ポリゴン Ζスプライトデータ PSD及びテクスチャアトリビ ユート構造 ί材ンスタンス ΤΑΙ)を、スライサ 118から受け取って櫞内する FIFO構造のパッフ ァである。従って、リサイクルバッファ 110に觸内された構造^ンスタンスは、次の描画サイ クルで使用される。本難の形態では、例えば、リサイクルバッファ 110は、物理的にはプリ フェッチバッファ 108とバッファを することが可能であり、プリフェッチバッファ 108のェン トリ数 ¾Τ ^め、(128ビット +32ビット) X 128エントリとする。
上で詳述したデプスコンパレ一タ 112は、プリフェッチバッファ 108の先頭の構造 ンス タンスに含まれるデプス値と、リサイクルバッファ 110の先頭の構造 ί材ン タンスに含まれ るデプス値と、を比較して、より大きなデブス値を持つ (つまり、より奥に表示されるべき)構造 f材ンスタンスを選択して、後段に出力する。この齢、デプスコンパレータ 112は、選択し た構造体インスタンスがポリゴン構造体 ンスタンスの ^は、バーテックスソータ 114へ出 力し、スプライト構造体インスタンスの場合は、バーテックスエキスパンダ 116に出力する。ま た、デプスコンパレータ 112は、選択した構造 ンスタンスをスライサ 118に出力する。な お、デプスコンパレータ 112は、ビデオタイミングジェネレータ 138からの垂直走 ゥント 信号 VCから、描画中の水平ラインを知ることができる。つまり、描画サイクルの切り替わりを 知ることがでさる。
バーテックスエキスパンダ 116は、受け取ったスプライト構造 ί材ンスタンスに含まれる、ス プライトの左上の頂点座標 (Ax, Ay)、 Y軸方向の拡大率 ZoomY、及ひ 軸方向の 大率 ZoomX、並びに、当 ブライト構造^ fンスタンスに付随するテクスチャアトリビュート構造 ンスタンスに含まれる、テクスチャの幅より「1」小さ 、iiWidth及び高さより「1」小さ 、値 Heightに基づいて、当該スプライトの頂点の座標 (スクリーン座標系における XY座標およ ぴ UV座標系における UV座標)を算出し、ポリゴン Zスフ。ライト共通データ CI (208ビット)と してスライサ 118へ出力する。ただし、ポリゴン Zスプライト共通データ CIの後述のフィール WG* (* =0, 1, 2)は、常に「0x0040」 (=1. 0)として出力される。バーテックスエキス パンダ 116が出力するポリゴン Zスプライト共通データ CIの構造 (形式)は、ノーテックスソ ータ 114が出力するポリゴン Zスプライト共通データ CIの構造 (形式)と同じである。
パーテックスエキスパンダ 116は、受け取ったスプライト構造体インスタンスに含まれる、ス プライトの左上の頂点座標 (Ax, Ay)、 Y軸方向の拡大率 ZoomY、及ひ X軸方向の拡大率 ZoomX、並びに、当^ ブライト構造 Wンスタンスに付随するテクスチャアトリビュート構造 f材ンスタンスに含まれる、テクスチャの幅より「1」小さ ヽィ SWidth及び高さより「1」小さ!/、値 Heightに基づいて、当該スプライトの頂点の座標 (スクリーン座標系における Y座標およ ぴ UV座標系における UV座標)を算出し、ポリゴン Zスプライト共通データ CI (208ビット)と してスライサ 118へ出力する。ただし、ポリゴン Zスプライト共通データ CIの後述のフィール ド WG* (* =0, 1, 2)は、常に「0x0040」(=1. 0)として出力される。パーテックスエキス パンダ 116が出力するポリゴン/スプライト共通データ CIの構造 (形式)は、パーテックスソ ータ 114が出力するポリゴン/スプライト共通データ CIの構造 (形 5 と同じである。
ここで、スクリーン座標系は上述の通りである。 UV座標系は、テクスチャを構成する各テク セノレが、ポリゴンある 、はスプライトにマッピングされる態様で配置される二次元直 ¾ ^標系 である。
バーテックスソータ 114は、受け取ったポリゴン構造体インスタンス及びそれに付随するテ クスチヤアトリビュート構造インスタンスから、ポリゴンの各頂点のパラメータ (XYUV座標、 パースペクティブコレクト用パラメータ、及びカラーデータ)を取得及ぴ算出し、各頂点のパ ラメータを γ座標が小さ ヽ職こ並べ替えて、ポリゴン/スフ。ライト共通データ CIとしてスライサ
118へ出力する。頂点の出 ?1)噴は、早いほうから頂点 0、頂点 1、及ぴ頂点 2とする。
つまり、テクスチャマッピングモードでは、パーテックスソータ 114は、演算結果、つまり、各 頂点 0〜2のパラメータ (XY座標、パースペクティブコレクト後の UV座標、及びパースぺク ティブコレクト用パラメータ)を、ポリゴン Zスプライト共通データ CIとして、スライサ 118に出 力する。
また、グーローシェーディングモードでは、パーテックスソータ 114は、演算結果、つまり、 各頂点 0〜2のパラメータ (XY座標、及びカラーデータ)を、ポリゴン Zスプライト共通データ CIとして、スライサ 118に出力する。
パーテックスソータ 114が出力するポリゴン/ /スプライト共通データ CIの構成 (形式)は、パ 一テックスエキスパンダ 116が出力するポリゴン/スプライト共通データ CIの構成 (形式)と 同じである。
パーテックスソータ 114及びパーテックスエキスパンダ 116が出力するポリゴン Zスプライ ト共通データ CIの構成を説明する。ポリゴン Zスプライト共通データ CIは、フィールド F(lビ ット), WG * (各 16ビット), VR * (各 16ビット), UB * (各 16ビット), Y * (各 10ビット)及び X* (各 11ビット)力もなる (計 208ビット)。 * =0, 1, 2であり、頂点を示す。.
フィーノレド Fは、ポリゴン Zスフ。ライト共通データ CI力 ポリゴンについてのものである力、 スプライトについてのものである力、を示すフラグフィールドである。従って、パーテックスソ ータ 114は、ポリゴンを示す「1 Jをフィールド Fに櫞内する。一方、バーテックスエキスパンダ 116は、スプライトを示す「0」をフィールド F ¾内する。 パーテックスエキスパンダ 116から出力されるポリゴン スブライト共通データ CIでは、フィ ール KVR* , UB *, Y*及ひ X*は、それぞれ頂点 *の V座標、 U座標、 Y座標、及ひ X 座標である。この^ \フィーノレ WG *には、「0x0040」(= 1. 0)が觸内される。 ±M,† ように、頂点 *の出 ¾J噴は、早いほうから頂点 0、頂点 1、及び頂点 2である。
パーテックスソータ 114から出力される、テクスチャマッピングの纖であるポリゴン Zスプ ライト共通データ CIでは、フィールド WG * , VR * , UB * , Y *及び X *は、それぞれ頂 点 *のパースペクティブコレクト用パラメータ、パースペクティブコレクト済み V座標、パース ぺクティブコレク 済み U座標、 Y座標、及ひ 標である。
パーテックスソータ 114から出力される、グーローシェーディングの対象であるポリゴン Z スフ。ライト共通データ CIでは、フィール KWG *, VR *, UB *, Y *及ひ X *は、それぞれ 頂点 *の誠分、赤成分、青成分、 Y座標、及ひ¾¾標である。
図 17〜図 19を用いてスライサ 118の動作を説明する。図 17は、スライサ 118による、グー ローシェーディングモードのポリゴンに る処理の説明図である。図 17に示すように、スラ ィサ 118は、与えられたポリゴン Zスプライト共通データ CIにより定義されるポリゴン (三角 形)と、描画対象の水平ラインと、の交点の XY座標 (Xs, Ys)及び (Xe, Ye)を求める。ここで、 ポリゴンに対しては、描画文豫の水平ラインと交わらな!/、辺が する側の交点を終端 (Xe, Ye)とし、当該辺が據しなレ、側の交点を始端 (Xs, Ys)とする。
そして、スライサ 118は、描画 Y座標 Yr力 SY0≤Yrく Y1の範囲では、頂点 0の RGB値 (V RO, WGO, UB0)及ぴ頂点 2の RGB値 (VR2, WG2, UB2)に基づいて、 ί 補間により、 交点始端の RGB値 (Rs, Gs, Bs)を算出するとともに、頂点 0の RGB値 (VR0, WGO, UB
0)及び頂点 1の RGB値 (VR1, WG1, UB1)に基づいて、直線補間により.、交点終端の RG
Bit (Re, Ge, Be)を算出する。また、スライサ 118は、描画 Y座標 Yrが Yl≤Yr≤Y2の範 囲では、頂点 0の RGB値 (VRO, WGO, UB0)及び頂点 2の RGB値 (V 2, WG2, UB2) に基づいて、 補間により、交点始端の RGB値 (Rs, Gs, Bs)を算出するとともに、頂点 1 の RGB値 (VR1 , WG1, UB1)及び頂点 2の RGB値 (VR2, WG2, UB2)に基づ!/、て、直 線補間により、交点終端の RGB値 (Re, Ge, Be)を算出する。
そして、スライサ 118は、 AR、 AG、 ΔΒ及び AXgを算出する。ここで、 AR、 AG, ΔΒは. 描画練の水平ラインにおける AXgあたりの R、 G、 Bそれぞれの変化量であり、 ΔΧ§は、 描画 の水平ラインにおける 1ピクセルあたりの 標の変化量である。 AXgは、「+1」ま たは「—1」のいずれかとなる。
Δ R= (Re— Rs) / (Xe— Xs)
厶 G= (Ge— Gs) Z (Xe— Xs)
Δ B= (Be-Bs) / (Xe.— Xs)
AXg= (Xe-Xs)/ I Xe-Xs |
スライサ 118は、デブスコンパレータ 112から受け取った構造 ンスタンスと共に、算出 した Xs, Rs, Gs, Bs, Xe, AR, AG, ΔΒ及ぴ AXgを、ピクセルステツパ 120へ送出する c また、スライサ 118は、パーテックスソータ 114から受け取ったポリゴン/スプライト共通デー タ CIが、次の描画サイクルでも使用される は、リサイクルバッファ 110に、デプスコンパ レータ 112から受け取った構造 ί材ンスタンスを書き込む。なお、ビデオタイミングジエネレ ータ 138からの垂直 ¾ ^ゥント信号 VC及ぴポリゴンの頂点座標から、次の描画サイクルで の使用の有無を知ることができる。
図 18は、スライサ 118による、テクスチャマッピングモードのポリゴンに る処理の説明 図である。図 18に示すように、スライサ 118は、与えられたポリゴン Zスプライト共通データ C Iにより定義されるポリゴン (三角形)と、描画通の水平ラインと、の交,髓標である始端 C¾ Ys)及ぴ終端 (Xe, Ye)を求める。この点は、グーローシェーディングモードのポリゴンに対 する処理と同じである。
ここで、パースペクティブコレクト機能について説明する。透視 変換された三次元ィメ ージを表現するテクスチャマッピングにお 、て、スクリーン上の描画ピクセルに対応するテク セルを、ポリゴンの各頂点座標に対応する、 UV空間のテクスチャの各頂点座標の^ ¾る線 开缩完によって求めると、マッピングされたイメージが歪んでしまうことがある。こめ歪みを解 消するのがパースペクティブコレクト機能であり、具体的.には、以下のような処理が行われ. る。
ポリゴンの各頂 ¾A, B, Cを UV空間へ写像したときの座標を、(Au, Av) , (Bu, Bv) , (C u, Cv)とする。また、各頂 ¾A, B, Cのビュー座標を (Ax, Ay, Az) , (Bx, By, Bz), (Cx, Cy, Cz)とする。そして、 (Au/Az, Av/Az, 1/Az) , (Bu/Bz, Bv/Bz, l/Bz) , (C u/Cz, Cv/Cz, lZCz)の線开繩間によつて求められた値 (uZz, vZz, lZz)の u/zに Ι,ζの逆数を乗じた値 uおよび vZzに lZzの逆数を乗じた値 v、つまり (u, V)をテクセノレ座 標 (U, V)としてテクセルデータを取得することにより、進職変換後の正確なテクスチャ マッピングを実現する。ここで、ビュー座標とは、ビュー座標系の座標である。ビュー座標系 は、 XYZの三軸から) ^三次元直»標系であり、視点を原点とし、機を Z軸の正とする。 本難の形態では、 1/Az, l/Bz, 1/Czを頂点毎に設定する代りに、それぞれの値に Azを掛け合わせた値、すなわち、 Az/Az(=Aw) , Az/Bz(=Bw) , Az/Cz (=Cw)を ポリゴン構造体に設定する (図 13参照 )0但し、頂,^ A ¾ "るパラメータ Awは常に「1」とな るため、ポリゴン構造体には設定しない。
従って、本実施の开多態では、(Au'Aw, AvAw, Aw) , (Bu-Bw, BvBw, Bw) , (Cu- Cw, CvCw, Cw)の,線开^ t間によつて求められた値 (u'w, v , w)の u'wに 1/wを乗 じた値 uおよび vwに lZwを乗じた値 v、つまり (u, V)をテクセル座標 (U, V)としてテクセ ルデータを取得することにより、 »S ^変換後の正確なテクスチャマッピングを ¾?¾する。 このことを念項においた上で、スライサ 118は、描画 Y座標 Yrが YO≤Yrく Y1の範囲では、 頂点 0の (UBO, V O, WG0)、及び頂点 2の(UB2, VR2, WG2)に基づ!/、て、直線補間 により、交点始端の(Us, Vs, Ws)を算出するとともに、頂点 0の(UBO, VRO, WG0)、及 ぴ頂点 1の (UB1, VR1, WG1)に基づいて、直線補間により、交点終端の (Ue, Ve, We) を算出する。また、スライサ 118は、描画 Y座標 Yrが Yl≤Yr≤Y2の範囲では、頂点 0の (U
BO, VRO, WG0)、及び頂点 2の (UB2, VR2, WG2)に基づいて、直線補間により、交点 始端の (Us, Vs, Ws)を算出するとともに、頂点 1の (UB1, VR1, WG1)、及び頂点 2の (U B2, V 2, WG2)に基づいて、直線補間により、交点終竭の (Ue, Ve, We)を算出する。 このことを、頂点間の Y座標が By≤Ayく Cyであり、描画 Y座標 Yrが Yl Yr≤Y2の範 囲である場合を例に挙げて説明する。そうすると、スライサ 118は、頂点 0の (UBO, VRO, WGO) = (Bu-Bw, BvBw, Bw)、及ぴ頂点 2の (UB2, VR2, WG2) = (Cu-Cw, CvC w, Cw)に基づ ヽて、纖補間により、交点始端の (Us, Vs, Ws)を算出するとともに、頂点 1の(UB1, VR1, WG1) = (Au-Aw, AvAw, Aw)、及び頂点 2の (UB2, V 2, WG2) = (Cu-Cw, CvCw, Cw)に基づいて、 I 補間により、交点終端の (Ue, Ve, We)を算 出する。
次に、スライサ 118は、 Δυ、 Δν、 AW及ぴ AXtを算出する。ここで、 Δυ、 Δν、 AWは, 描画 ¾· ^の水平ラインにおける ΔΧΐあたりの U座標 (=u'w)、 V座標(=vw)、パースぺク ティブコレクト用パラメータ W(=w)それぞれの変化量であり、 AXtは、描画^の水平ライ ンにおける 1ピクセルあたりの X座標の変化量である。 AXtは、「+ 1」または「一 1」のいずれ かとなる。
AU= (Ue-Us)/(Xe-Xs)
AV= (Ve -Vs) / (Xe— Xs)
AW= (We -Ws) / (Xe— Xs)
AXt= (Xe-Xs)/ I Xe— Xs |
スライサ 118は、デプスコンパレータ 112から受け取った構造 ί材ンスタンスと共に、算出
L cXs, Us, Vs, Ws, Xe, Δυ, AV, AW及ぴ厶 Xtを、ピクセルステッパ 120へ送出する c また、スライサ 118は、バーテックスソータ 114から受け取ったポリゴン Zスプライト共通デー タ CIが、次の描画サイクルでも使用される^^は、リサイクルバッファ 110に、デプスコンパ レータ 112から受け取った構造 ί材ンスタンスを書き込む。なお、ビデオタイミングジエネレ ータ 138からの垂直^^ゥント信号 VC及ぴポリゴンの頂 標から、次の描画サイクルで の使用の有無を知ることができる。
図 19は、スライサ 118によるスプライトに る処理の説明図である。図 19に示すように、 スライサ 118は、与えられたポリゴン Zスプライト共通データ CIにより定義されるスプライト (麵)と、描画 の水平ラインと、の交,鍵標 (Xs, Ys)及ぴ (Xe, Ye)を求める。ここで、 スプライトに対しては、先に描画される側の交点を始端 (Xs, Ys)とし、後に描画される側の 交点を終端 (Xe, Ye)とする。
スプライトの各頂点 0, 1, 2, 3を UV空間へ写像したときの座標は、(UB0, VRO) , (UB1, VR1) , (UB2, VR2) , (UB3, VR3)である。ここで、 UB3, VR3はスライサ 118に入力さ れなレ、が、それぞれ下記のようにスライサ 118内で求められる。
UB3=UB1
VR3=VR2
スライサ 118は、頂点 0の(UBO, V 0)及ぴ頂点 2の (UB2, VR2)に基づいて、麵補 間により、交点始端の UV座標 (Us, Vs)を算出するとともに、頂点 1の (UB1, VR1)及ぴ頂 点 3の (UB3, VR3)に基づいて、歸泉補間により、交点終端の UV座標 (Ue, Ve)を算出す る。
そして、スライサ 118は、 AUおよび AVを算出する。ここで、 Δυ、 Δνは、描画通の水 平ラインにおける AXsあたりの U座標、 V座標それぞれの変化量である。 AXsは、描画対 象の水平ラインにおける 1ピクセルあたりの 標の変化量である力 常に「1」となるので、 算出は行わない。
Δ U= (Ue— Us) / (Xe— Xs)
Δ V= (Ve— Vs) Z (Xe一 Xs)
AXs= (Xe-Xs)/ I Xe— Xs | =1
スライサ 118は、デプスコンパレータ 112から受け取った構造 f材ンスタンスと共に、算出 し;^ Xs, Us, Vs, Xe, Δυ, AV及び厶 Xsを、ピクセルステツパ 120へ送出する。また、スラ ィサ 118は、バーテックスエキスパンダ 116から受け取ったポリゴン Zスプライト共通データ
CIが、次の描画サイクルでも使用される齢は、リサイクルバッファ 110に、デブ コンパレ ータ 112から受け取った構造 ί材ンスタンスを書き込む。なお、ビデオタイミングジエネレー タ 138からの垂直走 ゥント信号 VC及ぴスプライトの 標から、次の描画サイクルで の使用の有無を知ることができる。
ここで、スライサ 118は、ポリゴン/スプライト共通データ CIのフィールド Fから、ポリゴンお よぴスプライトの別を認識でき、ポリゴン構造体インスタンスのメンバ Typeから、グーローシ エーデイング及びテクスチャマッピングの另 IJを認識できる。
図 12に戻って、ピクセルステツパ 120は、グーローシェーディングモードのポリゴンについ ては、スライサ 118から与えられたパラメータ (Xs, Rs, Gs, Bs, Xe, AR, A G, ΔΒ及ぴ AXg)から、描画文檢ピクセルの描画难標と RGB値を求め、(1— )値とともにピクセル ディザ 122に送出する。具体的には、ピクセルステツパ 120は、交点の始端 (描画開始端) X sの赤成分 Rsに、 1ピクセル当たりの赤成分の変化量 ΔΙを順^/口えていき、各ピクセルの 赤成分 RXを求める。この処理を、交点の終端 (描画終了端) Xeに到針るまで行う。緑成分 GX¾^青成分 BXについても同様である。また、交点の始端 Xsに AXsを順 卩えていき、 描画 j¾標 Xrを求める。なお、 X=0〜 I Xe-Xs |であり、 ある。
RX== AXg- AR-X+Rs
GX= AXg- AG-X+Gs
BX= AXg- AB-X+Bs
Xr= AXs-X+Xs
ピクセルステツパ 120は、求めた各ピクセルの RGB値 (RX, GX, BX)、並びに描画 Xl¾標 rを、(1— 幽ぴにデブス値 (Depth)とともに、ピクセルディザ 122に出力する。
また、ピクセルステツパ 120は、テクスチャマッピングモードのポリゴンにつ V、ては、スライ サ 118から与えられたパラメータ (Xs, Us, Vs, Ws, Xe, Δυ, AV, 1^ ら、 描画豫ピクセルを UV空間へ写像したときの座標' (U, V)を求める。具体的には、ピクセル ステツパ 120は、交点の始端 (描画開始端) Xsのパースペクティブコレクト用パラメータ Wsに-
1ピクセル当たりのパースペクティブコレクト用パラメータの変化量 AWを順 ¾fo¾えていき、 各ピクセルのパースペクティブコレクト用パラメータ WXを求める。この処理を、交点の終端 (描画終了端) Xeに到針るまで行う。なお、 X=0〜 I Xe— Xs |であり、 MfCある。
X= AXt- AW-X+Ws
ピクセルステッパ 120は、交点の始端 (描画開始端) Xsの U座標(-u'w)Usに、 1ピクセ ル当たりの U座標の変化量 ΔΙΤを順次加えていき、求めた値に WXの逆数を掛け合わせ、 各ピクセルの U座標 UXを求める。この処理を、交点の終端 (描画終了端) Xeに到 るま で行う。 V座標 (=vw)VXについても同様である。また、交点の始端 Xsに厶 Xsを順 口え ていき、描画 X¾t!Xrを求める。なお、 X=0〜 I Xe— Xs |であり、 ある。
Figure imgf000051_0001
VX= (AXt- AV-X+Vs)♦ (1/WX)
Xr= AXs-X+Xs
ピクセルステツパ 120は、求めた各ピクセルの UV座標 (UX, VX)並びに描画 X座標 ^Xrを, スライサ 118から受け取った構造インスタンス (テクスチャマッピングのポリゴン構造 ン スタンス及びテクスチャアトリビュート構造 #^ンスタンス)とともにテクセルマツパ 124に出力 する。
さらに、ピクセルステツパ 120は、スプライトについては、スライサ 118から与えられたスプ ライトのパラメータ (Xs, Us, Vs, Xe, Δυ, Δν及び AXs)から描画舰ピクセルを UV空 間へ写像したときの座標 (U, V)を求める。具体的には、ピクセルステツパ 120は、交点の始 端 (描画開始端) Xsの U座標 Usに、 1ピクセル当たりの U座標の変化量 AUを順 Pえてい き、各ピクセルの U座標 UXを求める。この処理を、交点の終端 (描画終了端) Xeに到針る まで行う。 V座標 VXにつ!/ヽ T¾同様である。また、交点の始¾¾に AXs、すなわち「1」を順 卩えていき、描画 標 Xrを求める。なお、 X=0〜 I Xe— Xs |であり、 Mr ある。 UX= AXs- AU-X+Us
VX= AXs- AV-X+Vs
Xr=X+Xs
ピクセルステッパ 120は、求めた各ピクセルの UV座標 (UX, VX)、並びに描画 X ^標 Xr を、スライサ 118から受け取った構造インスタンス (スプ イト構造 ンスタンス及びテク スチヤアトリビュート構造 H スタンス)とともにテクセルマツパ 124に出力する。
ピクセルディザ 122は、ピクセルステツパ 120力ち与えられた RGB値の小数部にノイズを 加え、マッハパンドを目立たなくするディザリングを実行する。なお、ピクセルディザ 122は、 ディザリング後のピクセルの RGB値を、 mx mxr, (ι— ά )値,及びデプス値とともに力 ラーブレンダ 132に出力する。
図 20は、ピクセルディザ 122によるディザリングの説明図である。図 20に示すように、ディ ザパターンは、 2 X 2の格子状のピクセルプロックを単位として RPU9の制御レジスタ(図示 せず)に設定される。描画ピクセルのスクリーン座標系 Υ座標の LSBの値によって、 4つの パターン「00」, 「01」, 「10」, 「11」のどれが適用される力が決定される。
各パターンは 2ビットの大きさで、 RGB値のそれぞれの小数部に加算される。加算の結果、 難部へのキャリー力 S発生する には、キャリーが難部に加算される。実際に表示色と して用レ、られる部分《RGB値の通部であるので、ディザパターンとして設定した値が全て 同じでない限り、色の境界部にノイズが 、マッハパンドを目立たなくする。
図 12に戻って、テクセルマツパ 124は、テクスチャアトリビュート構造体のメンバ Filterが 「0」を示してレヽる ^1こは座標 (UX, VX)の近傍 4つのテクセルデータを指し示す 4組のヮ 一ドアドレス WADとビットアドレス BADを、メンバ Filter力 「1」を示して 、る^ 1こは座標 (UX, VX)に最も近い 1つのテクセルデータを指し示す 1組のワードアドレス WADとビット アドレス BADを算出して出力する。また、メンバ Filterが「0」を示している^^には、パイリ ニァフィルタリングにおける各テクセルの係数部に相当するバイリニアフィルタパラメータ BF Pを算出して出力する。更に、シザリングイネ一プル時のスプライトと、シザリングディセーブ ル時のスプライトと、ポリゴンとで互!/、に るデフ。ス値 (メンバ Depth)の形式を統一して出 力する。
テクスチャキャッシュプロック 126は、テクセルマツパ 124から出力されたワードアドレス W AD、ビットアドレス BAD、構造 ί材ンスタンスのメンバ Tsegmentから、各テクセルのァドレ スを算出する。算出されたアドレスが指し示すテクセルデータが既にキャッシュに!^内され てレ、る齢、撫内されてレ、るテクセルデータ及びアトリビュート構造体のメンバ Paletteから、 カラーパレット RAMI 1のエントリを選択するインデックスを生成し、カラーパレット RAMI 1 に出力する。
一方、当該テクセルデータが、キャッシュに ¾内されていない場合は、テクスチャキヤッシ ュブロック 126は、メモリマネージャ 140に対して、テクセルデータの取 示を出す。メモリ マネージャ 140は、メイン RAM25から該当するテクスチャパターンデータを取得して、テク スチヤキャッシュプロック 126のキャッシュに H内する。また、メモリマネージャ 140は、マー ジソータ 106からの指示で、後段で必要になるテクスチャパターンデータを、外部メモリ 50 力ち取得して、メイン RAM25に觸内する。
この際、メモリマネージャ 140は、テクスチャマッピングモードのポリゴン用のテクスチャパ ターンデータについては、 1ポリゴンにマッピングされるデータ全体を一括して取得し、メイン RAM25に棚するのに対し、スプライト用のテクスチャパターンデータについては、 1スプ ライトにマッピングされるデータをライン単位で取得し、メイン RAM25に搬内する。これは、 描画 の水平ラインに^ ¾れるピクセル群を UV空間に写像すると、ポリゴンの は UV 空間中のあらゆる雌上に写像される可能性があるのに対し、スプライトの は u軸に平 行な smtにのみ写像される力もである。
本実施の形態では、テクスチャキャッシュブロック 126のキャッシュは、 64ビット X 4エントリ とし、プロック置換アルゴリズムは、 LRU (least recently used)とする。
カラーパレット RAMI 1は、テクスチャキャッシュプロック 126から入力されたテクセルデー タとメンバ Paletteとが連接されたインデックスが示すエントリに含まれる RGB做び半透明 合成のための(1— α )値を、バイリニアフィルタ 130に出力する。バイリニアフィルタノヽ。ラメ一 タ BFP、デプス値、及び描画 X座標 Xrについては、そのままパイリニアフィルタ 130に出力 される。
バイリニアフィルタ 130は、バイリニアフィルタリングを実行する。テクスチャマッピングにお いて、最も単純なピクセル描画色の算出方法は、 UV空間に写像されたピクセル座標 (UX,
VX)に最も近いテクセル座標に位 m~るテクセルのカラーデータを取得し、取辱したカラー' データ力 ピクセルの描画色を算出する方法である。この手法を「二アレストネィパ一」と呼 ぶ。
但し、隣り合うピクセルを UV空間に写像した際の 2点間の距离! ¾ 1テクセル分の り極 めて小さい場合、すなわち、スクリーン上でテクスチャが大きく拡大されてマッピングされる場 合には、二アレストネィパーではテクセルの:^が明瞭に表示されてしまうため、粗いモザィ ク状のテクスチャマッピングとなってしまう。このような問題^消する手法として、パイリニア フィルタリングを節する。
図 21は、パイリニアフィルタ 130によるパイリニアフィルタリングの説明図である。図 21に示 すように、パイリニアフィルタ 130は、 UV空間に写像されたピクセル座標 (UX, VX)の近傍 4テクセルの RGBiiS!Kl—ひ)値のカロ重平均を算出し、ピクセルの描画色を決定する。こ れにより、テクセルのカラーが滑らかに補完され、マッピング結果におけるテクセルの境界が 目立たなくなる。具体的には、バイリニアフィルタリングは次式 (パイリニアフィルタリングの 式)により節される。ただし、次式にぉレヽて、「u」は U座標 UXの小数部、「v」は V座標 VX の小数部、「nu」は(1— u)、「nv」は(1— v)、である。
R=R0-nu-nv+Rl -u-nv+R2-nu'v+R3-u'v
G=G0-nu-nv-t-Gl-u-nv+G2-nu-vH-G3-u-v
B=B0-nu-nv+Bl -u-nv+B2-nu-v+B3'U-v
Α=Α0·ηιι·ην+Α1 ·ιι·ην+Α2·ηιι·ν+Α3·ιι·ν
ここで、 R0, Rl, R2及ひ Ί 3は、それぞれ、上言 S4テクセル 0R値であり、 GO, Gl, G2及 び G3は、それぞれ、上 テクセルの G値であり、 BO, Bl, B2及ぴ B3は、それぞれ、上記 4テクセルの B値であり、 AO, Al, A2及び A3は、それぞれ、上曾 B4テクセルの(1— α )値 である。
バイリニアフィルタ 130は、算出したピクセルの RGB値並びに Α値 (つまり(1一 α )値)を、 デプス雜ぴに描画 i¾標 xとともに、力ラーブレンダ 132に出力する。
図 12を参照して、カラープレンダ 132の説明の前に、ラインバッファプロック 134について 説明する。ラインバッファプロック 134は、ラインバッファ LB1及ひ 1LB2^"み、一方のライン パッファが表示用に棚されているときは、 »のラインバッファカ描画用に使用され、表示 用と描画用とを交互に切り替えて使用するダブルバッファ方式を採用する。表示用に使用さ れて ヽるラインバッファ LB1ある ヽは LB2は、ビデオタイミングジェネレータ 138からの水平 走査カウント信号 HC及ぴ垂直走査カウント信号 VCに従って、ピクセルごとの RGB値を、ビ デォエンコーダ 136に出力する。
力ラーブレンダ 132は、半透明合成を箭する。具体的には、次の通りである。カラープレ ンダ 132は、ピクセルディザ 122あるいはパイリニアフィルタ 130から与えられたピクセルの RGBifi¾び (1— α Μ直と、描画 ¾ ^のラインバッファ LBの描画^ピクセル位置 (描画 標^ rが示すピクセル)に!^内されている RGB値とを用い、次式により、アルファブレンディン グを節し、結果を同じラインバッファ LBの描画舰ピクセル位置に書き込む。
Rb=Rf- (l- ar) +Rr
Gb=Gf- (l- ar) +Gr
Bb=Bf- (l- a r) +Br
b= ί· (1— ar + a r
ここで、「l—a r」は、ピクセルディザ 122あるいはバイリニアフィルタ 130から与えられた (1— a )値である。「Rr」、「Gr」及ぴ「Br」は、それぞれ、ピクセルディザ 122あるいはパイリ ニァフィルタ 130力ら与えられた RGB値である。「Rf J、「Gf」及び「Bf」は、それぞれ、描画 用に使用されて V、るラインバッファ LBの描画 ピクセル位動 取得し fcRGB値である。 一般的なアルファブレンデイングのアルゴリズムにおいては、上式の Rr, Gr,および Brの項 は、それぞれ Rr. ar、 Gr- a r,および Br' a rとなる力 本難の形態では、予め Rr. α τ, G r- α τ,および Br' a rの計算結果を Rr、 Gr、および Brとして用意しておくことによ''り、演算回 路の簡 ヒを行っている。 ビデオエンコーダ 136は、表示用に使用されているライ バッファ LB1あるいは LB2から 入力され RGB値と、ビデオタイミングジェネレータ 138から入力されたタイミング情報 (複 合同期信号 SYN、複合プランキング信号 BLK、パーストフラグ信号 BST、及びライン交番 信号 LA等)と、を信号 VSに対応したコンポジットビデオ信号を表すデータストリーム VDに 変換する。信号 VSは、テレビジョン; ¾¾(NTSCや PAL等)を指示する信号である。
ビデオタイミングジェネレータ 138は、入力されるクロックを基に、水平走^ゥント信号 H C及び垂直^^ゥント信号 VC、並びに、複合同期信号 SYN、複合プランキング信号 BLK、 バーストフラグ信号 BST、及ぴライン交番信号 LA等のタイミング信号を生成する。 ΤΚ平 カウント信号 HCは、システムクロックの 1周期毎にカウントアップされ、 1水平ラインのスキヤ ンが終了すると、リセットされる。また、垂直 ゥント信号 VCは、 1Z2水平ラインのスキヤ ンが終了するたぴにカウントアップされ、 1フレームあるレ、は 1フィールドのスキャンが終了す ると、垂直 ゥント信号 VCはリセットされる。
さて、次に、図 10の YSU19によるソート処理の詳細を図面を参照しながら説明する。上述 したように、 YSU19によるソート処理で採用するソート は、ヒープソートである。
上記のように、ポリゴン構造体配列のソート処理とスプライト構造体配列のソート処理とは別 個に行われる。しかし、それぞれにおいて、同じソート処理が節されるので、後述の図 22 及ぴ図 23において、配列おょぴその要素は、ポリゴン構造体配列のソート処理の ¾ ^には、 それぞれポリゴン構造体配列おょぴポリゴン構造^ンスタンスを指し、スプライト構造体配 列のソート処理の には、それぞれスプライト構造体配列およびスプライト構造 ί材ンスタ ンスを指す。
一般に、配列の要素は、値を代入するための、インデックスが付された変数 (Λ^)として 定義されたり、あるいは、インデックスが付された変数に代入された値そのものとして定義さ れたりする。本難の形態では、両者を区別する必要があるときは、変数 (A i物)としての 配列の要素を「要素」、その変数に Aされた値を「要素値」又は「要素の値」と呼ぶ。
図 22は、図 10の YSU19による配列 Aのヒープ構築後のヒープ構造を示す図 ある。図 2 2では、配列 Aの要素数を 10個とし、 Yソート前の要素 A[0]〜A[9]の要素値をそれぞれ要 素値 ev0〜ev9と表す。
図 22を参照して、本«の形態におけるヒープ構造は、二分木の構造を持ち、 1つの親に 対して 2つの子が接続される。但し、ヒープ構造の においては、子を 1つしか持たない親 が械する^^がある。親は子に対して高レ、順位を持つ力 2つの子の間の順位にっレ、て は、特にルールは定められていない。
ここで、順位とは、ソートルール 1〜4 (ノンインタレーススキャンの ^^はソートルール 1〜
3)で定められる構造 ンスタンス間 (ポリゴ^ «造体配列の Yソートの にはポリゴン構 造 ンスタンス間、スプライト構造体配列の Yソートの にはスプライト構造 f材ンスタン ス間)の優先順位を指す。つまり、順位とは、ソートルール 1〜4 (ノンインタレーススキャンの ^はソートルール ι〜3)で定められる要素値間 (ポリゴン構造体配列の γソートの^ こ はポリゴン構造体配列の要素値間、スプライト構造体配列の Yソートの場合にはスプライト構 造体配列の要素値間)の優先順位を指す。木構造の上位ほど順位が高いので、図 22の例 では、要素値 ev3が最も順位の高レヽ要素値である。
メイン RAM25へのヒープ構造の 内方法を説明する。一般的なヒープ構造の 、最も 順位の高い親の要素働 順に、メモリ上の配列の先頭から編内される。ヒープソートにお いては、ソート結果が 1つずつ確定するため、一般的には、メモリ領域を効率的に用いるた めに、順位が確定した要素値は、ヒープ構造の の子の要素値と A i替えられて格納さ れる。従って、最も順位の高い親の要素値は、配列の末尾に 内されて、ヒープ構^^ら切 り離される。これに対して、本 の形態では、一般的な酵とは逆の ll で、ヒープ構造を メモリ上の配列に搬内する。この点を、図 22のヒープ構造を例に挙げながら説明する。
図 23は、図 22のヒープ構造のメイン RAM25への辦内方法の説明図である。図 23 (a)及 ぴ図 22に示すように、本 の形態のヒープ構造においては、最も順位の高い親の要素値 力 順に、メイン RAM25上の配列 Aの末尾から 内される。そして、図 23(b)に示すように, 順位が確定し配列 Aの末 A[9]に權內された最も順位の高レ、親の要素値 ev3と、配列 Aの 先 HA[0]に鶴内されたヒープ構造の の子の要素値 ev5と、が λ^1 えられ、要素値 ev
3が鶴内きれた先頭の要素 A[0]は、ヒープ構 切り離される。理由は次の通りである。 ' 上記のように、 YSU19は、順位 (ソート結果)が 1つ確定する度にパルス信号 (ポリゴンの
^^パルス信号 PPL、スプライトの: ¾ ^パルス信号 SPL)の 1パルスを RPU9に出力する。 これらのパルス信号を受けて、 RPU9は、順位が確定した要素値、つまり、順位カ確定した 構造 ンスタンスを、配列の先頭から読み出して描画処理を行う。このため、一般的な順序 とは逆の )1酵で、ヒープ構造をメイン RAM25上の配列に搬内する。
配列の 1要素のサイズについて説明する。配列の 1要素のサイズは、ポリゴ »造体とスプ ライト構造体とで異なる。ポリゴン構造体の場合、配列の 1要素 (1個のポリゴン構造体インス タンス)は 16バイトで構成され、スプライト構造体の場合、 の 1要素 (1個のスプライト構造 f材ンスタンス)は 8バイトで構成される(図 13、図 15、及び図 16参照)。但し、ポリゴン構造
^ンスタンスとスプライト構造 ί材ンスタンスとは別々の配列に!^内されるため、メイン RA
Μ25上の同じ配列内に異なるサイズの要素が混在することはない。また、 YSU19は、ポリ ゴン構造体配列のソートとスプライ卜構造体配列のソー卜とを独立に行う。
次に、 YSU19によるポリゴン構造体配列の Υソート処理をフローチャートを用 、て説明す る。 YSU19によるスフ。ライト構造体配列の Υソート処理は、ポリゴン構造体配列の Υソート処 理と同様の流れで行われるので説明を省略する。
図 24は、図 10の YSU19によるポリゴ «造体配列の Υソート処理の全体的な流れの一例 を示すフローチャートである。なお、図 24及び後述の図 25〜図 27において、特に明示しな V、限り、配列とレヽうときは、ポリゴン構造体配列を指す。
図 24を参照して、ステップ S20にて、 YSU19は、配列のソートの開始前に、ソート舰と なる当廳己列の先頭アドレスを YSU19内の制御レジスタ「Polygon— Array— YSU— Bas e_AddressJ (図示せず)から取得し、 つ、当該配列の要素数「s」を YSU19内の制御レ ジスタ「Number一 of— Sorted一 PolygonsJ (図示せず)力も取得する。なお、図 22及ぴ図 23の例では、 s= 10である。 ' ちなみに、スプライト構造体配列のソートを行う齢には、当該スプライト構造体配列の先 頭アドレスを YSU19內の制御レジスタ「Sprite— Array一 YSU一 Base— AddressJ (図示 せず)力も取得し、かつ、当 プライト構造体配列の要素数「s#」を YSU19内の制御レジ スタ「Number— of— Sorted— Spritesj (図示せず)から取獨する。
次のステップ S21にて、 YSU19は、ヒープ構造を構築する (ヒープ構築処 S)。ヒープ構築 処理の詳細は後述する。この処理の完了後、配列全体がヒープ構造となり、それぞれの要素 の接続において、親の要素の順位が子の要素の順位より高いことが保証される。したがって. ヒープ構築処理後、最も順位の高い親、すなわち「根 (root)」の親の要素の順位は、配列の 全要素中で最も高レ、ことが確定する。
以降、 YSU19は、順位の高いものから要素が 1つ確定するたびに、「根」の親の要素の値 と、ヒープ構造の の子の要素の値と、を交換する (A L替える)。これは、順位の確定し た「根」の親の要素をヒープ構 ゝら切り離し、メイン RAM25上の配列の先頭から腿こ整列 させることを意味する。
従って、 YSU19は、ステップ S21の次のステップ S22にて、最も順位の高い要素として確 定した親の要素の値、つまり要素 [s—l]の値と、ヒープ構造の の子の要素の値、つまり 要素 [0]の値と、を交換するために、変数に「0」を設定し、続くステップ S23にて、要素 [0] の値と要素 [s— 1]の値とを交換する。つまり、要素 [0]の値を要素 [s— 1]へ、要素 [s— 1]の 値を要素 [0]へ、 ¾Aする。この交換後、要素 [0]はヒープ構 ら切り離される。なお、'図 2
2及び図 23の例では、要素 A[0]の値 ev5と要素 A[9]の値 ev3とが交換される。
ステップ S27の後のステップ S23においては、 YSU19は、その時のヒープ構造における 最も順位の高い要素として確定した親の要素の値、つまり要素 [s二 1]の値と、その時のヒー プ構造の末端の子の要素の値、つまりインクリメント後 (ステップ S25)の要素 [i]の値と、を交 換する。つまり、要素 [i]の値を要素 [s— 1]へ、要素 [s— 1]の値を要素 [i]へ、代入する。こ の交換後、要素 [i]はヒープ構 ら切り離される。
続くステップ S24にて、 YSU19は、 1個の要素の順位確定を通知すベぐパル 信号 PPL の 1パルスを RPU9に出力する。ちなみに、スプライト構造体配列のソートの ¾ ^には、ノル . ス信号 SPLの 1パルスを RPU9に出力する。次のステップ S25にて、 YSU19は、変数の値 をインクリメントする。従って、.変数は常にヒープ構造の を指し示すように設定される。こ れは、インクリメント前の要素 [i]がヒープ構 ら切り離され、インクリメント後の要素 [i]が新 たにヒープ構造の となったことを意味する。
ステップ S25で変数をインクリメントした後の値が「s— l」と同じ は、ソートが完了して いないヒープ構造に れる要素は、要素 [s—1]のみということになる。これは、全ての要 素値のソートが完了したことを意味する。従って、 YSU19は、ステップ S26にて、 i=s— 1と 判断したときは、ステップ S28に進んで、最後の要素値の順位確定を示すパルス信号 PPL (スプライトの場合はパルス信号 SPL)を 1パルス出力し、 Yソート処理を終了する。
一方、 YSU19は、ステップ S26にて、変数が「s— 1」と等しくなレ、と判断したときは、 Yソー ト処舰完了してレヽな 、ので、ステップ S27に進む。
この時点では、ステップ S23の交 »Mにより、ヒープ構造の の子の要素の値が「根」 の親の位置に櫞内されているため、ヒープ構造は崩れている。この状態からヒープ構造を再 構築するために、ステップ S27にて、 YSU19は、「ダウンヒープ処理」を行う。ここでは、「根」 の親から順に、いずれかの子の要素の順位が親の要素より高い ¾^に、子の要素の値と親 の要素の値とを A i替え、 Λ ^替えた後の子の要素を新たな親の要素として、同じ処理をヒ ープ構造の «まで行う処理を「ダウンヒープ処理」と呼 る。ダウンヒープ処理の詳細は 後述する 0 "
ステップ S27では、要素 [s—1]を処理開始時の親とし、「s— i」をヒープ構造の要素数とす るダウンヒープ処理を行う。ダウンヒープ処理完了に伴い、ヒープ構造が蒲築される。した がって、ステップ S27終了後の「根」の親は、その時点のヒープ構造で最も高い順位であるこ とが確定する。その後、ステップ S23に戻って、ソート処 継铳される。
図 25は、図 24のステップ S21のヒープ構築処理の流れの一例を示すフローチ ートであ る。図 25を参照して、ステップ S40にて、 YSU19は、変数 jに「0」を設定する。変 ¾jは、ダウ ンヒープ処理における最初の子の要素を指し示 のであり、初期状態では、ヒープ構造全 体の の要素、すなわち要素 [0]を指し示す。
ステップ S41にて、 YSU19は、要素 [j]の親の要素 [P]を特定する。親の要素 [P]のィ ンデックス「p」は、以下の計算式により算出される。次式において、「s」はヒープ構造全体の 要素 i eある。但し、右辺の隨の商は常に »e得られるものとし、剰余は切り捨てる。 p=s— (s— j)/2
ステップ S42にて、 YSU19は、ステップ S41で特定した親の要素 [p]を親とし、「sjをヒー プ構造全体の要素数とするダウンヒープ処理を行う。ダウンヒープ処理の詳細は後财る。 ステップ S42のダウンヒープ処酷了後、ステップ S43にて、 YSU19は、変数 jの値をイン クリメントする。そして、ステップ S44にて、 YSU19は、インクリメント後の変数; jの値が「s— 1」 より小さければ、ステップ S41へ戻る。一方、インクリメント後の変数 jの値が「s—l」に等しけ れば、 YSU19は、ヒープ構築処理を終了し、図 24のステップ S22に進む。
図 26は、ダウンヒープ処理の流れの一例を示すフローチャートである。このダウンヒープ処 理は、図 24のステップ S27及ぴ図 25のステップ S42にお 、て節される。
図 26を参照して、ステップ S60にて、 YSU19は、親の要素のインデックスと、 ¾ ^となるヒ ープ構造の要素数とから、親に ¾ ^る子の個数がいくつであるかを特定する。 YSU19は、 親の要素のインデックスを「pjとし、 となるヒープ構造の要素数を「sjとしたときに、 2(s- p)の値が「s」より小さい ¾ ^には子の個動 ¾個、「s」と同 C ^には子の個 c^i個、「s」よ り大き 、 には子の個 個であるとする。
ステップ S61において、 YSU19は、子の個数が「0」と判定すると、ダウンヒープ処理を終 了する。また、ステップ S62にて、 YSU19は、子の個 ¾^「1」と判定すると、ステップ S63に 進んで、その 1つの子を親との比較^として設定し、ステップ S66に進む。一方、ステップ S62にて、 YSU19は、子の個 ¾^「1」でない、つまり、「2」と判定すると、ステップ S64に進 む。 ,
ステップ S64では、 YSU19は、子の個数が「2」であるので、どちらの子がより順位が高レヽ 力を判定するために、順位比較処理を行う。順位比較処琿の詳細は後述する。そして、ステ . ップ S65にて、 YSU19は、順位比較処理の結果、順位の高い方の子を親との比 ^とし 定し、ステップ S66に進む。
ステップ S63の後あるいはステップ S65の後のステップ S66では、 YSU19は、比較纖 に設定された子の要素と、親の要素との順位比較処理を行う。比較処理の結果、ステップ S6 7にて、 YSU19が親の順位が高いと判定した:^、そこでダウンヒープ処理は終了する。一 方、子の順位が高いと判定した 、ステップ S68にて、 YSU19は、比^^の子の要素 の値と、親の要素の値とを交換する。交換後、ステップ S69にて、 YSU19は、値が交換され た子の要素 (つまり、交換前の親の要素の値を鶴内している要素)を、新たな親として設定し、 ステップ S60に戻る。
図 27は、順位比較処理の流れの一例を示すフローチャートである。この順位比較処理は、 図 26のステップ S64及び S66において節される。順位比較処理では、ソートルール 1〜4 (ノンインタレーススキャンの:^はソートルール 1〜3)に基づいて、 2つのポリゴン構造 ί材 ンスタンス間で順位を比較する。つまり、順位比較処理では、ソートルール 1〜4 (ノンインタ レーススキャンの^ 1まソートルール:!〜 3)に基づ 、て、配列の 2つの要素間で順位を比較 する。ここで、比^^の 2つの要素 (ポリゴン構造 ンスタンス)をそれぞれ要素「Α」及び 「Β」と表記する。
ステップ S80にて、 YSU19は、要素「Α」及び「Β」ごとに、最小 Υ座標と描画先頭ライン (描 画上端ライン)の Υ座標と、を比較する。この例では、比^^の要素「Α」及び「Β」は、ポリ ゴン構造 ί材ンスタンスであるので、メンバ Ay, By及ぴ Cy (図 13及ぴ図 15参照)のうち最も 小さな値が、最小 Y座標として扱われる。ちなみに、比 豫の要素「A」及び「B」が、スプラ イト構造 frl スタンスである 、シザリングイネーブル時はメンバ Ayの値 +256が、シザ リングディセーブル時はメンバ Ayの値そのもの力 最小 Y座標として扱われる(図 16参照)。 ステップ S81にて、 YSU19は、要素「A」の最小 Y座標のみが、描画先頭ラインめ Y座標以 下であると判断した^、すなわち、要素「A」に基づくポリゴンのみが、描画先翁ラインと交 わるか、あるいは、描画先頭ラインより上にあると判断した^、ステップ S82に進み、要素 「A」の嫩が高!/、と判定し、順位比較処理を終了する (ソートルール 1)。
ステップ S83にて、 YSU19は、要素「B」の最小 Y座標のみ力 描画先頭ラインの Y座標以 下であると判断した:^、すなわち、要素「B」に基づくポリゴンのみ力 描画先頭ラインと交 わるか、あるレ、は、描画先頭ラインより上にあると判断した^^、ステップ S84に進み、要素 「B」の順位が高、と判定し、順位比較処理を終了する (ソートルール 1)。
要素「A」及ぴ「B」の双方の最小 Y座標が、描画先頭ラインの Y座標以下である:^は、要 素「AJ及ぴ「BJのそれぞれに基づくポリゴンが、描画先頭ラインと交わる力 \あるいは、描画 先頭ラインより上にあることを意味する。要素「A」及ぴ「BJの双方の最小 Y座標が描画先頭 ラインより上にある 、要素「A」及び「B」に基づくポリゴンは、スクリーンに描画されないた め、ソートルール 1によって判定される順位は描画結果に影響を与えない。この点、スプライ トについても同様である。
従って、ステップ S85にて、 YSU19は、要素「A」及び「B」の双方の最小 Y座標が描画先 頭ラインの Y座標以下であると判断した^、つまり、要素「A」及び「B」に基づく双方のポリ ゴンが、描画先頭ラインと交わっていると判断した ¾^、ステップ S86に進んで、要素「A」及 ぴ「B」間の順位を、最小 Y座標の比較でなぐデプス値の比較により定める(ソートルール 3)。
この 、ポリゴン構造体にメンバ Depthがあり(図 13及ぴ図 15参照)、この値の大小によ り順位が判定される。スプライトの も同様であり、スプライト構造体のメンバ Depthの値の 大小により順位が判定される(図 16参照)。メンバ Depthのビット数は、ポリゴン構造体と、シ ザリングイネーブル時のスプライト構造体と、シザリングディセーブル時のスフ。ライト構造体と、 で異なるカ、 YSU19が比較するのは、同一フォーマットの構造 fr Vスタンス同士であるた め、単純にメンバ Depthの値を比較するだけで大 /J IJ定を行うことができる。
ステップ S86に^ <ステップ S87にて、 YSU19は、デプス値の比較の結果、要素「A」のデ プス値が、要素「B」のデプス値以上であると判断した^ \ステップ S88に進んで、要素 「AJの順位が高いと判定し、順位比較処理を終了する。一方、 YSU19は、デプス値の比較. の結果、'要素「A」のデプス値が、要素「B」のデプス値より小さいと判断した場合、 テップ S 89に進んで、要素「B」の順位が高いと判定し、順位比 »理を終了する。
一方、ステップ S85において、 YSU19は、要素「A」及び「B」の双方の最小 Y座標が、描 画先頭ラインの Y座標より大き!/、と判定した 、ステップ S90に進んで、 の最小 Y座標 同士を比較する。但し、インタレーススキャンモードでの順位比較処理においては、描画対 象となるフィールドのライン上にある最小 Y座標の値と、その 1つ前のフィールドのライン上に ある、 1つ小さい最小 Y座標の値と、が同じであるとして、比較を行う (ソートルール 4)。一方、 ノンインタレーススキャンモードでの順位比較処理にぉ 、ては、単純に最 /J、Y座標の大 /J、が 比較される。
そして、ステップ S91にて、 YSU19は、要素「A」及び「B」の双方の最小 Y座標が同じであ ると判定した:^、ステップ S86に進んで、デプス値の比較により、要素「A」及び「B」の順位 を判定する(ソートルール 2)。一方、ステップ S91にて、 YSU19が、要素「A」及ぴ「B」の最 小 Y座標が ¾ると判定した:^、ステップ S92に進む。
ステップ S92では、 YSU19は、要素「A」の最小 Y座標が、要素「B」の最小 Y座標より小さ レ、と判断した齢、ステップ S93に進んで、要素「A」の順位が高いと判定して、順位比較処 理を終了する (ソートルール 1)。一方、 YSU19は、要素「A」の最小 Y座標が、要素「B」の最 小 Y座標以上であると判断した^ \ステップ S94に進んで、要素「B」の順位が高いと判定 して、順位比較処理を終了する (ソートルール 1)。
なお、図 24〜図 27にお!/、て、ポリゴン構造体配列の Yソート処理を例に挙げて説明したが、 同様の処理が、スフ。ライト構造体配列の Yソート処理でも行われる。
さて、以上のように、本難の形態によれば、グラフィック要素 (ポリゴン、スプライト)の最小
Y座標が、昇順 (小から大の順)で並ぶように、つまり、グラフィック要素の出稱貭で、グラフィ ック要素ごとの構造 ί材ンスタンスを並べ替えている (ソート)。また、 1度描画で角いられた 構造 ンスタンスは、リサイクルバッファに 内され、描画通ラインの Υ座標 当該構造 ^ンスタンスの最大 Y座標 (ポリゴンにつ ヽては 3頂点の Υ座標のうち最も大きレヽ Υ座標、ス プライ Μこつ ヽては 4頂点の Υ座標のうち最も大きレヽ Υ座標)を超えるまで再利用される。 従って、ソート後の構造体インスタンスを順番に読み出して、描画処理を行うだけでよいた め、描画のたびに、全ての構造 ンスタンスの中から、そのとき描画すべき構造 ンスタ ンスを検索する処舰 S不要になり、処理を高速化できる。以上の結果、 1フレーム以上のィメ ージを格納するための大容量のバッファ (フレームバッファ等)を実装する必要は必ずしもな ぐより容量の小さいパッファ (ラインバッファや、 1ラインに満たないピクセルを描画するピク セルバッファ等)を実装した^ eあっても、多くのグラフィック要素を組み合わせた三次元 イメージの表示が可能になる。
一般的な技術により、ラインバッファある 、はピクセルバッファに描画を行おうとすると、 1ラ インごとあるいは所 のピクセルごとに、全構造 ンスタンスの中から、描画 の構造 f材ンスタンスを検索しなければならないが、本実施の形態では、 YSU19により、予め、最 小 Υ座標の昇順で (つまりグラフィック要素の出 |¾噴で)ソートが行われて!/ヽるため、そのよう な検索処理が不要になる。また、そのような検索処理を行っていたのでは、多くのグラフイツ ク要素を組み合わせた三次元イメージの表示が困難になる。ちなみに、フレームバッファを 実装するときは、 1フレーム分のイメージを H内できるので、そもそも、そのような検索処理は 不要で、デプス値の大きレ、もの力ち順に描 s 、けばよレ、。
また、本 の形態によれば、ラインバッファ LB1あるいは LB2への新たなピクセル情報 の書き込み (新たなピクセルの描歸のために、構造体インスタンスが再利用可能な ¾ ^は、 その構造体インスタンスは、リサイクルバッファ 110に格納される。このため、同じ構造体イン スタンスを棚する新たなピクセルの描画のたびに、ソート後の全ての構造 ンスタンスが ¾内されたメイン RAM25から、その同じ構造体インスタンスを繰り返し読み出す処理が不要 になって、より処理の高速化を図ることができる。
また、デプスコンパレータ 112を設けて、 YSU19が並べ替えた順番で新たに読み出され た構造 ンスタンスと、再利用のためのリサイクルパッファ 110に樹内された構造 ί材ンス タンスと、の描画順序 (つまり、これら構造 ί材ンスタンスに基づくピクセルの描画順序)を判 定している。このため、判^!了後に、再利用可能な構造 #^ンスタンスをリサイク/レバッフ ァ 110に送って順番に;^!内するだけで、リサイクルバッファ noには、再利用可能な構造体 インスタンスについて、適切な描画順序で (つまり、デプス値が大きいものが先頭に来る順 で)構造 # ^ンスタンスが総内される。このように、リサイクルバッファ 110には、再利用可能 な構造 ί材ンスタンスについて適切な描画順序で編内されているところ、これらは、 YSU19 が並べ替えた順番で新たに読み出された構造 ンスタンスとの間で、さらに描画 I酵が判 定されるので、常に適切な描画順序での (つまり、デプス値が大きいもの順での)描画が可 能となる。
さらに、本雄の形態によれば、複数のグラフィック要素を表示する ¾^であって、その複 数のグラフィック要素の最小 Υ座標が同 ¾^、ソートルール 2力 S適用され、スクリーンを構成 する各ラインにぉレヽて、デプス値の降順 ( zJ、の jig)で構造 ンスタンスが並べられる c 従って、各ラインにおいて、構造体インスタンスに基づくグラフィック要素は、デブス値の大き いもの順で描画される。
ここで、構造 ンスタンスを最小 Y座標の小さ 、もの順でソートし (ソートルール 1)、最小 Y座標の同じものにっ 、てはデプス値の大きいもの順でソートする ¾ ^(ソートルール 2)、 つまり、ソートルール 1及び 2のみでは、表示先頭ラインの描画においては、必ずしもデプス 値の大きレ、もの順での描画が保証されなレ、。
しかし、本実施の形態では、複数のグラフィック要素力 スクリーンの先頭ラインに表示す べきピクセル^"む 、ソートルール 3が適用され、それらの最小 Y座標に関係なぐつま り、それらの最小 Y座標を同一とみなして、デプス値の降順で構造 ί材ンスタンスが並べられ る。従って、先頭ラインにおいても、構造 ί材ンスタンスに基づくグラフィック要素は、デプス 値の大きレ、もの順で描画される。
以上の結果、 インにおいて、グラフィック要素は、必ずデプス値が大きいもめ順で描画 されるので、半透明合成 ¾ 切に行うことができる。何故ならば、半透明のダラライツク要素 の描画色は、当該グラフィック要素の奥にあるグラフィック要素の描画色に依存するため、グ ラフィック要素を奥から順に描画する必要がある。
さらに、本雄の形態によれば、プリフェッチバッファ 108が設けられ、このプリフェッチパ ッファ 108は、 YSU19がソートした順番での構造 f材ンスタンスの入力タイミングとデブスコ ンパレータ 112への構造 ί材ンスタンスの出力タイミングとの緩衝機構である。これにより、 Υ SU19がソートした順番での構造 ンスタンスの入力の、 RPU9にとつての待ち時間を削 減できる。
さらに、本実施の形態によれば、ラインバッファ LB1, LB2を実装しているので、フレーム バッファを使用する よりもコストを低く抑えることができるし、また、 1ラインのピクセル数 に満たない数のピクセルデータを觸内するピクセルバッファを使用する よりも簡素な回 路構成で (簡戦制御で)描画を類できる。
さらに、本»の形態によれば、ポリゴ^造インスタンスと、スプライト構造 ンスタン スと、で別個にソートを行っているので、ポリゴン構造インスタンスと、スプライト構造 # ^ン スタンスと、の形 ¾¾ぴサイズが異なっている^^でも容易にソートが可能であり、構造 ンスタンスを鶴内するためのメモリ領域の 効^ ¾高まる。
このように、ポリゴ «造{材ンスタンス及ぴスプライト構造 ンスタンスが独立してソート された齢であっても、マージソータ 106を設けることで、描画処理の前にポリゴン構造 ンスタンス群とスプライト構造 ί材ンスタンス群がマージソートされるため、適切な描画処¾^ 可能となる。
さらに、本実施の形態によれば、ノンインタレーススキャンのみならず、インタレーススキヤ ンにも対応して!/ヽる。具体的には次の通りである。
インタレーススキャンによってイメージが表示される場合、最小 Υ座標が飛び越し走査によ り飛び越されたラインを示す構造 #H スタンスと、最小 Υ座標が描画贿のラインを示す構 造 f材ンスタンスとが、表示像ラインの描画処理において共に読み出される。しナこがって、 これらの構造 ί材ンスタンスの示す最小 Υ座標を同じ値とみなし、デプス値の大きいもの順 にソートを行うことにより、インタレーススキャンの^でもデプス値の大き 、もの順での描画 処舰保証される。そこで、奇 ifc ィールド表示のときと «7ィールド表示のときとで ¾る ソートを行うソートルール 4を設けて、る。
以上の結果、ノンインタレーススキャンのみならず、インタレーススキャンによる表示を行う 齢にぉレヽても、デプス値の大き!/、ものから描画されるので、適切な半透明合成を実現でき る。
さらに、本難の形態によれば、 YSU19は、ソートにおいて順位の高いものから構造 ンスタンス力 S1つ確定するたぴに、その都度、パルス PPL, SPLを、 RPU9に出力する。この ため、 YSU9は、全構造 ンスタンスのソートの完了を待つことなぐ逐次、構造^ンスタ ンスを読み込むことができる。さらに、表示中のフィールドに ¾-Τる各構造^ (インスタンスの ソートを、直前の垂直プランキング期間ある V、は当該フィールド表示中に^1開始すること により、ソート前の演算のために余裕を ί^ たより十分な時間を確保できる。
特に、上述のモード 2においては、垂直プランキング期間の開始直後にソートを実行して いるので、ソート前の演算のために余裕を持ったより十分な時間を確保できる(図 9 (a)参 照)。
さらに、本実施の形態によれば、 YSU19が実装するソート技法は、ヒープソートであるた め、構造 ΐ材ンスタンスのソート結果が 1つずつ確定され、ソート結果の確定のたびに、ノヽ。ル ス PPL, SPLを出力する機構を容易に できる。また、全構造^ンスタンスのソートに必 要な時間のパラツキを少なくできる。
さらに、本 の形態によれば、ソートルール 1〜4にお ヽて、纖の座標を最小 Y座標と している。このため、全てのグラフィック要素に対して同じ条件でソートができるので、正しい 描画順序で描画を行うことができる。
なお、本発明は、上記の難の形態に限られるものではなぐその要旨を舰しない範囲 で種々の纖において することが可能であり、例えば、以下のような変开 能である。
(1)上記では、カラープレンダ 132による半透明合成を行って 、るため、各ラインにぉレ、て、 グラフィック要素 (ポリゴン、スフ。ライト)は、デプス値が大きいものから先に描画した。しかし、 半透明合成を行わない は、デプス値が小さいものから描画することが好ましい。なぜな' ら、デプス値が小さい、より手前に表示されるべきグラフィック要素から先に描画することによ り、描画能力や 1ラインに描画するグラフィック要素の数が多すぎる等の理由により、仮に、 1 ラインに描画すべき全てのグラフィック要素の描画が、表示までに間に合わなかった齢で も、デプス値が大きい、より奥に表示されるべきグラフィック要素から先に描画する と比 較して、表示後の見た目の印象が良くなる力 である。また、デプス値が小さいグラフィック 要素から描画することにより、より奥に表示されるべきグラフィック要素については、既に描画 されたグラフィック要素と重なる部分については、描画が不要であるため、処理の高速ィ匕を 図ることができるカゝらである。
(2)上記では、描画のため、スクリーンの 1ライン分のデータを搬内可能なラインバッファ L Bl, LB2を RPU9内に設けた。ただし、 1ライン分より少ないピクセル数分のデータを格納 する 2つのピクセルバッファを RPU9内に設けることもできる。また、 K(Kは 2以上の難)ラ イン分のデータを編内可能な 2つのバッファを RPU9内に設けることもできる。
(3)上記では、 RPU9にお V、て、ダブルバッファ; ¾を採用したが、シングルバッファ方式 を採用することもできるし、 3以上のバッファを使用する; 採用することもできる。
(4)上記では、プリフェッチバッファ 108の記憶容量とリサイクルバッファ 110の記憶容量と を同一にする例を挙げたが、 らせることもできる。
(5)上記では、 YSU19は、 1つのポリゴン構造体インスタンスのソートが確定するたびに、 ノヽ。ルス PPLを出力した力 所 のポリゴン構造 ί材ンスタンスのソートが確定するたぴに、 パルス PPLを出力することもできる。ノ、。ルス SPLにつレヽても同様である。
(6)上記では、テクスチャデータの色の指定に、カラーパレットを用いる間接指定^:を採 用したが、各テクセルの色を直 定する直接指定^を採用することもできる。
以上、本発明を»例により詳細に説明したが、当難にとっては、本発明が本願中に説 明した 例に限定されるものではなレ、と!/、うことは明ら力である。本発明は、請求の範囲の 記載により る本発明の趣旨及び範囲を舰することなく修正及ぴ変更鎌として^ Sす ることが きる。従って、本願の記載は、例示説明を目的とするものであり、本発明に対して 何ら制限的な意味を有するものではな!/、。

Claims

請求の範囲
1.それぞれが複数のピクセルから構成される TOな複数のラインを、そのラインに垂直な 方向に並べて構成されるスクリーンに、多角形状のグラフィック要素 ¾ ^むグラフィック要素 ごとの表示情報に基づ、て、嫌己グラフィック要素の組み合わせから.なるスクリーンイメージ を表示するための描画を行う描画装置であって、
嫌己表示情報に含まれる、 ΙΐΠ己グラフィック要素の嫌己ラインに垂直な方向の位置を示す 座標力 昇順あるいは降順のいずれかで並ぶように、嫌己グラフィック要素ごとの lift己表示 情報を並べ替えるソート手段と、
it己ソート手段が並べ替えた前記表示情報を順番に読み出して、読み出した tiff己表示情 報に基づいて、対応する tiriBグラフィック要素の描画を節する描画手段と、を備える描画 装氍
2.廳碰画手段は、
肅 クリーンを構成する歸己ピクセルのうち第 1の所微分のピクセル情報を櫞内可能 であって、辦内した歸己ピクセル情報を嫌 クリーンイメージを表示するために出力し、出 力した嫌己ピクセル情報が櫞内されて 、た位置に、 tS クリーンイメージを表示するため の新たなピクセル情報を m内する第 1バッファと、
第 2の所; »分の歸己グラフィック要素の ΐΐίΙΒ表示情報を鶴内可能であって、 it己表示情 報に基づく觸己ピクセル情報が膽己第 1バッファに櫞内された後に、当該表示情報に基づく 他のピクセル情報を ΐΐΠΒ第 1バッファに搬内するために、当該表示情報が再利用可能なとき に、再利用のために送られてくる順番で、当該表示情報を 内し、歸己第 1バッファが歸己 新たなピクセル情報を!^内する期間が到来したときに、^!内した順番で ItilB表示情報を出 力する第 2バッファと、
肅己ソート手段が並べ替えた順番で読み出された嫌己表示情報のうち、嫌己第 1バッファ に格納すべき期間が到来した前言 aifたなピクセル情報を生成するための ¾ίίΙ己表示情報に れる表示深度情報と、肅己第 2バッファから出力される嫌己表示情報に れる表示深 度情報ど、を比較し、予め定められた細 ¾ て、いずれかの嫌己表示'隨 ¾1択して先 に出力する比較手段と、 .
謝己比較手段から出力された嫌己表示情報に基づレ、て辦己ピクセル情報を生成し、嫌己 生成したピクセル†f¾を嫌 Bifたなピクセル情報として ΙίίΙΕ第 1パッファに書き込む書き込 み手段と、 む請求項 1記載の描画装氍
3.複数の グラフィック要素を表示する であって、その複数のグラフィック要素の前 言 標が同じ^ \觸 a —ト手段は、その複数のグラフィック要素に対しては、嫌己表示情 報に含まれる表示渡情報が示す表示深度の昇順あるレ、は降順のレ、ずれかで嫌己表示情 報を並べる、請求項 1記載の描画装氍
4.複数の膽己グラフィック要素が、嫌 クリーンの先頭ラインに表示すべきピクセル む場合、 if己ソート手段は、その複数のグラフィック要素に対しては、前言 標の大小に関 係なぐ維己表示深度の昇順あるいは陶噴のいずれかで IH表示隋報を並べる、請求項 3 記載の描画装
5.それぞれが複数のピクセルから構成される平行な複数のラインを、そのラインに垂直な 方向に並べて構成されるスクリーンに、多角形状のグラフィック要素 むグラフィック要素 ごとの表示情報に基づレヽて、インタレーススキャンにより嫌己グラフィック要素の組み合わせ 力 なるスクリーンイメージ ¾Γ¾示するための描画を行う描画装置であって、
偶数フィールドを表示するために、觸己グラフィック要素ごとの表示情報を、第 1の纖 Uに 従って並べ替え、力つ、奇 Ifc ィールドを表示するために、鍵己グラフィック要素ごとの表示 情報を、第 2の删に従って並べ替えるソート手段と、
鍵己奇 ifcィールドを表示する場合、その表示のために前 la —ト手段が並べ替えた前記 表示情報を順番に読み出して、読み出した前記表示情報に基づいて、対応する tin己グラフ イツク要素の描画を 亍し、かつ、 tin己偶 ¾ィールドを表示する 、その表示のために tin己ソート手段が並べ替えた tin己表示情報を順番に読み出して、読み出した 己表示情報 に基づいて、対応する廳己グラフィック要素の描画を^ fる描画手段と、を備え、
tiilB第 iの細【jは、嫌己表示情報に含まれる、肅己グラフィック要素の嫌己ラインに垂直な 方向の位置を示す座標が、昇順あるいは降順のいずれかで並ぶように、 tiiiaグラフィック要 素ごとの rf己表示情報を並べ替える際に、 tirlBffi標が、スキャンする^^イン又はその 1 つ前の インを示す觸己グラフィック要素にっレ、ては、当該グラフィック要素の維酸標 が同一であるとして、肅己表示情報に含まれる表示深度情報が示す表示深度の昇順ある 、 は降順の!/、ずれかで嫌己表示情報を並べることであり、
鍵己第 2の纖 IJは、嫌己表示'赚に含まれる、膽己グラフィック要素の嫌 標が、昇順あ る 、は降順の!/、ずれかで並ぶように、嫌己グラフィック要素ごとの鍵己表示情報を並べ替え る際に、嫌 標が、スキャンする « ^イン又はその 1つ前の奇 インを示す ttrtaグラフ イツク要素については、歸 em標が同一であるとして、搬己表示情報に含まれる表示深度情 報が示す表示鍵の昇順ある!/、は降順のレ、ずれかで歸己表示情報を並べることである、描 画装氍
6.肅己描画手段は、
廳 クリーンを構成する ΙίίΙΕピクセルのうち第 1の所定数分のピクセル情報を!^内可能 であって、搬内した前記ピクセル情報を前 クリーンイメージを表示するために出力し、出 力した rt己ピクセル情報が!^内されて 、た位置に、 ItifB クリーンイメージを表示するため の新たなピクセル情報を觸内する第 1パッファと、
第 2の所纖分の觸己グラフィック要素の嫌己表示情報が欄可能であって、 tiriB表示情 報に基づく爾己ピクセル情報が嫌己第 1パッファに櫞内された後に、当該表示情報に基づく 他のピクセル情報を廳己第 1バッファに櫞内するために、当該表示情報が再利用可能なとき に、再利用のために送られてくる順番で、当該表示情報を格納し、嫌己第 1バッファが膽己 新たなピクセル情報を格納する期間が到来したときに、 内した順番で維己表示情報を出 力する第 2バッファと、
己 «7ィールドを表示する場合、その表示のために前 fa —ト手段が並べ眷ぇた順番 で読み出された嫌己表示情報のうち、鍵己第 1バッファに觸内すべき期間が到来した liffB f . たなピクセル情報を生成するための l己表示情報に含まれる tfit己表示深度情報と、 己第
2バッファから出力される tins表示情報に含まれる嫌己表示深度情報と、を比較し、予め定 められた纖 IJに従って、いずれかの嫌己表示情報 ¾1択して先に出力し、嫌己偶数フィー ルドを表示する^、その表示のために前記ソート手段が並べ替えた順番で読み出された 廳己表示情報のうち、膽己第 1バッファに搬内すべき期間が到来した嫌 aifたなピクセル情 報を生成するための ΐίΠΒ表示情報に れる na表示深度情報と、觸己第 2バッファから出 力される t&IB表示情報に含まれる嫌己表示深度情報と、を比較し、前記予め定められた規 搬こ従って、 V、ずれかの鍵己表示情報 択して先に出力する比較手段と、
嫌己比較手段から出力された嫌己表示情報に基づレ、て謝己ピクセル情報を生成し、 tiff己 生成したピクセル情報を肅 B たなピクセル情報として歸己第 1パッファに書き込む書き込 み手段と、 ¾ ^む請求項 5記載の描画装 ft
7.複数の tirt己グラフィック要素が、 ΐίΠΒ クリーンの先頭ラインに表示すべきピクセル む齢、肅 B —ト手段は、觸己第 1の細 ϋ及ぴ廳己第 2の細 用せず、その複数のグ ラフィック要素に対しては、 ΙίίΙΒ表示深度の昇順ある!、は降順のレ、ずれかで觸己表示情報 を並べる、請求項 5記載の描画装氍
8. it己ソート手段は、所定数分の歸己グラフィック要素の tiff己表示情報の並べ替えが完 了するたぴに、その旨を tiriE描画手段に通知し、
觸己描画手段は、膽己ソート手戯 の肅己通知を受けて、並べ替えが完了した嫌己表示 情報を順次読み出す、請求項 1記載の描画装氍
9. it己ソート手段は、所 分の ft己グラフィック要素の廳己表示情報の並べ替えが完 了するたびに、その旨を ffrM画手段に通知し、かつ、嫌己奇 ¾7ィールドを表示するため の藤己並べ替えを、当該奇数フィールドを表示する直前の垂直ブランキング期間の開始直 後に実行開始し、前記偶数フィールドを表示するための前言 ベ替えを、当該偶数フィール ドを表示する直前の垂直プランキング期間の開始直後に実行開始する、請求項 5記載の描 画装氍
10.廳所 分の ίίίΙΒグラフィック要素の嫌己表示議ま、 1つ分の rfEグラフィック要 素の肅己表示情報である、請求項 8記載の描画装氍
11.嫌己描画手段は、
第 3の所定数分の嫌己グラフィック要素の前記表示情報を格納可能であって、 Itrt己ソート 手段が並べ替えた順番で読み出される鍵己表示情報を、読み出された順番で^!内し、 m 第 1バッファに!^内すべき期間が到来した前 IBffたなピクセル情報を生成するための前記 表示情報を漏された順番で出力する第 3バッファをさらに含み、
請己比較手段は、膽己第 3バッファから出力される嫌己表示情報に含まれる表示深度情報 と、再利用のために送られてきた順番で 内された嫌己第 2バッファから出力される嫌己表 示情報に含まれる表示渡'隱と、を比較し、嫌己予め定められた細 IJに ¾ て、いずれか の tiff己表示情報 ¾1択して先に出力する、請求項 2記載の描画装
12.肅己予め定められた纖 IJは、 tiriB比較の結果、大きい謝己表示 を示す觸己表示 深度†f¾ む fins表示情報 ¾1択することである、請求項 2記載の摘画装 ft
13.肅己ソート手段が並べ替えを菊亍する際の it己グラフィック要素の肅 Β¾標は、 f!if己 グラフィック要素の頂点の座標であって、最も大きレ、座標あるレ、は最も小さ!/、座標の!/、ずれ かである、請求項 1記載の描画装氍
14.膽己第 1バッファは、少なくとも 1つの嫌己ラインを構成する複数の歸己ピクセル情報 を 内するバッファである、請求項 1記載の描画装
15.編己ソート手段は、嫌己表示情報の並べ替えを、ヒープソートにより新する、請求項
1記載の描画装氍
16. ttrf己ソート手段は、 ttrf己グラフィック要素としてのポリゴンを表示するための lift己表示 情報と、 rt己グラフィック要素としてのスプライトを表示するための I己表示情報と、で独立し て廳碰ベ替えを 汁る、請求項 1記載の描画装齓
17.嫌己描画手段は、 嫌己ソート手段が並べ替えた前記ポリゴンのための前記表示情報と、前記ソート手段が並 . ベ替え tfrta プライトのための tin己表示情報と、を前記ソート手段による並べ替えの規則 に準じてマージソートするマージソート手段をさらに含む、請求項 16記載の描画装氍
18.それぞれが複数のピクセルから構成される ffiな複数のラインを、そのラインに垂直 な方向に並べて構成されるスクリーンに、多角形状のグラフィック要素 ¾r ^むグラフィック要 素ごとの表示情報に基づ 、て、 tif!Eグラフィック要素の組み合わせからなるスクリーンィメー ジを表示するための描画方法であって、
lift己表示情報に含まれる、 tiff己グラフィック要素の l己ラインに垂直な方向の位置を示す 座標力 昇順あるいは降順のいずれかで並ぶように、鍵己グラフィック要素ごとの嫌己表示 情報を並べ替えるソートステップと、
tifts —トステツプで並べ替えた tiff己表示情報を順番に読み出して、読み出した tiff己表示 情報に基づいて、対応する ilBグラフィック要素の描画を 亍する描画ステップと、を含む 描画方法。
19.前記描画ステップは、
謝 クリーンを構成する it己ピクセルのうち第 1の所定数分のピクセル情報を 内可能 な第 1バッファに、嫌己表示情報に基づく鍵己ピクセル情報が鶴内された後に、当該表示情 報に基づく他のピクセル情報を膽己第 1バッファに 内するために、当該表示情報が再利用 可能なときに、第 2の所 分の觸己グラフィック要素の歸己表示情報が 内可能な第 2バ ソファに、再利用のために送られてくる順番で、当該表示情報を櫞内するステップと、
Ml己第 1パッファに撫内された it己ピクセル情報が育 ίίΙ己スクリーンイメージを表示するため に出力された後に新たに 内されるピクセル情報を、嫌己第 1バッファに編内する期間が到 来したときに、搬己第 2バッファから、 内した順番で膽己表示情報を出力するステップと、 編己ソートステップで並べ替えた順番で読み出された觸己表示情報のうち、歸己第 1バッ ファに格納すべき期間が到来した前言 5ffたなピクセル情報を生成するための前言 0表示情報 に れる表示深度情報と、鍵己第 2バッファから出力される觸己表示情報に含まれる表示 深度情報と、を比較し、予め定められた細 ijに従って、いずれかの tins表示†t¾¾i択して 先に出力する比^テツプと、
嫌己比^ テツプで出力された嫌己表示情報に基づ 、て嫌己ピクセル情報を生成し、前 記生成したピクセル'隨を廳 Eifたなピクセル情報として 第 1パッファに書き込む書込 ステップと、 む請求項 18記載の描画方法。
20.複数の廳己グラフィック要素を表示する ¾^であって、その複数のグラフィック要素の
Miam標が同じ^、 ttfiB —トステツプでは、その複数のグラフィック要素に対しては、前 記表示情報に含まれる表示深度情報が示す表示深度の昇順ある 、は降順の ヽずれかで前 記表示情報を並べる、請求項 18記載の描画方法。
21.複数の肅己グラフィック要素力 ttflB^クリーンの先頭ラインに表示すべきピクセルを 含む ¾^、肅己ソートステップでは、その複数のグラフィック要素に対しては、辦 標の大 小に関係なぐ肅己表示深度の昇順あるいは陶噴のいずれかで嫌己表示情報を並べる、請 求項 20記載の描画方法。
22.それぞれが複数のピクセルから構成される平行な複数のラインを、そのラインに垂直 な方向に並べて構成されるスクリーンに、多角形状のグラフィック要素を含むグラフィック要 素ごとの表示情報に基づ 、て、インタレーススキャンにより嫌己グラフィック要素の組み合わ せからなるスクリーンイメージを表示するための描画方法であって、
偶数フィールドを表示するために、細グラフィック要素ごとの表示情報を、第 1の纖 IJに 従って並べ替えるソー卜ステップと、
奇数フィールドを表示するために、藤グラフィック要素ごとの表示情報を、第 2の纖 IJに 従って並べ替えるソートステップと、
婦己奇数フィールドを表示する場合、その表示のために前記ソートステップで並ぺ替えた
ΙΐΠΒ表示情報を順番に読み出して、読み出した歸己表示情報に基づいて、対応する觸己グ ラフィック要素の描画を 亍する描画ステップと、
前記偶数フィニルドを表示する場合、その表示のために前記ソートステップで並ぺ替えた 膽己表示情報を順番に読み出して、読み出した嫌己表示情報に基づいて、対応する嫌己グ ラフィック 素の描画を る描画ステップと、 み、
觸己第の纖 ljは、鎌己表示情報に れる、灘己グラフィック要素の肅己ラインに垂直な 方向の位置を示す座標が、昇順あるいは降順のいずれかで並ぶように、前記グラフィック要 素ごとの ϋίΠΒ表示情報を並べ替える際に、 ΙίίΙΒ^標が、スキャンする奇^イン又はその 1 つ前の偶 ^インを示す tiff己グラフィック要素にっレ、ては、当該グラフィック要素の ttflBl 標 が同一であるとして、 tin己表示情報に含まれる表示深度情報が示す表示深度の昇順あるい は降順の 、ずれかで嫌己表示情報を並べることであり、
ήίΠΒ第 2の細 Uは、肅己表示情報に れる、嫌己グラフィック要素の |![|5¾標が、昇順あ る 、は降順のレヽずれかで並ぶように、嫌己グラフィック要素ごとの嫌己表示情報を並べ替え る際に、 tiffsm標が、スキャンする偶 イン又はその 1つ前の ¾m ^インを示す嫌己グラフ イツク要素については、嫌 標が同一であるとして、嫌己表示情報に含まれる表示深度情 報が示す表示深度の昇順あるレ、は降順の!/、ずれかで嫌己表示†謙を並べることである、描 画方法。
23.廳己描画ステップの各々は、
膽己スクリーンを構成する嫌己ピクセルのうち第 1の所: ¾分のピクセル情報を格納可能 な第 1バッファに、嫌己表示情報に基づく嫌己ピクセル情報が m内された後に、当該表示情 報に基づく他のピクセル情報を鎌己第 1バッファに觸内するために、当該表示 報が再利用 可能なときに、第 2の所定数分の搬己グラフィック要素の歸己表示情報が搬内可能な第 2バ ッファに、再利用のために送られてくる順番で、当該表示情報を編内するステップと、 謙己第 1バッファに搬内された嫌己ピクセル情報が ttffB^クリーンイメージを表示するため に出力された後に新たに 内されるピクセル情報を、 MI5第 1バッファに編內する期間が到 来したときに、婦己第 2バッファから、觸内した順番で Ι ΙΒ表示情報を出力するステップと、を 含み、
tiff己奇翁フィーノレドのための tirf¾s画ステップは、 嫌己« ィールドを表示するための Ml己ソートステップで並べ替えた順番で読み出され た肅己表示情報のうち、廳己第 1パッファに搬内すべき期間が到来した f!ifBifたなピクセル' 情報を^^するための MIB表示 に れる歸己表示渡'隨と、 f!B第 2バッファから 出力される MIB表示情報に含まれる Iff!己表示深度情報と、を比較し、予め定められた繊 IJ に従って、 ヽずれかの tins表示情報 択して先に出力する比 テツプと、
na奇数フィールドのための嫌己比^テツプで出力された it己表示情報に基づいて前 記ピクセル情報を生成し、 tin己生成したピクセル情報を ttitBiifたなピクセル情報として tins 第 1バッファに書き込む書込ステップと、をさらに含み、
tiff己 «7ィールドのための ttfts描画ステップは、
肅己偶^ィールドを表示するための嫌己ソートステップで並べ替えた順番で読み出され た嫌己表示情報のうち、嫌己第 1バッファに編内すべき期間が到来した tiitBifたなピクセル †鎌を生成するための嫌己表示情報に れる廳己表示 情報と、 ttflB第 2バッファから 出力される tut己表示情報に含まれる嫌己表示深度情報と、を比較し、編己予め定められた 細 IJに従って、 Vヽずれかの歸己表示情報 択して先に出力する比 テツプと、
嫌己偶数フィールドのための Ml己比^テツプで出力された嫌己表示情報に基づ!/、て前 記ピクセル情報を生成し、謙己生成したピクセル情報を tirtaifたなピクセル情報として MI己 第 1パッファに書き込む書込ステップと、をさらに含む請求項 22記載の描画方法。
24.複数の lift己グラフィック要素が、 ΙίίΙΒ クリーンの先頭ラインに表示すべきピクセルを 含む場合、 tin己奇数フィールドのための前記ソートステップでは、前記第 1の規則 ¾ϋ用せ ず、前記偶数フィールドのための前記ソートステップでは、前記第 2の規則を適用せず、前 記ソートステップの各々では、当^ ϋ数のグラフィック要素に対しては、謙己表示深度の昇 順ある!/、は降順の!/ヽずれかで嫌己表示情報を並べる、請求項 22記載の描画方法。
25.嫌己ソートステップでは、所 »分の tiilBグラフィック要素の應己表示情報の並べ替 えが完了するたぴに、その旨を通知し、
嫌己描画ステップでは、謙己ソートステップによる觸己通知を受けて、並べ替えが完了した 嫌己表示情報を順次読み出す、請求項 18記載の描画方法。
26.辦己ソートステップの各々では、所定数分の嫌己グラフィック要素の廳己表示情報の 並べ替えが完了するたぴに、その旨を通知し、
肅己描画ステップの各々では、嫌己ソートステップによる謙己通知を受けて、並べ替えが 完了した觸己表示' lf¾を順次読み出し、
ΙίίΙΒ奇懇フィールドのための tiitB —トステツプでは、 ftS ぺ替ぇを、当該奇¾7ィール ド ¾:¾示する直前の垂直プランキング期間の開始直後に i開始し、
it己 ィールドのための前 le —トステツプでは、 tiftE ベ替えを、当該偶翁フィーノレ ドを表示する直前の垂直ブランキング期間の開始直後に 開始する、請求項 22記載の描 画方法。
27.嫌己所趙分の肅己グラフィック要素の嫌己表示情報は、 1つ分の嫌己グラフィック要 素の ff己表示情報である、請求項 25記載の描画方法。
28.觸己描画ステップは、
第 3の所 分の辦己グラフィック要素の嫌己表示情報を搬内可能な第 3バッファに、肅己 ソートステップで並べ替えた順番で読み出される it己表示情報を、読み出された順番で格 納するステップと、
ift己第 1バッファに ¾内すべき期間が到来した前 fB fこなピクセル情報を生成するための 膽己表示情報を、膽己第 3バッファから、 内された順番で出力するステップと、をさらに含 み、
膽己比 テツプでは、廳己第 3バッファから出力される嫌己表示情報に含まれる表示深 度情報と、再利用のために送られてきた順番で 内された嫌己第 2バッファから出力される 嫌己表示†謙に "^れる表示深度情報と、を比較し、廳己予め定められた纖 IJに従って、い ずれかの嫌己表示情報 択して先に出力する、請求項 19記載の描画方法。
29.膽己予め定められた細 IJは、嫌己比較の結果、大きい ilB表示深度を示ず廳己表示 ¾¾¾情報^^む嫌己表示情報 択することである、請求項 19記載の描画方法。
30. tfilE —トステツプで並べ替えを紫汁る際の MIBグラフィック要素の嫌醒標は、前. 記グラフィック要素の頂点の座標であって、最も大き 、座標あるレ、は最も小さレ、座標の 、ず れかである、請求項 18記載の描画方法。
31.嫌己第 1バッファは、少なくとも 1つの鍵己ラインを構成する複数の嫌己ピクセル情報 を棚するパッファである、請求項 18記載の描画方法。
32.嫌己ソートステップでは、嫌己表示情報の並べ替えを、ヒープソートにより 亍する、 請求項 18記載の描画方法。
33. MtE —トステツプでは、肅己グラフィック要素としてのポリゴンを表示するための tin己 表示†t¾と、 tin己グラフィック要素としてのスプライトを表示するための tin己表示情報と、で独 立して婦己並べ替えを 汁る、請求項 18記載の描画方法。
34.嫌己描画ステップは、
tin己ソートステップで並べ替えた tin己ポリゴンのための tiit己表示情報と、肅己ソートステツ プで並べ替えた rts ブライトのための rt己表示情報と、を ttit己ソートステップによる並べ替 えの ¾Μに準じてマージソートするステップをさらに含む、請求項 33記載の描画方法。
PCT/JP2005/024214 2005-01-04 2005-12-26 描画装置及び描画方法 WO2006073131A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP05822791A EP1847965A4 (en) 2005-01-04 2005-12-26 PLOTT SETUP AND PLOTT PROCEDURE
CN2005800480027A CN101116112B (zh) 2005-01-04 2005-12-26 绘制装置及绘制方法
JP2006550871A JP4725741B2 (ja) 2005-01-04 2005-12-26 描画装置及び描画方法
US12/108,393 US20080273030A1 (en) 2005-01-04 2008-04-23 Drawing apparatus and drawing method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2005000089 2005-01-04
JP2005-000089 2005-01-04

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US12/108,393 Continuation US20080273030A1 (en) 2005-01-04 2008-04-23 Drawing apparatus and drawing method

Publications (1)

Publication Number Publication Date
WO2006073131A1 true WO2006073131A1 (ja) 2006-07-13

Family

ID=36647610

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2005/024214 WO2006073131A1 (ja) 2005-01-04 2005-12-26 描画装置及び描画方法

Country Status (7)

Country Link
US (1) US20080273030A1 (ja)
EP (1) EP1847965A4 (ja)
JP (2) JP4725741B2 (ja)
KR (1) KR20070095984A (ja)
CN (1) CN101116112B (ja)
TW (1) TW200636612A (ja)
WO (1) WO2006073131A1 (ja)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011090663A (ja) * 2009-09-24 2011-05-06 Toshiba Corp 画像処理装置及びプログラム
CN104240302A (zh) * 2014-09-03 2014-12-24 青岛海信移动通信技术股份有限公司 一种图片显示方法及设备
US9396705B2 (en) 2013-08-30 2016-07-19 Socionext Inc. Image processing method and image processing apparatus for drawing graphics in one area
JP2018534607A (ja) * 2015-09-21 2018-11-22 クアルコム,インコーポレイテッド プリフェッチを用いた効率的な表示処理

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
MX2009004121A (es) * 2006-10-20 2009-06-08 Nokia Corp Indicacion generica de trayectos de adaptacion para multimedia escalable.
CN102063733B (zh) * 2009-11-18 2015-06-17 新奥特(北京)视频技术有限公司 一种深度相同的z消隐方法和装置
CN102063732B (zh) * 2009-11-18 2015-05-27 新奥特(北京)视频技术有限公司 一种背景图像的呈现方法和装置
US8570336B2 (en) * 2009-12-08 2013-10-29 Intel Corporation Texture unit for general purpose computing
CN101923468A (zh) * 2010-08-13 2010-12-22 中兴通讯股份有限公司 一种重绘微件的方法及装置
CN103238170B (zh) * 2010-12-02 2015-11-25 Dipro株式会社 显示处理方法以及装置
US20130106887A1 (en) * 2011-10-31 2013-05-02 Christopher Tremblay Texture generation using a transformation matrix
CN103065349B (zh) * 2012-12-31 2016-01-27 艾迪普(北京)文化科技股份有限公司 一种数据渲染方法及装置
US9367948B2 (en) * 2013-11-14 2016-06-14 Intel Corporation Flexible filter logic for multi-mode filtering of graphical texture data
CN105488049A (zh) * 2014-09-17 2016-04-13 腾讯科技(深圳)有限公司 网页图像解析方法、装置及浏览器
CN104504755B (zh) * 2014-12-30 2017-04-19 华中科技大学 一种山体中分布式地下设施温度场仿真方法
US20160322031A1 (en) * 2015-04-28 2016-11-03 Mediatek Singapore Pte. Ltd. Cost-Effective In-Bin Primitive Pre-Ordering In GPU
FR3047378B1 (fr) * 2016-01-29 2018-05-18 STMicroelectronics (Alps) SAS Circuit de fourniture d'un signal video analogique
WO2022068326A1 (zh) * 2020-09-30 2022-04-07 华为技术有限公司 一种图像帧预测的方法及电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0785308A (ja) * 1993-07-02 1995-03-31 Sony Corp 画像表示方法
JPH09245194A (ja) * 1996-03-07 1997-09-19 Sony Computer Entertainment:Kk 画像処理装置
JPH10201947A (ja) * 1996-11-22 1998-08-04 Sega Enterp Ltd ゲーム装置、画像データの形成方法及び媒体
JP2000259860A (ja) * 1999-03-12 2000-09-22 Square Co Ltd ゲーム装置、動画像表示方法及び記録媒体

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2028701C (en) * 1989-11-15 2001-04-24 Yitshak Birk Method and apparatus for pipelined parallel rasterization
JPH11515121A (ja) * 1995-07-26 1999-12-21 レイカー,インコーポレイティド スパンおよびサブスパン・ソーティング・レンダリング・システムのための方法および装置
US5815158A (en) * 1995-12-29 1998-09-29 Lucent Technologies Method and apparatus for viewing large ensembles of three-dimensional objects on a computer screen
US6234901B1 (en) * 1996-11-22 2001-05-22 Kabushiki Kaisha Sega Enterprises Game device, picture data and flare forming method
JP3785709B2 (ja) * 1996-12-13 2006-06-14 ソニー株式会社 形状データの近似化方法及び描画装置
JP4332934B2 (ja) * 1999-06-17 2009-09-16 株式会社セガ アンチエイリアシング方法及びこれを用いた画像処理装置
US6478600B1 (en) * 2001-12-24 2002-11-12 Hon Hai Precision Ind. Co., Ltd. SMT contact for a ZIF socket

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0785308A (ja) * 1993-07-02 1995-03-31 Sony Corp 画像表示方法
JPH09245194A (ja) * 1996-03-07 1997-09-19 Sony Computer Entertainment:Kk 画像処理装置
JPH10201947A (ja) * 1996-11-22 1998-08-04 Sega Enterp Ltd ゲーム装置、画像データの形成方法及び媒体
JP2000259860A (ja) * 1999-03-12 2000-09-22 Square Co Ltd ゲーム装置、動画像表示方法及び記録媒体

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011090663A (ja) * 2009-09-24 2011-05-06 Toshiba Corp 画像処理装置及びプログラム
US9396705B2 (en) 2013-08-30 2016-07-19 Socionext Inc. Image processing method and image processing apparatus for drawing graphics in one area
CN104240302A (zh) * 2014-09-03 2014-12-24 青岛海信移动通信技术股份有限公司 一种图片显示方法及设备
US9842419B2 (en) 2014-09-03 2017-12-12 Hisense Mobile Communications Technology Co., Ltd. Method and device for displaying picture, and storage medium therefore
JP2018534607A (ja) * 2015-09-21 2018-11-22 クアルコム,インコーポレイテッド プリフェッチを用いた効率的な表示処理

Also Published As

Publication number Publication date
CN101116112A (zh) 2008-01-30
JPWO2006073131A1 (ja) 2008-06-12
CN101116112B (zh) 2010-12-29
EP1847965A4 (en) 2009-08-12
EP1847965A1 (en) 2007-10-24
JP2011159306A (ja) 2011-08-18
JP4725741B2 (ja) 2011-07-13
KR20070095984A (ko) 2007-10-01
TW200636612A (en) 2006-10-16
US20080273030A1 (en) 2008-11-06

Similar Documents

Publication Publication Date Title
WO2006073131A1 (ja) 描画装置及び描画方法
JP4332934B2 (ja) アンチエイリアシング方法及びこれを用いた画像処理装置
JP5061273B2 (ja) 画像生成装置、テクスチャマッピング装置、画像処理装置、及びテクスチャ格納方法
JP4240395B2 (ja) 画像合成装置、電子機器、画像合成方法、制御プログラムおよび可読記録媒体
JP4366317B2 (ja) ポーター・ダフ合成法のための背景色除去方法
KR910009102B1 (ko) 화상합성 장치
US6927778B2 (en) System for alpha blending and method thereof
CN106780704B (zh) 基于可见性重用的三维场景直接光照效果近似绘制方法
JP2003091736A (ja) 描画処理装置、描画処理プログラムを記録した記録媒体、描画処理プログラム、描画処理方法
JP2009205522A (ja) プログラム、情報記憶媒体、情報変換システム
WO2007052420A1 (ja) 画像生成装置
JP3501479B2 (ja) 画像処理装置
JPH10247241A (ja) 畳み込み走査ラインレンダリング
JP2007128180A (ja) 演算処理装置
JP3749373B2 (ja) 三次元立体構造体の二次元表示方法
JPH0773303A (ja) 電子ブラシ制御方法及びその装置
JP3382536B2 (ja) 画像生成方法、画像生成装置および画像生成プログラムを記録した記録媒体
JP2011159305A (ja) 描画装置及び描画方法
JPH02132572A (ja) 画像表示装置
JP3750171B2 (ja) 描画色変更方法、及び画像作成装置
JPH09147147A (ja) テクスチャ編集システム
JP3792202B2 (ja) 三次元画像表示方法及びそれに使用する三次元画像表示装置
JPH02127786A (ja) 三次元物体の二次元表現方法
JPH0793587A (ja) 画像処理装置及びその方法
JPH11339069A (ja) 画像合成装置および画像合成方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 2006550871

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 1020077017336

Country of ref document: KR

WWE Wipo information: entry into national phase

Ref document number: 2005822791

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 200580048002.7

Country of ref document: CN

WWP Wipo information: published in national office

Ref document number: 2005822791

Country of ref document: EP