WO2007043293A1 - 画像生成装置、テクスチャマッピング装置、画像処理装置、及びテクスチャ格納方法 - Google Patents

画像生成装置、テクスチャマッピング装置、画像処理装置、及びテクスチャ格納方法 Download PDF

Info

Publication number
WO2007043293A1
WO2007043293A1 PCT/JP2006/318681 JP2006318681W WO2007043293A1 WO 2007043293 A1 WO2007043293 A1 WO 2007043293A1 JP 2006318681 W JP2006318681 W JP 2006318681W WO 2007043293 A1 WO2007043293 A1 WO 2007043293A1
Authority
WO
WIPO (PCT)
Prior art keywords
texture
coordinates
data
coordinate
self
Prior art date
Application number
PCT/JP2006/318681
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 JP2007539843A priority Critical patent/JP5061273B2/ja
Priority to US12/088,935 priority patent/US20090278845A1/en
Publication of WO2007043293A1 publication Critical patent/WO2007043293A1/ja

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures

Definitions

  • the present invention is based on an arbitrary combination of polygonal rough elements (polygons) and rectangular graphic elements (sprites) parallel to the screen for representing the shape of each surface of a three-dimensional solid projected in a two-dimensional space.
  • the present invention relates to an image generation apparatus that generates an image and related technology.
  • the present invention also relates to a texture mapping apparatus for mapping a texture to graphic elements (polygons) and two-dimensional graphic elements (sprites) constituting a three-dimensional model on a screen, and a related technique.
  • the present invention relates to an image generation apparatus that generates an image displayed on a screen, which includes a plurality of graphic elements, and a related technique.
  • Patent Document 1 discloses an image display method for solving this problem.
  • an object to be displayed on the image display surface is drawn by a drawing command for polygons constituting each surface of the object, and the object polygon is drawn by a texture image stored in the texture storage area. decorate.
  • a rectangular image command for arranging a rectangular texture image of the same size as the above rectangle in the texture storage area is set to a rectangular polygon of a predetermined size that is always upright on the image display surface.
  • the rectangular image command specifies the position of the rectangle on the image display surface and the position of the rectangular texture image on the texture storage area. You can draw a rectangular area.
  • the entire texture image to be mapped to one graphic element must be within the texture storage area. This is because if a pixel group included in a horizontal line of drawing on the screen is mapped to the texel space where the texture image is placed, it may be mapped onto any S in the texel space. It is. On the other hand, the splice is mapped only on 5 Pfi 1 to the horizontal axis of texel space.
  • the capacity of the texture storage area is limited, so the number of polygons and sprites that can be drawn simultaneously is reduced.
  • the number of polygons that can be drawn at the same time and the number of spurious splices that can be drawn at the same time, 3 ⁇ 4 ⁇ must increase the memory capacity, and with a small amount of memory, simultaneously draw many polygons and similar splices. It is difficult.
  • a 3D system since a 3D system is used, it is only possible to display a pseudo sprite with the same shape as the polygon of the 3D system. In other words, if the polygon is ⁇ ( ⁇ is a dish of 3 or more) square, the sprite is also ⁇ square, and the shape of both cannot be different.
  • a quadrilateral pseudo sprite can be configured with two triangular polygons, but in this case as well, the entire image of the two triangular polygons must be stored in the texture storage area, and the required memory capacity Becomes larger.
  • the present invention reduces the size of hardware, and includes a polygonal graphic element for representing the shape of each surface of a three-dimensional body that has been refined in a two-dimensional space, and a frame for a screen and a lean frame.
  • An image that can generate an image consisting of any combination of rectangular graphic elements, and can increase the number of graphic elements that can be drawn simultaneously without increasing the power, memory capacity, and device and related technologies For the purpose.
  • the texture mapping device disclosed in Patent Document 2 is composed of a texture mapping unit and an image memory.
  • the image memory is composed of a frame memory and a texture memory.
  • 3D image data which is the third part of texture mapping, is stored in a fill coordinate system corresponding to the display plane, and in the texture memory, mapping is performed.
  • the texture data to be stored is stored in the texture coordinate system.
  • such texture memory is textured in the way it is mapped.
  • the texture is stored in the texture memory as a two-dimensional array. For this reason, the texture is stored in the texture memory as it is mapped. If you pay, there will be useless texels that are not matted.
  • Another object of the present invention is to reduce a waste techno data included in the texture pattern data stored in the memory as much as possible, and to suppress a necessary memory capacity and a related structure. «Technology.
  • Patent Document 2 discloses a texture mapping apparatus as described above. However, Patent Document 2 does not pay particular attention to texture memory area management. However, if appropriate area management is not performed, there will be many unnecessary accesses to the outside for obtaining texture data, and there will be a situation where a large amount of texture memory must be secured.
  • Another object of the present invention is to avoid access to useless external memory for obtaining texture data, and to provide hardware resources for temporarily storing texture data in ig ij. It is to develop an image device and related technology that can suppress the increase in size. Disclosure of the invention
  • an image production apparatus is an image generation device for displaying an image displayed on a tin screen, which is composed of a plurality of graphic elements.
  • the fixed element is composed of an arbitrary combination of a polygonal graphic element for representing the shape of each surface of a three-dimensional solid in a two-dimensional space and a rectangular daraf element parallel to the frame of the screen.
  • a first data conversion means (corresponding to the vertex sorter 1 1 4) for converting the first display information for generating the polygonal-shaped daratic element into data of a predetermined format, and ⁇ ⁇ rectangular graphic
  • the second display information for generating the element is converted into data of a predetermined format by a second data conversion means (corresponding to the vertex expander 1 1 6), ffrt self-first data conversion means and Hi
  • the image generation means (vertex sorter 1 14 and vertex scan span 1 1 6) Equivalent to the circuit in the latter stage).
  • the first element for generating a polygonal graphic element (for example, a polygon) is used.
  • the display information of 1 and the second display information for rectangular graphic elements are converted to the same format, polygonal graphic elements and rectangular graphic elements It is possible to make the function block of the image generation means as common as possible. For this reason, the hardware scale can be reduced.
  • the first two-dimensional standard system is a two-dimensional coordinate system used to display the lift self graphic element on the fiJlB screen
  • the second two-dimensional standard system is a fiilE graphic system.
  • the image data force mapped to the map element is a self-placed two-dimensional coordinate system, and the data in a predetermined format includes a plurality of vertex fields.
  • the first data conversion means shelves the coordinates of the vertices of the darling elements of the Kansai polygon shape in the first two-dimensional straight 33 ⁇ 4 standard system on the first Finored
  • the coordinates of the vertices of the graphic elements of the shape are stored in the first 1st Fino Red, and the coordinates of the vertices of the rectangular graphic elements in the fiffS first 2D linear 3 ⁇ 43 ⁇ 4standard system are stored in the second 2D orthogonal coordinates. Store the coordinates mapped to the system in the 2nd Fino Redo.
  • the first data conversion means leaks the parameter of the vertex in the format corresponding to the drawing mode to the second finale of the data in the predetermined format, so that the same format data format is maintained.
  • drawing in different drawing modes can be realized.
  • the tiff self-second data conversion means is a coordinate of one vertex of the self-rectangular graphic element in the self-first two-dimensional cartographic system included in the self-second display information.
  • And ⁇ tilt Calculate the coordinates of some or all of the other three vertices in the first two-dimensional linear 3 ⁇ 413 ⁇ 4 standard system based on the size information of the graphic element.
  • the coordinates of the vertices contained in the display information and the calculated coordinates of the vertices are entered in the first fidelity, and the coordinates of the vertices contained in the second display information are displayed in advance.
  • the map of the 2nd dimensional 33 ⁇ 4 standard system in Kamami's 2 ⁇ T, and the coordinates of the 2nd 2D direct system of the tiHS generated are frT in the 2nd Fino Red. According to this configuration, since the coordinates of some or all of the other three vertices are calculated, it is not necessary to include the coordinates of all four vertices in the second display information, and the second display information is stored. Required memory capacity The amount can be suppressed.
  • the second data conversion means is one of the rectangular graphic elements in the first two-dimensional orthogonal coordinate system included in the second display information. Based on the coordinates of the two vertices, the destruction rate of the graphic element, and the size information of the graphic element, the coordinates of some or all of the other three vertices in the two-dimensional Cartesian coordinate system of ⁇ are calculated. The coordinates of the vertices included in the second display information and the calculated coordinates of the vertices are stored in the first field in advance, and the coordinates of the vertices included in the tiiiE second display information are calculated in advance.
  • the coordinates of some or all of the other three vertices are calculated, it is not necessary to include the coordinates of all four vertices in the second display information.
  • the amount of memory required for storage can be reduced.
  • 3 ⁇ 4 target system reflect the ratio of the graphic elements, so even when displaying an enlarged or reduced image on the screen. It is not necessary to prepare the image data after enlargement or reduction in the memory beforehand, and the memory capacity necessary for storing the image data can be suppressed.
  • the first data conversion means obtains the coordinates in the first two-dimensional orthogonal coordinate system of the vertex of the lift self-polygonal graphic element included in the first display information of fiJlB, and The first data conversion means is stored in the first field, and the drawing mode indicates drawing by texture mapping.
  • the first data conversion means included in the first display information includes a polygonal-shaped graphic element. Acquire vertex coordinates for frlE second 2D cartesian system and parameters for perspective correction, calculate vertex coordinates for Kamii second 2D cartesian system, and correct perspective , The coordinates of the vertex after perspective correction and the parameters for proximity correction are carried to it's second field, and tin self-drawing mode shows drawing with Gouraud shading.
  • Fff l Acquire the color data of the top of the graphic element of the ffJlE polygon shape included in the first display information, and store the acquired color data in the IB second field.
  • the data in a predetermined format is further flagged with a flag that indicates whether the data is a graphic element having a rectangular shape, which is a polygonal element having a polygonal shape.
  • the first data conversion means shelves information indicating that the data is a dislike polygonal graphic element in the SiilS floodanode, and the m 2 data conversion means In the lag field, information indicating that the data is a draped rectangular-shaped element is provided.
  • the image ⁇ means that receives the data in the predetermined format while maintaining the identity of the data in the predetermined format can easily select the graphic element type of the drawing ⁇ by referring to the flag field. It is possible to identify and perform processing for each type of graphic element.
  • the tiHB image means determines the two intersections of the screen drawing line and the edge of the tiff graphic element. Including the intersection calculation means (corresponding to slicer 1 1 8) that calculates the difference and calculates the difference as the first data, the dislike flag field included in the received ⁇ predetermined format data is
  • the self-intersection calculation means indicates that it is a graphic element of the shape, and the ffi
  • the parameter is calculated, and ⁇ is calculated as the second data to indicate that the Fujimi Hladafirinoredo included in the received data in the specified format is a bell-shaped rectangular element.
  • the selfish intersection calculation means is based on the coordinates of the vertices in the second 2D linear 3 ⁇ 41 standard system included in the lift me second field: Ftjf self Calculates the coordinates of the two intersection points in the second two-dimensional linear 3 ⁇ 43 ⁇ 4standard system, calculates the ⁇ as second data, and the intersection point calculation means converts the second data into the second data Dividing by the first data, the amount of change of the parameter per unit mark in the first two-dimensional coordinate system is obtained.
  • this image generating device When this image generating device is used, it indicates that the self-fundaly nored included in the received data in the specified format is a firlH polygonal daraf element, and the fflf self-drawing mode is drawing with texture mapping. 3 ⁇ 4 ⁇ , the tiff self-intersection calculation means, based on the coordinates of the corrected vertex and the perspective correction parameters m ft in the second field of disgust, ffrf self Calculate the corrected vertex coordinates and perspective correction parameters, calculate that as ffifB second data, and the flooder field included in the received data of the predetermined format is the polygonal graphic element This indicates that the drawing mode is drawing with goose-shading, and the tins intersection calculation means Based on the color data stored in the field, to calculate color data TtflB 2 two intersections, and l his own second data to calculate the the color data.
  • the drawing mode indicates that the drawing is performed by texture mapping
  • the coordinates in the second two-dimensional direct target system between the two intersection points are converted into perspective after correction. It can be easily calculated from the coordinates of the apex and the distance between the perspective correction parameters.
  • the drawing mode indicates drawing with Gouraud shading. In the latter part, each color data between the two intersections can be easily calculated by linear interpolation.
  • the ttHE image means calculates the first per unit coordinate value of the first two-dimensional orthogonal coordinate system calculated by the ffif self-intersection calculating means for the graphic element having a rectangular shape.
  • Vertex coordinates and perspective correction after perspective correction in the second two-dimensional linear 3 ⁇ 41 standard system The amount of change of the parameter is determined in the order of the coordinates of the vertex after the perspective correction and the parameters for perspective correction in the second two-dimensional straight target system of tijfe, the intersection of the two tijfe and the one of the displacement force. Calculate the coordinates of the vertex after perspective correction between the two intersections and the parameters for perspective correction. ⁇ 53 ⁇ 4
  • the calculation means is the polygonal shape in which the self-drawing mode indicates drawing with Gouraudade.
  • the change amount of the force error data per unit coordinate of the first two-dimensional orthogonal coordinate system calculated by the tin self-intersection calculation means is expressed as either color of one of the two intersections.
  • the color data at each coordinate of the first two-dimensional orthogonal coordinate system between two intersections is calculated.
  • the second secondary system is used.
  • Each coordinate between the above two intersections in the dimensional linear 3 ⁇ 43 ⁇ 4 standard system can be easily calculated by linear interpolation.
  • the second 2D linear per 3 ⁇ 43 ⁇ 4 target in the first 2D coordinate system after perspective correction Based on the vertex coordinates and the amount of change in the perspective correction parameters, the vertex coordinates after perspective correction between the two intersections and the perspective correction parameters can be easily calculated by linear interpolation.
  • the IS picture ⁇ means performs the drawing process in accordance with the predetermined line II * in units of lines constituting the screen, and the first data conversion means is a plurality of self-coding means. 1
  • the order of the coordinates of the vertices contained in the field is the same as the order in which the items appear in the predetermined line order!
  • the content of the selfish vertex field is set to At, and the second data conversion means of tins determines the order of the coordinates of the vertices of the m-shaped graphic element in the order in which the vertices appear in the predetermined line order Store data in each vertex field of tiilB.
  • the displacement between the polygonal graphic element and the rectangular graphic element is also arranged in the output of the vertex in the data in the predetermined format, so that the drawing process at the subsequent stage is facilitated.
  • the self image «means receives the data in a predetermined format, and based on the coordinates of the vertexes stored in the above first finale, Calculate the coordinates of the two intersections between the line and the edge of the graphic element, calculate the difference between them, and use it as the first data.
  • Mt, firlB Based on the parameters of the vertices listed in the second field of force, Mt, firlB Calculates the parameter at the two intersection points, calculates its ⁇ as the second data, and tiJlH second data divided by tilf self first data in the first quadratic standard system Includes intersection calculation means (corresponding to slicer 1 1 8) to obtain the amount of change of the parameter per unit coordinate.
  • the self image means is a unit per unit of the first two-dimensional Cartesian coordinate system calculated by the Fujimi intersection calculation means.
  • the amount of change in the parameter is adjusted in the order of the dissatisfaction parameter of the two intersections and the offset force, and tff! H tilt between the two intersections is the parameter at each coordinate of the first two-dimensional orthogonal coordinate system.
  • each parameter between the two intersections can be easily calculated by linear interpolation based on the amount of change of the parameter per unit ffi mark in the first two-dimensional coordinate system.
  • the image generation apparatus further includes merge sort means (corresponding to the merge sorter 106) that determines the drawing priority of the undesired polygonal graphic element and the rectangular graphic element in the drawing process according to a predetermined value IJ.
  • the first display information is stored in the first array in order, and the second display information is displayed in the order of high drawing priority.
  • the ffiia merge sort means compares the fijfS first display information and the tins second display information with respect to the drawing position feJ jet position in advance.
  • the self-drawing priority is higher than the ItifS drawing priority fel of the second display information ItifS drawing superior, and the merge sort means reads the tiiia first display information from the disgusting first array, and the second display information In the display information, the first drawing is about 53 ⁇ 4. It said of the shown information
  • the fit self merge sort means reads the second display information from the second dislike array
  • the tfrlB merge sort means reads the first display information of the edit
  • all the display information is arranged based on the drawing priority order and output as the same single data string regardless of the first display information or the second display information.
  • the polygonal-shaped elements and the rectangular graphic elements can share the function block of the latter stage as much as possible, further reducing the hardware scale.
  • f of the plurality of vertices of the graphic element is arranged in the predetermined line order among the coordinates in the first two-dimensional orthogonal coordinate system.
  • the merge sort is performed according to the predetermined fiber IJ in which the drawing priority of the graphic element that appears earlier in the appearance vertex coordinates becomes higher, the first display information output as a single data string and Just draw the second display information in the order of output.
  • a large-capacity buffer such as a frame buffer
  • a smaller-capacity buffer such as a line buffer or a pixel that is smaller than one line
  • the female merge sort means determines the age of ffl] ⁇ the point coordinates indicate the same value, the display depth information included in the first display information, and the second one.
  • the display depth information included in the display information is compared with and it is determined that the self-drawing priority of the self-graphic element that is drawn deeper is higher.
  • the drawing priority is determined in the order of display in the drawing eye line where the appearance vertex coordinates are the same in the polygonal graphic element and the rectangular graphic element. Therefore, the graphic elements drawn deeper in the drawing line are drawn first (drawing in order of display depth). For this reason, translucent synthesis can be performed appropriately.
  • the tiff self-merge sort means is configured such that the appearance vertex and coordinates are positioned before the first drawing line, and the age corresponding to the first drawing line and the first drawing line is the coordinates corresponding to the first drawing line. Replace and determine fiJlH drawing priority.
  • both the polygonal graphic element and the rectangular graphic element are output. If the current vertex coordinates are located before the first line to be drawn (that is, the first line on the screen), they are considered to be the same coordinates, so as described above, they are drawn deeper based on the display depth information. It is determined that the drawing superior injection position of the graphic element is higher. Therefore, in the first line of the screen, the graphic element is drawn around the display depth. If the processing at the top line is not performed, the drawing at the display depth is not necessarily guaranteed in the drawing of the top line. However, according to this configuration, the drawing at the display depth is performed from the top line. Can be done. The effect of drawing in the display depth order is the same as described above.
  • the Kenji merge sort means is a line that is not drawn in the field of the display of the odd-numbered and even-numbered fields, in which the age at which interlaced display is performed, and the fflf self-appearing vertex coordinates The coordinates of the appearance vertex are replaced with the coordinates corresponding to the line following that line.
  • the texture mapping device is a texture mapping device that maps texture to a polygonal graphic element.
  • the texture is divided into a plurality of pieces, and at least one ⁇ section is rotated and moved in a first two-dimensional texel space arranged in a manner in which the self texture is mapped to a graphic element. All of the tiff self-intercepts are placed in the second 2D texel space where the it self texture is placed in memory.
  • the texture mapping apparatus includes a reading means for reading out a plurality of tif! E slices from a two-dimensional array in which all of the tiff self-intercepts arranged in the second two-dimensional space are read.
  • a combining unit that combines the plurality of segments; and a mapping unit that maps the texture obtained by combining the plurality of segments to the polygonal graphic element.
  • the texture is not TO-memoryed in a manner that maps to graphics elements, but is divided into multiple segments, and at least one segment is rotated to create a memory To be done. For this reason, even when a texture mapped to a polygon other than a quadrangle, such as a triangle, is stored in memory 3 ⁇ 4 ⁇ , a wasteful storage area that is not textured can be saved as much as possible, and the texture pattern can be improved. ⁇ Memory capacity can be reduced.
  • the techno data of the area where the texture is arranged contains the actual contents (information indicating the color directly or indirectly).
  • the texel data in the non-placed area is useless and does not contain substantial contents. By eliminating this useless techzo as much as possible, the necessary memory capacity can be reduced.
  • texture pattern data means that the texture power is not only texel data of a region where it is placed, but includes texel data of other regions. For example, texel data of a rectangular area including a triangular tetasture.
  • the tfjf self-polygonal graphic element is a triangular graphic element
  • the texture is a triangular texture
  • the texture is divided into two slices, one of which is rotated and moved, and two pieces of tfriH are stored in the tiriH two-dimensional array.
  • the self-triangular texture is a right triangle having a side that is large to the first coordinate axis of the second two-dimensional texel space and a side that is TO to the second coordinate axis orthogonal to the first coordinate axis.
  • the texture of the right triangle shape is divided into 1 «two sections by a il that is slightly different from the first coordinate axis or the second coordinate axis of the self-sealing, and is 1 1 One intercept is rotated 180 degrees, and firf self 2 intercepts are placed in l!
  • the texture is a right triangle, so the two sides forming a right angle are
  • the vertex of the triangle in the first two-dimensional texel space By matching one and two coordinate axes of the two-dimensional texel space of 1, and setting a perpendicular vertex as the origin of the first two-dimensional texel space, the vertex of the triangle in the first two-dimensional texel space The amount of data required for specifying the coordinates can be reduced.
  • the first storage form and the second form are prepared as inner forms of the tills texture in the tiJlE two-dimensional array.
  • the two-dimensional texel space of rn 2 is the one that has the ⁇ coordinate axis and the second coordinate axis that is orthogonal to the HIIB first coordinate axis.
  • the first predetermined number of texels is taken as one unit, and all slices are stored in the SfllH two-dimensional array so that one unit of texel is stored in one word of memory.
  • the second predetermined number of texels arranged two-dimensionally in the second two-dimensional texel space is taken as one unit, and all the dislikes are stored so that one unit of texels is stored in one memory card. Are stored in a two-dimensional array.
  • a polygonal graphic element (eg, polygon) is used to represent the shape of each surface of a three-dimensional solid in a two-dimensional space.
  • a graphic element for representing a three-dimensional solid may be used as a two-dimensional graphic element upright on the screen (similar to a sprite).
  • the screen is composed of multiple ffi-aligned horizontal lines. Use a graphic element to represent a three-dimensional solid as a two-dimensional graphic element. To obtain a text sensor for each horizontal line As a result, the memory capacity for temporarily storing the text can be reduced.
  • texes are arranged one-dimensionally in one memory, so the number of accesses to the memory can be reduced when acquiring a texenator for each horizontal line.
  • the pixels are not mapped onto the horizontal line in the first two-dimensional texel space: But, in the second storage form, two dimensional texenos that are arranged in two dimensions are stored in the memory. Therefore, there is a high possibility that the texenator is located in the coordinates where the pixels are mapped, and that the texenator is already in the acquired texenator. The number of accesses can be reduced.
  • the Kakimi texture is made into a two-dimensional array of selfishness without splitting and rotating and swinging.
  • the tirlE reading means reads the IE texture from the two-dimensional array
  • the tfilB ⁇ matching means does not perform the combining process
  • the tilt self mapping means reads the HB Tetaschia read by the tilt self reading means tiHE Polygonal graphic element To map.
  • the texture is stored in the two-dimensional array without being divided and moved by fe3 ⁇ 4, so texture mapping is performed so that the texture force s is repeated in the horizontal direction and the Z or vertical direction. It is suitable for storing the texture pattern data in the memory. Moreover, since it is repeated mapping, the same texture pattern data can be used, and the memory capacity can be reduced.
  • the image processing apparatus is an image processing apparatus that performs non-linear filtering. At least one l-section is rotated 180 degrees in the first two-dimensional texel space where the texture is divided into multiple sections II, and the texture is mapped to a polygonal graphic element. And all of the fillB intercepts are placed in the second 2D texel space where the texture is stored in the memory, and the tin 2nd 2D texel. All tilt self-intercepts are stored in a two-dimensional array so that the texels used for bilinear filtering are arranged in space following the IB intercepts.
  • this image processing a3 ⁇ 4 is the coordinate (S, ⁇ ) in the second 2D texel space that corresponds to the coordinates in the first 2D texel space where the pixels included in the tins graphic element are mapped And a coordinate calculation means for calculating the leakage 33 ⁇ 4 target (S, T) force S corresponding to the mapped edited pixel.
  • the coordinate (s, ⁇ ) force s corresponding to the mapped pixel, s, 1 8 om ⁇ is included in the intercept that is moved into a two-dimensional array ⁇ Get.
  • the texels used in the non-linear filtering are stored so as to correspond to the sections between the sections divided and divided.
  • the image processing apparatus is an image processing apparatus that maps a texture to a triangular graphic element and performs drawing processing of each pixel constituting the tiilB graphic element.
  • the 2D direct 3 ⁇ 4H standard system in which the pixel drawing power is applied is the first coordinate system
  • the coordinates in the first tilt coordinate system are represented by (X, Y)
  • each texel constituting the tilt self texture is a graphic element.
  • the 2D coordinate system arranged in a manner mapped to the second coordinate system is used as the second coordinate system.
  • the coordinates in the coordinate system of 2 are represented by (U, V), and each texel is arranged in the form of being stored in the memory.
  • the second coordinate system is the third coordinate system.
  • the coordinates in the coordinate system are represented by (S, T), and the V coordinate threshold is determined based on the V coordinate of the texel with the largest V coordinate among the Kakimi texels.
  • this image processing unit is a coordinate calculation means for mapping the pixel coordinates (X, ⁇ ) in the first coordinate system to the second coordinate system and obtaining the pixel coordinates (U, V).
  • the pixel coordinates (U, V) of the pixel where the V coordinate of the pixel is equal to or less than the ffllBV coordinate threshold is the coordinates (S, T) of the tiff pixel in the third coordinate system, and the pixel V coordinate is edited.
  • the coordinates (U, V) of each disgusting pixel are rotated by 180 degrees and the coordinates of the disgusting pixel in the third coordinate system (S, T)
  • the texture is divided into two at the boundary of the V coordinate threshold, and the intercept with the larger V coordinate is moved to 1 ⁇ 80 degrees ⁇ 3 ⁇ 4 and is stored in the appropriate position from the beginning. You can read out the techsenator. ,
  • the coordinate conversion means performs texture repetitive mapping. Regardless of whether the V coordinate of the edited pixel is equal to or less than the V coordinate threshold, the upper 4 M bits of the U coordinate (M is 1). The value obtained by replacing the above :) with “0” is the S-coordinate of the objection pixel, and the value obtained by replacing the upper N bits of V-coordinate (N is more than 1) with “0” is the T-coordinate of the editing pixel.
  • the coordinates (u, V) of each rfB pixel in the second coordinate system of Fujimi are converted to the coordinates (S, T) of each tina pixel in the third coordinate system of Kamiki.
  • the texture storing method includes a step of dividing a texture mapped to a polygonal graphic element into a plurality of segments, and an aspect in which the texture is mapped to the graphic element. At least in the first two-dimensional texel space arranged in
  • an image device is an image device for generating an image to be displayed on a screen, which is composed of a plurality of graphic elements, and is mapped to an ffilB graphic element.
  • Data request means for making a request for reading texture data from an external memory card
  • texture buffer means for temporarily storing texture data read from the nut memory
  • an area for the texture buffer means Divide and start drawing newly ⁇
  • To store the texture data mapped to the graphic element assign the area according to the size of the texture data and map it to the edited graphic element
  • a texture buffer managing means for releasing the area storing the texture data, and According to this configuration, the texture data is temporarily stored in the texture buffer means rather than being read from the external memory (for example, equivalent to the external memory 50 in FIG.
  • tirf multiple graphics elements are placed in a polygonal Daraffic element and a frame of the screen to represent the shape of each surface of the 3D solid in 2D space.
  • the self texture buffer management means stores only a part of the texture data as a storage area for texture data mapped to the selfish rectangular graphic elements.
  • a possible size is allocated, and a size in which the entire texture data can be stored is allocated as an! ⁇ Inside area of the texture data mapped to the polygonal shape Darling element.
  • Fujimi data requesting means requests texture data to be mapped in partial units as drawing progresses, when texture data mapped to a rectangular graphic element is required.
  • texture data mapped to a rectangular graphic element is required.
  • ttrlE polygonal graphic elements the entire texture data to be mapped is requested at once.
  • tiilB texture buffer management means The tins texture buffer means is managed using a plurality of structure instances that manage each area of the means.
  • multiple structure instances are divided into multiple groups according to the size of the area to be managed, and the previous 13 ⁇ 4 structure instance in the gnole is linked in a ring shape. Has been. -According to this configuration, it is possible to easily search for the structure instance, and thus each area of the texture buffer means.
  • This image «apparatus further includes a structural thoracicizing means for setting all object structure instances to initial values.
  • the fragmentation of the area of the texture buffer means can be eliminated.
  • it can be achieved with a circuit scale smaller than general garbage collection, and the processing time is short.
  • it is a process for drawing graphic elements, if the entire texture buffer means is initialized every time one video frame or one finale drawing power is completed, there is no problem in the drawing process. Les.
  • This image generating apparatus further includes a control register for setting an interval for accessing the tirtss structure instance in order to set the unrecognized structure instance to an initial value by the ⁇ ⁇ »constructing paste sizing means, and tin self-control
  • the registers can be accessed from the outside.
  • control register can be accessed from the outside, and the interval for access by the structural sizing means can be set freely, so that the initialization process can be performed without causing a decrease in the performance of the entire system.
  • New For example, if a structure array is provided on the ⁇ memory: ⁇ , access from the structural thoracing means is concentrated in time, the latency of access to the shared memory from other functional units May increase and reduce overall system performance.
  • the texture buffer means can be configured in arbitrary positions and / or sizes on the memory provided by the knitting self image generation apparatus and the external function unit. In this way, the texture buffer means can be set freely on the memory and in size, so that the area required for other functions may be reduced when the texture buffer area required is small. Can be used. Brief Description of Drawings
  • FIG. 1 is a block diagram showing an internal configuration of the multimedia processor 1 according to the embodiment of the present invention.
  • FIG. 2 is a block diagram showing the internal configuration of the RPU 9 of FIG. -Fig. 3 is a diagram showing the structure of the polygon structure in texture mapping mode.
  • FIG. 4 is a diagram showing the structure of the texture attribute structure.
  • FIG. 5 is a diagram showing a configuration of a polygon structure in the goursiiding mode.
  • Fig. 6 (a) is a diagram showing the configuration of the sprite structure when scissoring is disabled.
  • Figure 6 (b) shows the configuration of the sprite structure when scissoring is enabled.
  • FIG. 7 is an explanatory diagram of input / output signals of the merge sorter 106 of FIG.
  • FIG. 8 is an explanatory diagram of input / output signals of the vertex expander 116 of FIG.
  • FIG. 9 is an explanatory diagram for calculating the sprite vertex parameters.
  • FIG. 10 is an explanatory diagram of input / output signals of the vertex sorter 114 of FIG.
  • FIG. 11 is an explanatory diagram for calculating the vertex parameter of the polygon.
  • FIG. 12 is an explanatory diagram of polygon vertex sort processing.
  • FIG. 13 is a diagram showing a configuration of polygon / sprite common data CI.
  • FIG. 14 is an explanatory diagram of processing for the polygon in the Gouraud shading mode by the slicer 118 of FIG.
  • FIG. 15 is an explanatory diagram of processing for the polygon in the texture mapping mode by the slicer 118 of FIG. '
  • FIG. 16 is an explanatory diagram of processing for the sprite by the slicer 118 of FIG.
  • FIG. 17 is an explanatory diagram of bilinear filtering by the bilinear filter 130 of FIG.
  • FIG. 18 (a) is an example of a texture arranged in the ST space when iterative mapping is performed.
  • FIG. 18 (b) is an illustration of textures mapped to polygons arranged in the UV space when repeated mapping is performed.
  • FIG. 18 (c) is an illustration of drawing polygons in the XY space mapped with the texture force S repeatedly.
  • Fig. 19 (a) is an example of the texture mapped to the polygon placed in the ST space when the polygon structure member MAP is "0".
  • Figure 19 (b) shows the polygon structure. This is an example of texture mapped to a polygon placed in ST space where the structure member MAP is “1”. '
  • FIG. 20 is a view showing an example of textures mapped to splices arranged in the ST space.
  • FIG. 21 (a) is an explanatory diagram of a texel block stored in one memory word when the member MAP of the polygon structure is “0”.
  • Figure 21 (b) shows member M of the polygon structure.
  • FIG. 21 (c) is an explanatory diagram of the storage state of texel blocks in one memory card.
  • FIG. 22 is a block diagram showing an internal configuration of the texel mapper 124 of FIG.
  • FIG. 23 is a block diagram showing an internal configuration of the texel address calculation unit 40 in FIG. 'Fig. 24 is an explanatory diagram of bilinear fine lettering when texture pattern data is divided and stored.
  • FIG. 25 (a) is a diagram showing the configuration of the boss MCB structure.
  • FIG. 25 (b) is a diagram showing the configuration of a general MCB structure. '
  • FIG. 26 is an explanatory diagram of the size of the texture buffer area managed by the boss MCB structure instance [0] to [7].
  • FIG. 27 is a diagram showing initial values of the boss MCB structure instances [0] to [7].
  • FIG. 28 is a diagram showing initial values of general MCB structure instances [8] to [: 127].
  • FIG. 29 is a list of RPU control registers related to the memory manager 140 of FIG.
  • FIG. 30 is a flowchart showing a part of the flow of texture buffer area acquisition processing.
  • FIG. 31 is a flowchart showing another part of the flow of the texture buffer area acquisition process.
  • FIG. 32 is a flowchart showing the flow of texture buffer area release processing.
  • FIG. 33 is a diagram showing the chain structure of the boss MCB structure instance and the general MCB structure instance force S newly inserted in the boss MCB structure instance chain and ij ⁇ .
  • FIG. 1 is a block diagram showing the internal configuration of the multimedia processor 1 according to the embodiment of the present invention. As shown in Fig.
  • this multimedia processor has an external memory interface 3, DMAC direct memory access controller (4), central processing unit (hereinafter referred to as “CPU”) 5, CPU local RAM 7, rendering Processing Unit (hereinafter referred to as “RPU”) 9, Color Palette RAMI 1, Sound Processing Unit (hereinafter referred to as “SPU”) 13, SPU Local RAMI 5, Geometric Engine (hereinafter referred to as “RPU”) (Referred to as “GE”) 17.
  • Y sorting unit hereinafter referred to as “-YSU”) 19.
  • External interface block 21 main RAM access arbiter 23, main RAM 25, IZO bus 27, video DAC (digitaltoana) logc onverter) 29, audio DAC block 31, and A / D converter (hereinafter referred to as “ADC”) 33.
  • ADC A / D converter
  • the C P U 5 uses a program stored in the memory MEM to control various operations and the entire system.
  • the CPU 5 can also request the DMA C4 for program and data, or fetch the program code directly from the external memory 50 through the external memory interface 3 and the external bus 51 without going through the DMAC4. Data access can also be performed directly on the external memory 50.
  • the I / O bus 27 is a system control bus that uses the CPU 5 as a bus master, and is a functional unit that is a bus slave (external memory interface 3, DMAC4, RPU9, SPU13, GE17, YSU19, external interface block 21, and Used to access ADC33) control registers and local RAM7,11,15. In this way, these functional units are controlled by the CPU 5 through the I / O bus 27.
  • a bus slave external memory interface 3, DMAC4, RPU9, SPU13, GE17, YSU19, external interface block 21, and Used to access ADC33
  • CPU local RAM 7 is dedicated to CPU 5, and is used as a stack area for saving data during subroutine calls and interrupts, and as an internal area for variables handled only by CPU 5.
  • RPU 9 which is one of the features of the present invention, generates a three-dimensional image composed of polygons and splices in real time. Specifically, the RPU 9 reads each structure instance of the polygon structure array and each structure instance of the sprite structure array sorted by YSU19 from the main RAM 25, and performs predetermined processing. The image is displayed for each horizontal line according to the screen (display screen) scan. The generated image is converted into a data stream representing the composite video signal waveform and output to the video DAC 29. In addition, RPU9 receives polygon and sprite texture pattern data from DMAC4. It has a function to make a DMA transfer request for loading.
  • Texture pattern data is two-dimensional pixel data that is pasted on a polygon or sprite. Each pixel data is part of the information for designating an entry in the color palette RAMI1.
  • the texture pattern data pixels are referred to as “texels” and are used separately from the “pixels” that indicate the pixels that make up the image displayed on the screen. Therefore, the texture pattern data is a set of texel data.
  • the polygon structure array is a structure array for polygons that are polygonal graphic elements
  • the sprite structure array is a structure array for sprites that are rectangular graphic elements with 5 Pfi on the screen.
  • the elements of the polygon structure array are called “polygon structure instances”, and the elements of the sprite structure array are called “sprite structure instances”. However, when there is no need to explain the two separately, they are sometimes simply called “structure instances”.
  • Each polygon instance stored in the polygon structure column contains display information for each polygon (vertex coordinates on the screen, information on the texture pattern in the texture mapping mode, and color data in the goo shading mode) (Including RGB color components)) and one polygon structure instance corresponds to one polygon.
  • Each sprite structure instance stored in the sprite structure array is display information for each sprite (including information on the coordinates and texture pattern on the screen), and one sprite structure instance has one splice. It corresponds.
  • Video DAC 29 is a digital / analog converter for generating analog video signals.
  • the video DAC 29 converts the data stream input from the RPU 9 into an analog composite video signal, and outputs it to a video signal output terminal (not shown), a tele, a vision monitor, etc. (not shown).
  • the color palette RAMI 1 comprises a color palette of 512 colors, that is, 512 entries in this embodiment.
  • RPU9 uses the color palette RAMI 1 as a part of the index to specify the entry of the color palette.
  • the texture pattern data is the color data (RGB color component). Convert to.
  • the SPU 13 generates PCM (pulse demodulation) waveform data (hereinafter referred to as “wave data”), amplitude data, and main volume data. Specifically, SPU 13 time-division multiplexes the wave data for up to 64 channels, generates envelope data for up to 64 channels, and multiplies the channel data with the amplifier data. B3 ⁇ 4% multiplexing of rich data. And SPU13 Main volume data, time division multiplexed wave data, and time division multiplexed amplitude data are output to the audio DAC block 31. In addition, the SPU 13 has a function of making a DMA transfer request to the DMAC 4 for capturing wave data and envelope data.
  • PCM pulse demodulation waveform data
  • the audio DAC block 31 converts the wave data, the amplitude data, and the main volume data input from the SPU 13 into analog signals, and analog-multiplies the result to produce an analog audio signal.
  • This analog audio signal is output to an audio input terminal (not shown) of an audio signal output »(shown 3 ⁇ 4rf) force television monitor or the like (figure rf).
  • the SPU local RAMI 5 stores parameters used when the SPU 13 performs wave reproduction and envelope generation (for example, storage address and pitch information of wave data and envelope data).
  • GE17 uses HfrT to perform an apologetic operation to display a 3D image. Specifically, GE17 performs operations such as matrix product, vector affine transformation, vector orthogonal transformation, perspective transformation, vertex brightness / polygon brightness calculation (beta inner product), and polygon back force ring processing (beta outer product). .
  • the YSU 19 sorts the structure instances of the polygon structure array stored in the main RAM 25 and the structure instances of the sprite structure array according to the sort rules 1 to 4. This sorting is performed separately for the polygon structure array and the sprite structure array.
  • a secondary coordinate system used for actual display on a display device such as a television monitor is called a screen coordinate system.
  • the screen coordinate system is composed of a two-dimensional Pixeno H self-array of 2048 pixels in the horizontal direction and 1024 pixels in the vertical direction.
  • the coordinate origin is at the upper left, the right direction corresponds to the positive X axis, and the lower direction corresponds to the positive Y axis.
  • the actual displayed area is a part of the screen coordinate system, not the entire space. This display area is called a screen.
  • the Y coordinate in sorting rules 1 to 4 is a value in the screen coordinate system. Sortno!
  • ⁇ 1 is to arrange each polygon structure instance in ascending order of minimum Y coordinate.
  • the minimum Y coordinate is the smallest Y coordinate among the Y coordinates of the three vertices of the polygon.
  • Sort No.2 is to arrange each polygon structure instance in descending order of depth value for multiple polygons with the same minimum Y coordinate.
  • YSU19 does not support multiple polygons with pixels displayed on the first line of the screen. Even if the minimum Y-coordinates are different, it is assumed that they are the same and sorts each polygon structure instance according to sort node 2 instead of sort node! In other words, if there are multiple polygons with pixels displayed on the first line of the screen, the minimum Y coordinate is assumed to be the same, and the depth values are sorted in order, this is Sort Rule 3 It is.
  • sort rules 1 to 3 are applied. However, in order to display odd fields, the minimum Y coordinate of the polygon displayed on the odd lines and / or the odd lines are displayed. The minimum Y coordinate of the polygon displayed on the previous even line is assumed to be the same, and sorting is performed according to Sort Rule 2. However, the first odd line is excluded because the previous even number is even. On the other hand, in the sort for displaying even-numbered text, the minimum Y coordinate of the polygon displayed on the even line and / or the odd line before the ⁇ line is displayed. It is assumed that the minimum coordinates of the polygons are the same, and the sorting is performed with the saw I. This is the sorting rule 4.
  • Sort notes 1 to 4 related to the split are the same as the sort numbers 1 to 4 related to the polygon, respectively.
  • the minimum Y coordinate of the sprite is the smallest Y coordinate among the Y coordinates of the four vertices of the sprite.
  • the external memory interface 3 is responsible for reading data from the external memory 50 and writing data to the external memory 50 via the external bus 51.
  • This external memory interface 3 generates external bus access request factors from the CPU 5 and DMAC 4 (factors requesting access to the partial bus 51) according to the EBI priority table (not shown). Select one of the external bus access request factors. Then, access to the external bus 51 is permitted for the selected external bus access request factor.
  • the E B I priority table is a table that defines the priorities of external bus request factors of multiple types from C P U 5 and external bus request factors of DM A C 4 force.
  • the DMAC 4 performs DMA transfer between the main RAM 25 and the external memory 50 connected to the external bus 51.
  • DMAC 4 arbitrates the DMA3 ⁇ 43 ⁇ 4 request factors (factors that require DMA) of CPU 5, RPU 9, and SPU 1 3 according to the DMA priority table (not shown). Select one DMA request factor. Then, a DMA request is made to the external memory interface 3.
  • the DMA priority fe) jet position table is a table that defines the priority order of the DMA request factors from C P U 5, R P U 9, and S P U 13.
  • the external interface block 21 is an interface with the peripheral device 54 and includes 24 channels of programmable digital input / output (I / O) ports. 2 4 channels 1 0 Each channel includes a mouse interface function for 4 channels, a light gun interface function for 4 channels, a general-purpose timer / counter for 2 channels, an asynchronous serial interface function for 1 channel, and a channel for 1 channel. Internally connected to one or more of the general-purpose parallel Z serial conversion port functions.
  • 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 arbitrates access requests to the main RAM 25 from the functional units (CPU5, RPU9, GE17, YSU 19, DMA C 4, and external interface block 21 (general-purpose parallel Z serial conversion port)). Then, grant access permission to either functional unit.
  • the main RAM 25 is used as a work area, variable TO area, and virtual memory management area of CPU 5.
  • the main RAM 25 is a storage area for the data that the CPU 5 passes to other functional units, and the RPU9 and SPU13 receive data from the external memory 50 via DMA, m ⁇ m, GE17, and YSU19 input data and output. It is also used as a data storage area.
  • the external bus 51 is a bus for accessing the external memory 50. It is accessed via external memory interface 3 from CPU5 and DMA C4.
  • the data bus of the external bus 51 is composed of 16 bits and can accommodate an external memory 50 having a data bus width of 8 bits or 16 bits. External memories with different data bus widths can be connected at the same time, and the function of automatically switching the data bus width according to the external memory to be accessed is provided. '
  • FIG. 2 is a block diagram showing the internal configuration of the RPU 9 of FIG.
  • RPU9 is, RPU in the main RAM access arbiter 100, the polygon pre Fe Tsuchiya 102, Supra I Topurifetsuchiya 104, Majisota 106, prefetch buffers 108, Risaikunore carbonochloridate Ffa 110, Depusukonha 0 regulator 112, carbonochloridate chromatography tex sorter 114 , Nokutech Spanda 116, Slicer 118, Pixelo Stetcha ° 120, Pixelaiza 122, Tecnore Matsuno ° 124, Texture Cache Block 126, Bilinear Fineleta 130, Color Blender 132, Line Buffer Block 134, Video Includes encoder 136, video timing generator 138, memory manager 140, and DMAC interface 142.
  • Line buffer block 134 is a line buffer corresponding to one horizontal line of the screen. Includes LB 1 and LB 2.
  • the memory manager 140 includes an MCB initializer 141.
  • 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 pre-fetcher 102, the sprite pre-fetcher 104, and the memory manager 140, and grants the access request permission to any of them.
  • the permitted access request is output to the main RAM access arbiter 23, and arbitration is performed between the access request and other function units in the multimedia processor 1.
  • the polygon prefetcher 102 fetches each polygon structure instance after sorting by the YSU 19 from the main RAM 25.
  • the polygon pre-fetcher 102 is input from the YSU 19 with a no-degree PPL force S.
  • the polygon prefetcher 102 can acquire a polygon structure instance each time a source of one polygon structure instance is determined without waiting for completion of sorting of all the polygon structure instances. As a result, polygon structure instances for the frame can be sorted while the frame is displayed. In addition, the correct drawing result can be obtained by performing interlace scanning and sorting for the field while the field is displayed. It should be noted that the polygon pre-fetcher 102 can know the switching of the frame and the fine red from the vertical scanning count signal V from the video timing generator 138.
  • the sprite prefetcher 104 fetches each sprite structure instance after sorting by the YSU 19 from the main RAM 25.
  • the sprite prefetcher 104 receives a pulse SPL from the YSU 19.
  • YSU19 outputs a pulse SPL whenever the sorting of one sprite structure instance is confirmed. Therefore, the sprite prefetcher 104 can know how many sprite structure instances of the sprite structure instances in the sprite structure array have been completed.
  • the sprite prefetcher 104 can acquire a sprite structure instance each time, without waiting for the completion of sorting of all sprite structure instances, to determine the sorter of one sprite structure instance. As a result, the sprite structure instances for that frame can be sorted while the frame is displayed. In addition, You can get a correct drawing result even if you sort for the field while the field is displayed. Note that the sprite prefetcher 104 can know the frame and field switching from the vertical count signal V from the video timing generator 138.
  • the polygon is a triangle.
  • -Fig. 3 is a diagram showing the structure of the polygon structure in texture mapping mode. As shown in FIG. 3, in this embodiment, this polygon structure is composed of 128 bits.
  • the member Type of this polygon structure indicates the polygon drawing mode, and is set to “0” for polygons in texture mapping mode.
  • Members Ay, Ax, By, Bx, Ji and are respectively the Y coordinate of vertex A, the X coordinate of vertex A, the Y coordinate of vertex B, the X coordinate of vertex B, the Y coordinate of vertex C, and Indicates the X coordinate of TI point C.
  • These Y and X coordinates are values in the screen coordinate system.
  • Members Ta ttri bu te, Map, Filter, De pth, and V ⁇ ewp ort are either texture attribute structure index, texture pattern data format ⁇ 1
  • Depth value (sometimes called “display depth information”) is information that shows which pixel is drawn first when the pixels of the drawing overlap. ) It is drawn, and the smaller the value, the later it is drawn. Scissoring will not display polygons and / or sprites that are outside the specified viewport, and will not cut out and display the portion of the polygon and / or sprite that protrudes from the viewport. It is a function to do.
  • One polygon is defined by the instance (value assigned to the polygon structure) of one polygon structure.
  • FIG. 4 is a diagram showing the structure of the texture attribute structure.
  • this texture attribute structure is composed of 32 bits.
  • this Texture attribute structure members dth, He ight, M, N,: 8 1 and? a 1 ette is a value that is “1” smaller than the texture width (unit: texel), “1” smaller than the texture height (unit: texel), and “Wi dth”
  • the 512 color entries in the color palette are divided into blocks according to the selected color mode, and the member Pa 1 ette indicates the palette block to be used.
  • -One texture attribute structure instance is not prepared for each drawing polygon, but 64 texture attribute structure instances are all polygon structure instances and all sprite structures in texture mapping mode. Shared in the instance.
  • FIG. 5 is a diagram showing a configuration of a polygon structure in the goursiiding mode. As shown in FIG. 5, in this embodiment, this polygon structure is composed of 128 bits.
  • This polygon structure member T y p e indicates the polygon drawing mode, and is set to “1” for polygons in Gourauding mode.
  • Members Ay, Ax, By, Bx, Cy and Cx are the polygon's Y coordinate of vertex A, X coordinate of vertex A, Y coordinate of vertex B, X coordinate of vertex B, Y coordinate of vertex C, Shows the X coordinate of point C. These Y and X coordinates are values in the screen coordinate system.
  • Members Ac, Be, and Cc are the polygon's vertex A color data (RGB 5 bits each), vertex B color data (RGB 5 bits each), and point C color data (RGB 5 bits each). Indicates.
  • the members D e tp h, V i ewp o rt and N a 1 p h a indicate depth value, scissoring viewport specification information, and alpha blending (1 c), respectively.
  • (11 ⁇ ) indicates transparency, “000 number” force S transparency 0%, that is, completely opaque, “111 (binary)” force; transparency 87.5%.
  • One polygon is defined by the instance (value assigned to the polygon structure) of one polygon structure.
  • FIG. 6 (a) is a diagram showing a configuration of a sprite structure at the time of scissoring disable
  • FIG. 6 (b) is a diagram showing a configuration of a sprite structure at the time of scissoring enable.
  • the sub-bright structure when scissoring is disabled is composed of 64 bits.
  • the members Ax and Ay of this sprite structure are the upper left of the sprite respectively.
  • Indicates the X and Y coordinates. These ⁇ and X coordinates are values in the screen coordinate system.
  • Members D epth, F l 1 ter, and Tattr ⁇ bute indicate the depth value, filtering mode (bilinear filtering or two neighbors), and the index of the texture attribute structure, respectively.
  • Members Z oo mX, Z oo mY, and T se gm ent respectively indicate the sprite enlargement ratio in the x-axis direction, the sprite enlargement ratio (enlargement ratio) in the ⁇ -axis direction, and the standing information of texture pattern data.
  • the sprite structure when scissoring is enabled is composed of 64 bits.
  • the members Ax and Ay of this sprite structure indicate the X and Y coordinates at the upper left of the sprite, respectively. These Y and X coordinates are values in the screen coordinate system.
  • the members Depth, Scissor, Viewort, Filter and TatrtrB are the depth value, scissoring application flag, scissoring viewport designation information, filtering mode (biliary filtering or -alest neighbor), and Indicates the index of the texture attribute structure.
  • Members Z oo mX, Z oo mY, and T se gme nt are respectively the sprite enlargement rate (leakage rate) in the X-axis direction, sprite enlargement rate (leakage rate) in the Y-axis direction, and texture pattern data 3 ⁇ 4 ⁇ Position information.
  • the depth value is 1 bit fewer, but when scissoring is enabled, 1 bit “0” is added to the LSB side of the depth value that is TO in the structure by texel mapper 124 described later. It is treated as an 8-bit depth value in the same way as when disabled.
  • the above is the contents of each member of the sprite structure when scissoring is disabled and when scissoring is enabled.
  • One sprite is defined by one sprite structure instance (value assigned to the sprite structure).
  • the structure of the sprite texture attribute structure is the same as that of the polygon texture attribute structure in Figure 4.
  • One instance of the texture attribute structure is not prepared for each drawing sprite, but 64 texture attribute structure instances are included in all polygon structure instances and all sprite structure instances in texture mapping mode. Shared.
  • the merge sorter 1 0 6 has a polygon structure instance and an accompanying texture attribute structure instance, and a sprite structure instance and a polygon structure 1 0 2 and a sprite preset 1 0 4, respectively. It receives the texture attribute structure instance that accompanies it, and sorts 1 to 4 described later, similar to the sorts 1 to 4 described above by YSU 19 (hereinafter referred to as “merge sorts 1 to 4”). According to, merge sort is performed and the result is sent to the prefetch buffer 1 0 8.
  • each of the polygo / «structure instances and sprite structure instances is already arranged by YSU 19 in the drawing process SJI1I based on the sort rules 1-4. Les. Details of the merge sorter 1 0 6 will be described below.
  • FIG. 7 is an explanatory diagram of input / output signals of the merge sorter 106 in FIG.
  • polygon prefetcher 1 0 2 includes a polygon valid bit register 60, a polygon buffer 6 2, and a polygon attribute buffer 6 4.
  • the sprite prefetcher 104 includes a sprite valid bit register 66, a sprite buffer 68, and a sprite attribute buffer 70. .
  • the polygon valid bit register 60 sets the polygon ⁇ 3 ⁇ 4) bit (1 bit) indicating the valid (1) / invalid (0) of the polygon structure instance to Wl.
  • the polygon buffer 62 stores the polygon structure instance (1 2 8 bits) generated by the main RAM 25 5 pages.
  • the polygon attribute buffer 64 stores the texture attribute structure instance (3 2 bits) for the polygon from the main RAM 25.
  • the sprite valid bit register 66 stores a sprite valid bit (1 bit) indicating valid (1) or invalid (0) of the sprite structure instance.
  • the sprite buffer 68 stores the sprite structure instance (64 bits) created by the main RAM 25.
  • the sprite attribute buffer 70 stores the text attribute structure instance (3 2 bits) for the sprite that has been removed from the main RAM 25.
  • Video timing generator 1 3 8 The upper line number of the display area given by the power ⁇
  • the symbol L N indicates the horizontal line number (that is, the top line number of the screen) at which R P U 9 starts drawing polygons and / or splices. This value L N is set by the C P U 5 in the table rare area J ⁇ line control register (illustration ⁇ 3 ⁇ 4 ⁇ ) provided in R P U 9.
  • Video timing generator 1 3 8 Interlace ⁇ Noninterlace f glj signal INI indicates whether the current rendering process in RPU 9 is for interlace scan or non-interlace scan. This value INI is determined by CPU 5 and RPU 9 Set to 1 bit in the RPU control register (not shown).
  • Video timing generator 1 3 8 Odd / even field mSiJ signal OEI indicates whether the field currently being drawn is odd or even.
  • Merge sorter 1 0 6 has prefetch buffer 1 0 8, polygon sprite data PSD, texture attribute structure instance TA I, and polygon / sprite identification signal? Output SI.
  • the polygon / sprite data PSD (1 2 8 bits) is either a polygon structure instance or a sprite structure instance.
  • the polygon / sprite data PSD is an instance of a sprite structure ⁇ indicates that the data is packed from the LSB, and the upper 64 bits indicate “0”.
  • the depth value (12 bits) of the polygon structure instance and the depth value (8 bits) of the sprite structure instance differ in the number of bits. “0” is concatenated to the LSB side of the depth value of, and is aligned to the same number of bits (12 bits) as the depth value of the polygon structure instance. However, the depth value aligned to 12 bits is not output to the subsequent stage.
  • the texture attribute structure instance TA I (32 bits) is the texture attribute structure instance attached to the instance when the polygon // split data PSD is a polygon structure instance, and the polygon split data PSD is 3 ⁇ 4 ⁇ of a light structure instance is a texture attribute structure instance attached to the instance.
  • the polygon sprite data PSD is a polygon structure instance in Gourauding mode ⁇ ⁇ texture attribute structure instance is not attached, the value of this signal T A I is all “0”.
  • Polygon Z sprite ⁇ gij signal PSI is a signal indicating whether the polygon / sprite data PSD is a polygon structure instance or a sprite structure instance.
  • the merge sorter 1 0 6 first checks the polygon valid bit held in the polygon valid bit register 60 and the sprite valid bit held in the sprite valid bit register 66. When both the polygon valid bit and the sprite valid bit are “0 (invalid)”, the merge sorter 1 0 6 uses the polygon prefetcher 1 0 2 buffers 6 2 and 6 4 and the sprite prefetcher 1. 0 4 Buffers 6 8 and 7 0 Do not get data from force.
  • the merge sorter 1 0 6 is the value of either the polygon valid bit or the sprite valid bit “1 (valid)” 3 ⁇ 4 ⁇ indicates the buffer 6 2 and 6 4 or 6 8 Data is acquired from 70, polygon Z sprite data PSD and texture attribute structure. Output to prefetch buffer 1 0 8 as structure instance TA I.
  • the merge sorter 1 0 6 uses the polygon sorter 1 0 2 buffers 6 2 and 6 4 according to the merge sort rules 1 to 4 described below.
  • data is acquired from the buffers 6 8 and 70 of the sprite pre-fetcher 10 4 and output to the prefetch buffer 1 0 8 as the polygon / sprite data PSD and texture attribute structure instance TA I.
  • Details of the merge sort rules 1 to 4 are as follows. -First, ij ⁇ where the interlace / non-interlace adjustment signal I NI given by the video timing generator 1 3 8 indicates noninterlace will be explained.
  • Merge sorter 1 0 6 is the smallest value among the three vertex Y coordinates (A y, B y, C y) contained in the polygon structure instance, and the Y coordinate (A y) contained in the sprite structure instance. Compare the and, and select the polygon structure instance or the sprite structure instance that appears earlier in the drawing process (that is, the one with the smaller Y coordinate) (Merge rule 1 YSU 1 9 Sort rule 1 Equivalent).
  • the Y coordinate is a value in the screen coordinate system.
  • the merge sorter 1 0 6 uses the depth value D epth contained in the polygo: / «structure instance and the depth value D epth contained in the sprite structure instance. , And select the polygon structure instance or sprite structure instance that has the larger depth value (that is, the one that is drawn more deeply) (Sort / Rail 2 by merge sort 2 2 YSU 1 9) Equivalent).
  • the ratio is changed.
  • the merge sorter 1 0 6 sets the Y coordinate value to the display area top line number ⁇ ⁇ symbol LN. Replace with the corresponding Y coordinate value (merge sort ⁇ ⁇ Nore 3 ⁇ Equivalent to Sort Ul 3 by YSU 19) and perform merge sort according to Merge Sort Norre 1 and 2.
  • an interlace non-interlace recognition signal INI indicates an interlace.
  • the merge sorter 1 0 6 discriminates the field to be displayed from the odd-numbered Finored Z even-numbered Finored mgiJ signal OEI, and the Y coordinate value corresponding to the horizontal line that is not drawn in that Finored corresponds to the next horizontal line.
  • the above merge sort rule is not required to 3
  • prefetch buffer 1 0 8 is merge sorter 1 0 6 after merge sort
  • This is a FI FO (first—infirst—out) structure buffer that sequentially reads the structure instances (that is, polygon Z sprite data PSD and texture attribute structure instance TAI) and outputs the structure instances in the order of loading. is there.
  • the structure instance is stored in the prefetch buffer 108 with a jet number (which is arranged by the merge sorter 106).
  • the stored structure instances are then output in the order they are stored in the drawing cycle for the corresponding polygon or sprite display.
  • the prefetch buffer 108 can know the horizontal line being drawn from the vertical scanning count signal VC force from the video timing generator 138.
  • the prefetch buffer 108 can physically match the recycle buffer 110 and includes the number of entries in the recycle buffer 110 (128 bits + 32 bits) XI There are 28 entries.
  • the polygon Z sprite identification signal PSI is replaced with the 79th bit blank bit of the polygon Z sprite data PSD. '
  • the recycle buffer 110 is also used in the next drawing cycle (that is, it can be reused).
  • the FI FO structure that cranes structure instances that is, polygon sprite data PSD and texture attribute structure instance TAI). Buffer. 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 horizontal line. That is, one drawing cycle is a period in which all data necessary for displaying the corresponding horizontal line is drawn in either the line buffer LB 1 or LB 2.
  • the recycle buffer 110 can physically buffer the prefetch buffer 108, including the number of entries of the prefetch buffer 108 (128 bits + 32 bits) XI 2 8 entries And '
  • the depth comparator 112 compares the depth value contained in the first structure instance of the prefix etch buffer 108 with the depth value contained in the first structure instance of the recycle buffer 110 to obtain a larger depth value.
  • the structure instance that has (that is, should be displayed deeper) is selected and output to the subsequent stage.
  • the depth comparator 112 outputs 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.
  • the depth comparator 112 outputs the selected structure instance to the slicer 118.
  • the depth comparator 112 can know the horizontal line being drawn from the vertical scanning count signal VC from the video timing generator 138. That is, drawing cycle You can know the switching of
  • the structure instance selected by the depth comparator 112 is also used in the next drawing cycle (that is, used for drawing the next horizontal line).
  • the body instance is output to the recycle buffer 110 and written.
  • the structure instance selected by the depth comparator 112 is not used in the next drawing cycle (that is, not used for drawing the next horizontal line), it is not written to the recycle buffer 110. Therefore, the structure instance used for drawing the current line and the structure instance used for drawing the next line are stored in the recycle buffer 110 in the drawing order of the current line and the drawing order of the line.
  • FIG. 8 is an explanatory diagram of input / output signals of the vertex expander 116 of FIG.
  • the polygon Z sprite data PSD size included in the structure instance output from the depth comparator 112 is 128 bits, but the polygon / sprite data PSD input to the vertex expander 116 is a sprite structure instance. Therefore, only the lower 64 bits of 128-bit polygon Z sprite data PSD are input.
  • the vertex expander 116 includes the top left vertex coordinates (Ax, Ay) of the sprite structure instance included in the received sprite structure instance, the zoom factor Z o omY in the Y axis direction, and the X axis.
  • Magnification factor Z oomX, and texture pattern structure instance attached to the sprite structure instance “1” smaller than the width of the texture pattern, ⁇ [SWi dth and height 1 ”Based on the small height, calculate the coordinates of the vertex of the splice (XY coordinates in the screen coordinate system and UV coordinates in the UV coordinate system), and output to the slicer 118 as polygon sblito common data CI .
  • the screen coordinate system is as follows.
  • the UV coordinate system is a two-dimensional orthogonal coordinate system in which texture pattern data is arranged. The details of the calculation of the parameters (XYUV coordinates) of the vertices of the sprite are described below.
  • FIG. 9 is an explanatory diagram for calculating the sprite vertex parameters.
  • Figure 9 (a) illustrates the sprite texture pattern data (character A) in the UV space.
  • one small rectangle represents one texel.
  • the UV coordinate in the upper left corner indicates the position of that texel.
  • the texture width (the number of texenoles in the horizontal direction) is “Wi dt h + l” and the texture height is “He i gh t + l”
  • the upper left, upper right, and lower left of the texture The sprite texture pattern data is stored in the UV space so that the UV coordinates of each item point are (0, 0), (W idth + 1, 0), and (0, Heigh t + 1). Be placed.
  • “Wi dt” and “He l gh t” values are the values stored in the texture attribute structure Menno Width and Height. That is, these members store the texture width and height, one less than the height and height.
  • Figure 9 (b) shows an example of sprite drawing in XY space.
  • one small rectangle consists of a set of pixels and corresponds to one texel in Fig. 9 (a).
  • the top left, top right, and bottom left vertices of the sprite are treated as vertex 0, vertex and T page point 2, respectively.
  • each vertex is treated as Vertex 0, Vertex 1, and II point 2 from the earliest appearance at the time of drawing.
  • Vertex 0 is as follows.
  • Ax and Ay are values stored in members “Ax” and “A y” of the sprite structure instance, respectively.
  • the values of the sprite structure instance members “Ax” and “A y” are the X and Y coordinates of vertex 0 of the sprite.
  • Vertex 1 is as follows.
  • the vertex expander 116 outputs the calculation result, that is, the XYUV coordinates of the vertices 0 to 2 to the slicer 118 as polygon Z sprite common data CI.
  • the structure (format) of the polygon / sprite common data C I output from the vertex expander 116 is the same as the structure (format) of the polygon sprite common data C I output from the vertex sorter 114.
  • FIG. 10 is an explanatory diagram of input / output signals of the vertex sorter 114 of FIG.
  • the vertex sorter 114 receives the polygonal vertex parameters (XY UV coordinates, perspective correction parameters, and color data) from the received polygon structure instance and the accompanying texture attribute structure instance. ) Is obtained and calculated, and the parameters of each vertex are arranged in ascending order of the coordinates and output to the slicer 118 as polygon / sprite common data CI. Details of the parameter calculation of the vertex of the polygon will be described below. First, I will explain about polygons that are subject to texture mapping.
  • FIG. 11 is an explanatory diagram for calculating the vertex parameter of the polygon.
  • Figure 11 (a) shows polygon texture pattern data (character A) in the UV space.
  • character A polygon texture pattern data
  • one small rectangle represents one texel.
  • the UV coordinate in the upper left corner indicates the position of that texel.
  • the polygon is an example of a triangle.
  • one vertex is at (0, 0) in the UV coordinates and the remaining two vertices are They are placed on the U-axis and V-axis, respectively.
  • the texture width (number of texels in the horizontal direction) is “Wi dt h + l” and the height of the texture is “He i gh t + l”
  • the UV coordinates of the top left, top right, and bottom left vertices of the texture The polygon texture pattern data is arranged in the UV space so that is (0, 0), (Wi dt h + 1, 0), and (0, Heigh t + 1), respectively.
  • the values of “W idth” and “Height” are the values obtained from the Mentor V idth and Height of the texture attribute structure. That is, these members have a value that is one less than the width and height of the texture. Note that some of the texture data is folded back when it is stored in the memory ME, but the explanation is omitted here.
  • Figure 11 (b) shows an example of polygon drawing in XY space. In this figure, one small rectangle consists of a set of pixels and corresponds to one texel in Fig. 11 (a). Similarly, one small triangle consists of a set of pixels and corresponds to one texel in Fig. 11 (a).
  • the XY coordinates of the three vertices A, B, and C of the polygon are represented by (Ax, Ay), (Bx, By), and (Cx, Cy), respectively.
  • "Ax”, “Ay”, “Bx”, “By”, “Cx”, and “Cy” are the polygon structure instance members Ax, Ay, Bx, By, Cx, and Cy, respectively. This is the stored value.
  • the values of the polygon structure instance members Ax and Ay, the X and Y coordinates of the vertex A of the polygon, the values of the members Bx and By, the X and Y coordinates of the polygon vertex B, the members CX and The value of C y is the X and Y coordinates of vertex C of the polygon.
  • vertex A of the polygon is associated with (0, 0) of the UV coordinate in Figure 11 (a)
  • vertex B is associated with (Wi dth, 0) of the UV coordinate
  • vertex C is of the UV coordinate. Associated with (0, Height). Therefore, the vertex sorter 114 calculates the UV coordinates (Au y Av) (Bu, Bv), and (Cu, Cv) of the vertices A, B, and C in the same manner as the splice ⁇ . ,
  • Vertex A is as follows.
  • the vertex ⁇ is as follows.
  • Vertex C is as follows.
  • the Nortex sorter 114 performs perspective correction (perspective correction) on the UV coordinates (Au, Av), ( ⁇ u, ⁇ ), and (Cu, Cv) of the vertices A, B, and C.
  • the UV coordinates of vertices A, B, and C after applying selective collect are (Au-Aw, Av ⁇ Aw), (B u ⁇ Bw, B v ⁇ Bw), and (Cu ⁇ Cw, C v ⁇ Cw).
  • the vertex sorter 114 sorts the parameters of vertices A, B, and C (XY coordinates, UV coordinates after perspective correction, and parameters for perspective correction) in order of decreasing Y coordinates. To do. The sorted vertices are treated as vertices 0, 1, and 2 in order of decreasing Y coordinate. In the example shown in Fig. 11 (b), vertex A is vertex 1, vertex B is vertex 0, and vertex C is vertex 2. The details of the sort processing by the vertex sorter 114 will be described.
  • FIG. 12 is an explanatory diagram of polygon vertex sort processing.
  • Figure 12 shows the relationship between the vertices before sorting and the vertices after sorting.
  • “A”, “B”, “C” force S
  • the vertex names given to the vertices before sorting, and “0”, “1”, “2” are the vertex names given to the sorted vertices. It is.
  • “A y”, “By”, and “Cy” are the values carried in the members Ay, By, and y of the polygon structure instance, respectively, and the polygon vertices A, B, And the Y coordinate of C.
  • the vertex coordinate between the nodes is 8 ⁇ 8 7 ⁇ 1 7 3 ⁇ 4 ⁇
  • the vertex sorter 114 substitutes each parameter of vertex B for each parameter of vertex 0 and vertex A for each parameter of vertex 1 Substitute the parameters of, and substitute the parameters of vertex C for the parameters of vertex 2.
  • Vertex 0 is as follows. ,
  • Vertex 1 is as follows.
  • WG 1 Aw As for vertex 2, it is as follows.
  • the result of multiplication with the numbers “Aw”, “Bw”, and “Cw” is unsigned, part 1 0 Bit, Decimal part 6 bits 1 6-bit fixed-point number, especially no blank bits.
  • the vertex sorter 1 14 calculates the operation results, that is, the parameters of each vertex 0 to 2 (XY coordinates, No., UV coordinates after one collective and parameters for the perspective collect), polygon / sprite common data Output to slicer 1 1 8 as CI.
  • the configuration (format) of the polygon / sprite common data CI output from the vertex / vertex sorter 1 14 described later is the same as the configuration ( ⁇ ) of the polygon Z sprite common data CI output from the vertex expander 1 1 6. is there. '
  • the XY coordinates of the three vertices A, B, and C of the polygon are represented by (Ax, Ay), (Bx, By), and (Cx, Cy), respectively.
  • “Ax”, “Ay”, “B x”, “B y”, “Cx”, and “Cy” are the polygon structure instance members Ax, Ay, Bx, By, Cx, and Cy, respectively.
  • the stored value is the stored value.
  • the values of members Ax and Ay of the polygon structure instance are the X and Y coordinates of the vertex A of the polygon
  • the values of the members B x and By are the X and Y coordinates of the vertex B of the polygon.
  • CX and Cy values are the X and Y coordinates of vertex C of the polygon.
  • the color data of the three vertices A, B, and C of the polygon are represented by (Ar, Ag, Ab), (B r, B g, B b) and (C r, C g, Cb), respectively. .
  • (A r, Ag, Ab) ⁇ (B r, B g, B b) and (C r, C g, Cb) are stored in members Ac, B c, and C c of the polygon structure instance respectively. Value.
  • the vertex sorter 114 sorts (rearranges) the parameters (XY coordinates and color data) of vertices A, B, and C in ascending order of the Y coordinates according to the table in Figure 12. Sorted vertices are treated as vertices 0, 1, and 2 in ascending order of Y coordinate. This is the same as the texture mapping mode.
  • the Y coordinate between vertices is By ⁇ Ay and Cy (Fig. 11 (b)).
  • Vertex 0 is as follows.
  • Vertex 1 is as follows.
  • Vertex 2 is as follows.
  • a 5-bit “0” is connected to the bit and MSB rule.
  • 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 nosprite common data CI.
  • the configuration (format) of the polygon Z sprite common data C I output from the vertex sorter 114 is the same as the configuration (format) of the polygon / sprite common data C I output from the vertex expander 116.
  • FIG. 13 is a diagram showing a configuration of the polygon / sprite common data CI.
  • Finored F is a flag field indicating whether the polygon // sprite common data C I is for a polygon or a sprite. Therefore, the vertex sorter 114 sets “1” indicating the polygon to the field F; On the other hand, the vertex expander 116 stores “0” indicating the sprite in the field F.
  • the fields VR *, UB *, ⁇ *, and * are the V coordinate, U coordinate, Y coordinate, and X coordinate of the vertex *, respectively. .
  • the eruption of vertex * is vertex 0, vertex 1, and TS point 2 from the earlier force.
  • the polygon / sprite common data that is output from the vertex sorter 114 force is the 3 ⁇ 4 ⁇ of the texture mapping. It is not a CI. Parameter for one collective, no.
  • the fields WG *, VR *, UB *, Y * and X * are the green component of the vertex *, respectively. Red component, blue component, ⁇ coordinate, and X coordinate.
  • the slicer 118 in FIG. 2 will be described. First, the processing for the polygon of the goursiding mode by the slicer 118 will be described.
  • FIG. 14 is an explanatory diagram of processing for the polygon in the Gouraud shading mode by the slicer 118 of FIG.
  • slicer 118 is given polygon XY coordinates (X s, Ys) and (Xe, Ye) at the intersection of the polygon (triangle) defined by the data common data CI, the horizontal line of drawing 3 ⁇ 4 ⁇ , and.
  • the intersection point on the side where the side that does not intersect the horizontal line of the drawing is the end point (Xe, Ye), and the intersection point on the side where the side does not exist is the start point (X s, Y s).
  • the slicer 118 displays the RGB value of the vertex 0 (VRO, WGO, UBO) and the RGB value of the TS point 2 (VR2, WG2, UB) when the drawing Y coordinate Yr is Y0 ⁇ Yr and Y1.
  • the RGB value (R s, G s, B s) of the intersection start point is calculated by interpolation, and the RGB value of vertex 0 (VRO, WGO, UB 0) and the RGB value of I point 1 are also calculated.
  • the RGB value (Re, Ge, Be) at the end of the intersection is calculated by linear interpolation.
  • slicer 1 18 has RGB value of vertex 0 (VRO, WGO, UBO) and RGB value of T point 2 (VR2, WG2, UB 2) when drawing Y coordinate Yr is in the range of Yl ⁇ Yr ⁇ Y2.
  • RGB value (R s, G s, B s) of the start point of the intersection is calculated by interpolation
  • the RGB value of vertex 1 (V Rl, WG1, UB 1) and T point 2 Based on the RGB values (VR2, WG2, UB 2), RGB Calculate the RGB values (Re, Ge, Be) at the end of the intersection by interpolation.
  • slicer 118 calculates AR, AG, ⁇ , and AXg.
  • AR, AG, and ⁇ B are the amount of change of R, G, and B per AXg in the horizontal line of drawing ⁇
  • ⁇ X g is the X coordinate of 1 pixel in the horizontal line to be drawn. The amount of change.
  • ⁇ X g is either “+1” or “one 1”.
  • the slicer 1 18 sends the calculated X s, R s, G s, B s, Xe, ⁇ R, AG, ⁇ B, and AXg to the pixel stepper 120 together with the structure instance received from the depth comparator 1 12. To do.
  • the slicer 1 18 also receives the polygon / sprite common data c I received from the vertex sorter 1 14 force, and the structure received from the depth comparator 1 12 to the recycle buffer 1 10 is also used in the next drawing cycle.
  • Write a body instance. Whether or not it is used in the next drawing cycle can be known from the vertical scanning force signal V C from the video timing generator 138 and the vertex coordinates of the polygon.
  • Figure 15 shows the texture mapping mode polygon for slicer 1 18 in Figure 2. It is explanatory drawing of a process. Referring to Fig. 15, slicer 1 18 is the start point (X s, Ys) that is the intersection point of the polygon (triangle) defined by the given polygon / split common data CI and the horizontal line of drawing. And the end (Xe, Ye). This is the same as the process for polygons in Gouraud Ainder mode.
  • the perspective collect function is explained.
  • texture mapping that expresses a three-dimensional image that has been transformed
  • the texel corresponding to the pixel on the screen is simply linear for each vertex coordinate of the UV space texture corresponding to each vertex coordinate of the polygon.
  • the mapped image may be distorted.
  • the perspective correct function is used to eliminate this distortion. Specifically, the following processing is performed.
  • the coordinates when polygon vertices A, B, and C are mapped to UV space are (Au, Av), (Bu, B v), and (Cu, Cv).
  • the view coordinates of vertices A, B, and C are (Ax, Ay, Az), (Bx, By, Bz), and (Cx, Cy, Cz).
  • the value (u ⁇ w, v ⁇ w, w) obtained by the open-circuit interval is obtained by multiplying u. W by 1 / w, u and v ⁇ w by lZw, that is, (u, Accurate texture mapping after shadow transformation is realized by obtaining texet ⁇ ⁇ — using v) as texel coordinates (U, V).
  • the slicer 1 18 can draw the vertex 0 (UB0, VRO, WG0), and the TI point 2 when the drawing Y coordinate Y r is in the range Y 0 ⁇ Y r ⁇ Y 1.
  • (Us, Vs, Ws) at the intersection start point is calculated by ⁇ interpolation
  • Slicer 1 18 also draws Y coordinate Y r In the range of Yl ⁇ Yr ⁇ Y2, based on (UB0, VR0, WG0) of vertex 0 and (UB2, VR2, WG2) of vertex 2, linear interpolation (Us, Vs, Ws) And (Ue, Ve, We) at the end of the intersection are calculated by linear interpolation based on (UB1, VR1, WG1) at vertex 1 and (UB2, VR2, WG2) at vertex 2.
  • the slicer 118 calculates ⁇ , ⁇ , AW, and ⁇ t.
  • Each change amount, and AX t is the change amount of X coordinate per pixel in the horizontal line to be drawn.
  • ⁇ X t is either “+1” or “one 1”.
  • the slicer 118 sends the calculated Xs, Us, Vs, Ws, Xe, AU, AV, AW and ⁇ to the pixel stepper 120 together with the filler instance received from the depth comparator 112.
  • the slicer 118 is also used in the polygon ⁇ ⁇ sprite common data c I force received from the vertex sorter 114; ⁇ Writes the structure instance received from the depth comparator 112 to the recycle buffer 110. Whether or not it is used in the next rendering cycle can be determined from the vertical scanning force signal V C from the video timing generator 138 force and the vertex coordinates of the polygon.
  • Figure 16 shows a sprite for the sprite by slicer 118 in Figure 2! It is explanatory drawing of a series.
  • the slicer 118 determines the intersection coordinates (Xs, Ys) and (X e,) of the sprite (rectangle) defined by the given polygon ⁇ sprite common data CI and the horizontal line of the drawing process.
  • Ye Here, for the sprite, the intersection (X s, Let Ys) be the intersection (Xe, Ye) that will be drawn later.
  • the slicer 118 calculates the UV coordinates (Us, Vs) of the start point of the intersection by linear interpolation based on (UB0, VR0) of vertex 0 and (UB2, -VR2) of page point 2, and Based on (UB1, VR1) and (UB3, VR3) at vertex 3, calculate the UV coordinates (Ue, Ve) at the end of the intersection by linear interpolation.
  • ⁇ U and ⁇ are the amount of change of U and V coordinates per ⁇ X s in the horizontal line of drawing ⁇ .
  • ⁇ X s is the amount of change in the X coordinate per pixel in the horizontal line of the drawing ⁇ , but it is always “1”, so it is not calculated.
  • the slicer 118 sends the calculated Xs, Us, Vs, Xe, ⁇ , ⁇ V, and AXs together with the structure instance received from the depth comparator 112 to the pixel stepper 120.
  • the slicer 118 also uses the polygonal sprite common data CI force S received from the vertex expander 116 in the next rendering cycle: t writes the structure instance received from the depth comparator 112 to the recycle buffer 110. . Note that it is possible to know whether or not it is used in the next drawing cycle from the vertex coordinates of the vertical running count signal VC and splice from the video timing generator 138.
  • the slicer 118 can recognize polygons and sprites from the Fino Red F of the polygon sprite common data CI, and can recognize Gouraud shading and texture mapping from the polygon structure instance member Ty pe. .
  • pixel state 20 represents the parameters given by slicer 118 (Xs, Rs, Gs, Bs, Xe, AR, AG, ⁇ and ⁇ ⁇ ) for Gouraud shading mode polygons.
  • the drawing X coordinate and RGB value of the drawing work pixel are obtained and sent to the pixelizer 122 together with the (1— ⁇ ) value.
  • the pixel stepper 120 calculates the red component change amount AR per pixel to the red component 1 ⁇ 3 at the start point (drawing start point) 3 of the intersection point. And find the red component RX for each pixel. This process is performed until the end of the intersection (end of drawing) Xe is reached. The same applies to «minute GX and blue component BX.
  • ⁇ Xg is sequentially added to the start point Xs of the intersection, and the drawing X coordinate Xr is obtained.
  • X 0 to
  • RX AXg ⁇ ⁇ R ⁇ X + R s
  • GX AXgAG AGX + G s
  • the pixel stepper 120 outputs the calculated RGB value (RX, GX, BX) of each pixel and the drawing X coordinate X to (1— ⁇ difficult depth value (De pth)) to the pixelizer 122. To do.
  • WX AX tAWX + Ws
  • AXt is sequentially added to the start point Xs of the intersection point, and the drawing X coordinate Xr is obtained.
  • X 0 to
  • VX ( ⁇ t ⁇ ⁇ ⁇ X + V s) ⁇ (1 / WX)
  • the pixel stepper 120 receives the obtained UV coordinates (UX, VX) and drawing X coordinate Xr of each pixel from the slicer 118 (structure mapping texture instance and texture attribute structure instance). With techsenore Output to Matsupa 1 24.
  • VX ⁇ X s AV AV X + V s
  • the pixel stepper 120 is the structure instance (sprite structure instance and texture attribute structure instance) that has received the slicer 1 1 8 force, the obtained UV coordinates (UX, VX) of each pixel, and the drawing X coordinate X r At the same time, output to Texel Matsupa 1 24.
  • the pixelizer 1 22 adds noise to the fractional part of the RGB value given from the pixel stepper 120 and executes dithering to make the matsuno and band inconspicuous.
  • the pixel dither 122 outputs the RGB value of the pixel after dithering to the force raster blender 1 32 together with the drawing X coordinate X r, (1 ⁇ ) value, and the depth value.
  • the texel mapper 1 24 indicates that the member F i 1 ter force “0” of the texture attribute structure is the vicinity of the coordinates (UX, VX).
  • Four sets of node addresses WAD and bits indicating the four texes Address BAD member F i 1 ter force S “ ⁇ ” indicating ⁇ 1 is one texenoge closest to the coordinates (UX, VX), a pair of word addresses W AD and bit address Calculate and output BAD.
  • the bilinear filter parameter BFP corresponding to the coefficient part of each texel in the nocillar filtering is calculated and output.
  • the sprites when scissoring is enabled, sprites when scissoring is disabled, and polygons are output in a unified format for different depth values (members D e p t h).
  • the texture cache block 126 calculates the address of each texel from the word address WAD, the bit address BAD, and the structure instance member Tsegme nt output from the techno mapper 124.
  • the technote indicated by the calculated address is already Creates an index that selects the entry in the color palette RAM 1 1 and creates a color palette RAM. I Output to 1.
  • the Tekuseno ⁇ over others, if not stored in the cache, the texture key Yasshi Yuburokku 1 2 6, the memory manager 1 4 0, issue indicates preparative of Tekusezo ⁇ 5 'Ichita.
  • the memory manager 140 obtains the corresponding texture pattern data from the main RAM 25 or the external memory 50 and stores it in the cache of the texture cache block 1 26.
  • the memory manager 14 0 obtains texture pattern data required in the subsequent stage from the external memory 50 in accordance with an instruction from the merge sorter 10 6 and stores it in the main RAM 25. At this time, the memory manager 140 obtains the entire texture data mapped to one polygon and stores it in the main RAM 25 for texture pattern data for polygons in texture mapping mode.
  • 1 data to be mapped to sprites is acquired in units of lines and carried to main RAM 25. This is because when a pixel group included in the horizontal line of drawing 3 ⁇ 4 ⁇ is mapped to UV space, polygons may be mapped onto any 3 ⁇ 4 in UV space, while sprite ⁇ is U This is because it is mapped only on the axis.
  • the texture cache block 1 2 6 has a 6 4 bit X 4 entry, and the block replacement algorithm is L RU (l e a s t rc e nt t ly u s ed).
  • the color palette RAM I 1 is used for RG B and translucent compositing (1) included in the entry indicated by the index where the techno data input from the texture cache block 1 2 6 and the member Pa 1 ette are connected. — ⁇ ) The value is output to the bilinear filter 1 3 0 together with the bilinear filter parameter BFP, depth value, and drawing X coordinate X r.
  • Bilinear filter 1 3 0 measures bilinear filtering.
  • texture mapping the simplest method for calculating the pixel drawing color is to obtain the color data of the texel located at the texel coordinate closest to the pixel coordinate (U x, vx) mapped in the UV space, and This is a method of calculating the pixel drawing color from the error data. This method is called “yourest neighbor”.
  • FIG. 17 is an explanatory diagram of bilinear filtering by the bilinear filter 130.
  • the bifurinator 130 calculates a weighted average of RGB tie (1- ⁇ ) values of 4 texels in the vicinity of the pixel coordinates (UX, VX) mapped to the UV space, and Determine the drawing color.
  • the texel color is complemented smoothly and the boundary of the texel in the mapping result is not noticeable.
  • the linear filtering is expressed by the following formula (by the bilinear filtering.
  • “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 (l_v) ⁇ .
  • A AO * n u n v + Al • u n v + A2 n u v + A3 u u V
  • R0, Rl, 12 and 1 ⁇ 3 are the R values of the above 4 texels
  • GO, G 1, 02 and 03 are the G values of the 4 texels
  • B 1, 82 and 83 are the B values of the above 4 texels, respectively
  • A0, Al, A 2 and A 3 are the (1 ⁇ ) values of the above 4 texels, respectively.
  • the bilinear filter 130 outputs the calculated RGB value (RGB) and (1- ⁇ ) value ( ⁇ ) of the pixel, together with the depth value and the drawing X coordinate Xr, to the force error blender 132.
  • the line buffer block 134 will be described prior to the description of the force-lender blender 132.
  • FIG. 2 The line buffer block 134 includes line buffers LB 1 and LB 2, and when one line buffer is used for display, the other line buffer is used for drawing. Adopt a double buffer ⁇ that switches between and uses.
  • the line buffers (LB1, LB2) used for display output the RGB value for each pixel to the video encoder 136 in accordance with the horizontal count signal HC and the vertical «count signal VC from the video timing generator 138.
  • the force lar blender 132 performs a translucent composition. Specifically: The force blender 132 is the pixel RGBiil3 ⁇ 4p (l- ⁇ ) value given by the pixel ⁇ ⁇ dither 122 or bilinear filter 130, and the drawing pixel position (drawing) of the line buffer (LB1, LB2) of the drawing 3 ⁇ 4 ⁇ X coordinate Xr force S): Use the RGB value that is displayed in the ⁇ , and then use the following formula to perform an annulus blending and draw the result in the same line buffer (LB 1, LB 2) Write to pixel location.
  • “1 ⁇ a r” is the value given by Pixeno 1 ⁇ 'iza 122 or bilinear filter 130 force ⁇ (1 a).
  • “Rr”, “G r” and “Br” are RGB values given from the pixelizer 122 or the bilinear filter 130, respectively.
  • “Rf”, “Gf” & 'B f' are RGB values obtained from the drawing image pixel positions of the line buffers (LB1, LB 2) used for drawing.
  • the Rr, Gr, and Br terms in the above equation are forces R r ⁇ ar, Gr ⁇ ar, and B r ⁇ ar, respectively.
  • Arithmetic circuits are simplified by preparing the calculation results of R r ⁇ ar, Gr ⁇ ar, and B r ⁇ ar as Rr, Gr, and Br in advance.
  • the video encoder 136 displays the RGB value input from the line buffer (LB1, LB2) that has been optimized for display and the timing information input from the video timing generator 138 (composite sync signal S YN, composite block).
  • Signal VS is a signal indicating TV ⁇ : (NTS C, PAL, etc.).
  • the video timing generator 138 Based on the input clock, the video timing generator 138 generates a horizontal running count signal HC and a vertical scanning count signal VC, a composite synchronization signal SYN, a composite blanking signal B LK, a burst flag signal BST, and a line.
  • the horizontal scan count signal HC is counted up every system clock cycle and is reset when one horizontal line scan is completed.
  • the vertical scanning count signal VC is incremented every time scanning of one horizontal line and two horizontal lines is completed. When scanning of one frame or one field is completed, the vertical scanning count signal VC is reset.
  • the vertex sorter 114 and the vertex expander 116 convert the polygon structure and the sprite structure into the polygon / sprite common data CI of the same format.
  • the internal circuit of RPU9 can be shared as much as possible. For this reason, it is possible to reduce the hardware scale.
  • the number of polygons and splices that can be drawn at the same time can be increased without increasing the memory capacity.
  • the coordinates of the three vertices 1 to 3 of the sprite are obtained by calculation, there are four vertices in the sprite structure. ⁇ 3 It is not necessary to include all coordinates, and the memory capacity required for TO of the sprite structure can be reduced. Of course, some of the coordinates of the three vertices 1 to 3 of the sprite can be obtained by calculation, and the others can be stored in the sprite structure.
  • the coordinates mapped to the UV space calculated by Vertex Spander 1 1 6 reflect the sprite's rate Z oo mX, Z oo mY force S. Is displayed on the screen, it is not necessary to prepare image data after enlargement or reduction in the memory MEM in advance, and the memory capacity required for storing image data can be suppressed.
  • the slicer 1 1 8 that receives the polygonal / sprite common data CI while maintaining the identity of the polygon / sprite common data CI is referred to the flag buoy noredo, thereby rendering the graphic ⁇
  • the type of element (polygon or sprite) can be easily identified and processed for each type of draft element.
  • the slicer 1 1 8 is the amount of change in the vertex parameter per unit X coordinate in the screen coordinate system ( ⁇ R, AG, ⁇ ⁇ , ⁇ X g, ⁇ , ⁇ ⁇ , AW, ⁇ ⁇ ⁇ , ⁇ X s) is sent to the pixel stepper 1 2 0, so the Pixeno Lestuno 1 2 0 is the parameter between the two intersections of the polygon and the drawing horizontal line (RX, GX, BX, UX, VX, X r) and the parameters (UX, VX, X r) between the intersections of the sprite and the drawing horizontal line can be easily calculated between the lines.
  • the merge sorter 1 0 6 aligns the polygon structure instance and the sprite structure instance in the drawing priority order in accordance with the merge sort nots 1 to 4, and the same single data string, that is, the polygon Since it is output as Z-sprite data PSD, the downstream circuit can be shared as much as possible between the polygon and the sprite, and the hardware scale can be further reduced.
  • the merge sorter 106 is configured such that the polygon appearance T page mark (the smallest Y coordinate among the three vertices) and the appearance vertex coordinate (the smallest Y coordinate among the four vertices) and The merge sort is performed so that the drawing priority position that appears earlier on the screen is higher (merge sort rule 1). Therefore, in the subsequent stage, you can simply draw the polygon structure instance and sprite structure instance that are output as polygon Z sprite data PSD in the order of output.
  • the merge sorter 1 0 6 determines the drawing priority in the order of the depth value of the polygons and sprites whose appearance vertex coordinates are the same ⁇ , with the depth value in the descending order of the drawing target (merge sort rule 2). Therefore, in the horizontal line to be drawn, the polygon or spline drawn deeper is drawn first (drawing in the order of the depth value).
  • the merge sorter 1 0 6 considers that the appearance vertices of both polygons and sprites are located before the first line to be drawn (that is, the first line on the screen) because they are considered to be the same coordinates (the merge sort ⁇ ⁇ Nore 3) Based on the depth value, the one that is drawn deeper is determined to have a higher drawing superior jet position iii ". Therefore, in the first line of the screen, the polygon and sprite are in the order of the depth value. If the first line is not processed in this way, drawing in the order of depth values is not necessarily guaranteed in the drawing of the first line, but according to this configuration, the order of depth value from the first line is not guaranteed. It becomes possible to perform drawing with.
  • the merge sorter 1 0 6 displays an apex mark corresponding to a horizontal line that is not drawn in the display's first line when interlaced display is performed, and the next horizontal line ( Since the coordinates of the appearance vertex corresponding to (horizontal line drawn in the display field) and are treated as the same coordinate (merge sort node 4), the one drawn more deeply based on the depth value It is judged that is high. Therefore, even in the case of interlaced display, drawing processing in the order of depth values is guaranteed.
  • the merge processing level 2 to 4 guarantees the drawing processing power S in the order of depth values. Therefore, translucent synthesis can be performed appropriately. This is because the drawing color of a translucent graphic element depends on the drawing color of the graphic element in the back of the graphic element, so it is necessary to draw the graphic elements in order from the back.
  • texture repeated mapping will be described.
  • the texture pattern data is repeatedly arranged in the UV space in the horizontal direction and / or the vertical direction. Therefore, in XY space, the texture is repeatedly mapped to polygons and sprites.
  • the UV coordinate system is a two-dimensional standard system in which each texel constituting the texture is arranged in such a manner that it is mapped to a polygon or bright. That is, the coordinates in the UV coordinate system are the U coordinate UX and V coordinate VX calculated by the pixel stepper 120, and are determined by the U coordinate U X and V coordinate V X before masking, which will be described later.
  • UV space and ST space can be called texenore space in that texture (technore) force S is arranged.
  • Fig. 18 (a) shows an example of a square texture placed in ST space when iterative mapping is performed 3 ⁇ 4 ⁇
  • Fig. 1'8 (b) shows it in UV space when iterative mapping is performed.
  • Fig. 18 (c) shows an example of a texture mapped to a polygon.
  • Fig. 18 (c) shows an example of a polygon in XY space where the texture of Fig. 18 (b) is repeatedly mapped.
  • Member M represents the number of upper bits masked in U coordinate UX (upper 8 bits are S3 ⁇ 4 part, lower 3 bit force S decimal part) in 8 bits, and member N is V coordinate VX (upper part 8 bits force S plate part, lower 3 bits are decimal part)
  • the number of upper bits masked in 8 bits is represented by 8 bits.
  • Figure 18 (a) shows an example of polygon texture pattern data (character R) in ST space. Indicated. In this figure, one small rectangle represents one texel. And among the four vertices of a texel, the ST coordinate in the upper left corner indicates the position of that texel.
  • the texture force S is a square composed of 16 horizontal texels and 8 vertical texels, and is repeated in the horizontal and vertical directions.
  • ⁇ small rectangles consist of a set of pixels and correspond to one technore in Fig. 18 (b).
  • One small triangle consists of a set of pixels and corresponds to one texel in Fig. 18 (b).
  • which is repeatedly mapped to sprites, is the same as ⁇ for polygons and will not be described.
  • Figure 19 (a) shows that the polygon structure member MAP is “
  • Figure 19 (b) shows an example of a texture mapped to a polygon placed in the ST space at ⁇ "0”.
  • Figure 19 (b) shows the texture map placed in the ST space when the member MAP of the polygon structure is "1". This is an example of a texture mapped to a polygon.
  • a small square represents a texel
  • a horizontally long rectangle represents a texel string (hereinafter referred to as a "texel block”).
  • a horizontally long rectangle C3 ⁇ 4) represents one block of texture pattern data.
  • one memory word is 64 bits.
  • texture TX is a right triangle.
  • the texture TX is divided into the intercept sgf and the intercept sfb by the S on the S axis (U axis). Then, the intercept sgf (the hatched part on the left side in the figure) is left in the UV space as it is in the ST space (specifically, the two-dimensional self-train A) and the intercept s gb (the hatched part on the right side in the figure) Rotate and move 180 degrees in the UV space, and enter the ST space (specifically, the two-dimensional array A). Like this; ⁇ ; One block of texture pattern data (tfc ⁇ ) is stored in the memory MEM. Such a storage method is called “division storage of texture pattern data”.
  • ⁇ in the mouth of the rectangle representing the texel block indicates that one block of texture pattern data is regarded as the above two-dimensional array A, and each texel block is regarded as an element of the two-dimensional array A. Indicates the character (index).
  • the two-dimensional array A is stored in the memory MEM in order from the data stored in the element whose subscript is small.
  • the number of horizontal texels in the texel block is indicated by “w”, and the number of vertical texels is indicated by “h”.
  • the values of horizontal texel number w and vertical texel number h are determined by the value of member Map and the value of member Bit.
  • the division force S of the texture pattern data is performed ⁇ , the segmented texture TX intercept sgb force is replaced with the texel in the area unnecessary for mapping, and is stored in the memory MEM, so the required memory capacity Can be suppressed.
  • FIG. 20 is an illustration of textures mapped to sprites arranged in ST space.
  • a small square represents one texel
  • a small horizontal rectangle represents a texel block
  • a large horizontal rectangle represents a block of texture pattern data.
  • one memory word is 64 bits.
  • texture T X is a square (notching part).
  • the texture T X is stored in the ST space (specifically, the two-dimensional array B) as it is in the UV space.
  • one block (3 ⁇ 4) of texture pattern data is stored in the memory MEM. Note that the texture pattern data mapped to sprites is not stored separately.
  • the number in the mouth of the rectangle representing the texel block is that the texture pattern data of one block is regarded as the above two-dimensional array B, and each texel block is regarded as an element of the two-dimensional array B. Indicates the character (index).
  • the two-dimensional array B is stored in the memory MEM in order from the data stored in the element whose subscript is small.
  • the number of horizontal texels in the texel block is indicated by “w”, and the number of vertical texels is indicated by “h”.
  • the values of horizontal texel number w and vertical texel number h are determined by the value of member Bit.
  • the relationship between member Bit and the number of horizontal texels w and the number of vertical texels h is the same as (Table 1). Next, the details of the texel block will be described.
  • Fig. 21 (a) is an explanatory diagram of the texel block in the ST space when the polygon structure member MAP is "0"
  • Fig. 21 (b) is the polygon structure menno map MAP is "1”.
  • Fig. 21 (c) is an explanatory diagram of Wl state of texel block to one memory word.
  • the structure of the texel block in the ST space of the sprite is the same as that of the polygon of ⁇ whose member MAP is “0”.
  • the texel # 9, # 10, and # 11 on the right are sequentially arranged from the leftmost texel # 8. '
  • the 60th to 63rd bits of the memory word are blank bits, and the text of the text is not J.
  • FIG. 22 is a block diagram showing the internal configuration of the texel mapper 124 in FIG.
  • the »in parentheses after the code attached to the signal name indicates the number of bits of the signal, referring to Fig. 22.
  • the texel mapper 124 has a texel address calculation unit 40, Depth format unifying unit 42 and «Generating unit 44 are included.
  • the texel mapper 124 draws based on the texel U coordinate UX, texel V coordinate VX, sprite structure instance Z polygon structure instance, text attribute but structure instance, and drawing X coordinate X r input from the pixel stepper 120.
  • the texel memory mapped to Pixenole on the MEM;)? ⁇ Ftf standing (offset from the beginning of the texture pattern data) is calculated and output to the texture cache block 126. Each input signal is described below.
  • Input data valid bit I DV is the value of input data from Pixeno Stepper 120 ⁇ 3 ⁇ 4) Indicate.
  • the texel U coordinate UX and texel V coordinate VX indicate the UV coordinate of the texel that is mapped to the drawing pixel.
  • the texel U coordinate UX and texel V coordinate VX are composed of an 8-bit part and a 3-bit fractional part, respectively, and are calculated by the pixel stepper 120.
  • the signals Map and Right are the values of the members Map and Right of the polygon structure, respectively.
  • the signals F i 1 ter and T se gme nt are the values of the members F liter and T se gmen t of the polygon structure and the splice structure, respectively.
  • the polygon structure instances sent to the texel mapper 124 are all polygon structure instances in the texture pine pinder mode.
  • the signals Width, He ight, M, N, B ⁇ t and P a 1 ette are the values of the texture attribute structure member idth, He ight, M, N, B lt and Palette, respectively. It is.
  • the signal Sprite is a signal indicating whether the input data force is for a polygon or a sprite, and is output from the pixel stepper 120.
  • the scissoring enable code SEN indicates whether the scissoring process is enabled or disabled. Is the value of this signal SEN the same? 115 is set in the control register (not shown) in? 119.
  • the signal D e p t h is the value of the member D e p t h of the polygon structure and the sprite structure.
  • the number of bits of the member D ep th is 12 bits for the polygon structure, 8 bits for the sprite structure when scissoring is disabled, and 7 bits for the sprite structure when scissoring is enabled. Therefore, values less than 12 bits are input in a format in which “0” is concatenated on the MSB side.
  • the signal Xr is the pixel drawing X coordinate calculated by the pixel stepper 120, and indicates the horizontal coordinate of the screen coordinate system (2048X1024 pixels) as an unsigned integer. Each output signal will be described below.
  • the output data valid bit ODV indicates whether the output data from the texel mapper 124 is a good value.
  • the memory word address WAD indicates the first address of the memory MEM in which the techno-sensor is listed. This WAD is the offset address from the beginning of the texture pattern data.
  • the address WAD is output in a format with 64 bits as one word.
  • Bit address BAD is techno! ⁇ 'Techno! ⁇ 'Indicates the bit position of one LSB.
  • the bilinear filter parameter BFP corresponds to the coefficient part when calculating the weighted average of the technosensor.
  • the end flag EF indicates the end of the output data.
  • the signal D e p t h — O u t is a depth (depth) value converted into a 12-bit unified format.
  • Signals F i 1 ter— O u t, B i t O u t, Sprite i O u t, L ⁇ gh t_O u t, T se gme nt — O ut, P a 1 ette i O ut and X— O ut are respectively This corresponds to the input signals F liter, Bit, Sprite, Light, T, Element, P, and X, and the input signal is output as an output signal to the subsequent stage. However, it is delayed to synchronize with other output signals.
  • the texel address calculation unit 40 calculates the placement of the texel mapped to the drawing pixel on the memory MEM.
  • the texel address calculation unit 40 includes input data valid bits I DV, texel U coordinate UX, texel V coordinate VX, signal Map, signal F liter, signal Wide, signal Height, signal M, signal N, and so on. No. B it force is input. Also, the texel address calculation unit 40 calculates the output data valid bit 0 DV, the memory word address WAD, the bit address BA'D, the bilinear filter parameter BFP, and the termination flag EF based on the input signal, and the texture cache. Output to block 126.
  • Depth Format Unification Unit 42 is a polygon instance if the structure instance input from Pixel Steno, ° 120 is a sprite structure instance with scissoring disabled: ⁇ , or a sprite structure instance with scissoring enable.
  • the value of the signal Depth which has a different format, is converted to a unified format, and the converted value is output as the signal D ept h_0 ut.
  • the boat ⁇ 44 extends the input signals F liter, Bit, Sprite, Light, T se gment, Pa 1ette and X with a register (not shown), Output signals ODV, WAD, BAD, BFP, EF, and D_ept_O ut are synchronized with F i 1 ter ⁇ O ut, Bit 1 O u't, Sprite ⁇ O ut, L i ght ⁇ O ut , T segmen t_Out, P a 1 ett e_Out, and X—Out.
  • FIG. 23 is a block diagram showing an internal configuration of the texel address calculating unit 40 of FIG. In the figure, the »in the 0 after the signal sign indicates the number of bits of the signal.
  • the texel address calculation unit 40 includes a texel counter 72, a weighted average parameter calculation unit 74, a bi-linear filtering UV coordinate calculation unit 76, a manoplexer 78, upper bit mask units 80 and 82, and a horizontal and vertical texel.
  • Includes output section 84 and address calculation section 86.
  • the four texels in the vicinity of the pixel coordinates mapped in the UV space are designated as texenore 0 0, texel 0 1, texel 10, and texel 11, respectively.
  • the texel force counter 7 2 outputs “0 0” indicates texel 0 0, the texel counter 7 2 outputs “0 1” indicates texel 0 1 and the texel counter 7 2 outputs “1 0” indicates texel. 1 indicates 0, and “1 1” output by texel counter 7 2 indicates texel 1 1.
  • the texel counter 72 controls the bi-linear filtering UV coordinate calculation unit 76 and the registers (not shown) of the address calculation unit 86 to sequentially store input values.
  • the texel counter 72 also asserts the output data valid bit ODV while valid data is being output.
  • the bilinear filtering UV coordinate calculation unit 76 will be described.
  • the difficult part of the texel U coordinate UX is “U” (indicated as UX—U in the figure), and the heel of the texel V coordinate VX is “V” (indicated as V X—V in the figure).
  • the bi-linear filtering UV coordinate calculation unit 7 6 uses the texel 0 0 U-coordinate part and V-coordinate part as coordinates, and coordinates (U, V) as the texel 0 1 U-coordinate part and V-coordinate part. , Coordinates (U + 1, V) as the U-coordinate difficult part and V-coordinate difficult part of texel 10, and coordinates (U, V + 11) as the U-coordinate difficult part and V-coordinate difficult part of texel 11
  • the coordinates (U + l, V + 1) are output to the multiplexer 78. This means the generation of coordinates to acquire the data of the 4 texels in the vicinity of the mapped pixels that are required for bilinear filtering.
  • the multiplexer 7 8 selects the U coordinate part and V coordinate part (U, V) of the texel 0 0, and the input signal is Select ⁇ 0 1 '' to select the U coordinate ⁇ part and V coordinate ⁇ part (U + 1, V) of texel 0 1, and when the input signal shows ⁇ 1 0 '', the U coordinate ⁇ of texel 10 And V-coordinate part (U, V + 1) are selected.
  • the input signal indicates “11”
  • decimal part of the texel U-coordinate UX is “u” (in the figure, UX—u)
  • the decimal part of the texel V-coordinate VX is “v” (in the figure, VX-one V)
  • ( 1— u) is “nu” and (1 1 V) is “nv”.
  • the R (red) components of texel 00, texel 01, texenore 10, and texel 11 are R0, Rl, R2, and R3, respectively, and texenore 00, texel 01, texenore 10, and texel 11 G (green) )
  • the components are G0, Gl, -G2, and G3, respectively, and the B (blue) components of texenore 00, texel 01, texesole 10, and texel 11 are respectively B 0, B 1 and B 2 And B3.
  • the (1 ⁇ ) values of texenor 00, texenor 01, texenor 10 and texel 11 are A0, Al, A 2 and A 3, respectively.
  • the bilinear filter 130 obtains the red component R, the fine component G, the blue component B, and the (1 -a) value of the drawing pixel after bilinear filtering based on the bilinear filtering equation.
  • the coefficient parts ⁇ ⁇ ⁇ ⁇ ⁇ , u 'nv, nu' v, and u ⁇ v of the terms of the Bayer filter are expressed as texel 00 coefficient part, texel 01 coefficient part, texel 10 coefficient part, and texel 11 respectively.
  • the weighted average parameter calculation unit 74 calculates the texenore 00 coefficient part, texel 01 coefficient part, texenore 10 coefficient part based on the input decimal part of the texel U coordinate UX and the decimal part (u, V) of the texel V coordinate VX. , And texel 11 coefficient part is calculated.
  • the input signal of the texel counter force is "00”
  • the input signal is "01”
  • the input signal is “11”, select the techsenore 11 coefficient part and output it as the bilinear filter parameter BFP. '
  • the horizontal / vertical texel output unit 84 calculates the horizontal texel number w and the vertical texel number h of the texel block (see FIGS. 19 and 20) based on the signal Map, the signal Bit, and the force. These calculations are based on the above (Table 1) and (Table 2).
  • the address calculation unit 86 calculates texel coordinates in the ST space in consideration of repetitive mapping of textures (see Fig. 18) and divided storage of texture pattern data (see Fig. 19), and based on the calculated texel coordinates. Calculate standing on memory MEM. Details are as follows. -First, the address calculation unit 86 determines whether the divided storage force S of the texture pattern data is being applied. The following conditions are satisfied: At least one of the following conditions 1 to 3 is satisfied. The texture pattern data is stored separately.
  • the masked U coordinate pan MUI is “U”
  • the masked V coordinate S3 ⁇ 4 part MV I is “V”
  • the coordinates of the texel (in ST space) are (S, T).
  • the address calculation unit 86 calculates the coordinates (S, T) of the texel in the ST space according to the following expression when the texture pattern data is divided and stored.
  • the operation symbol ⁇ / j means a division in which the quotient is rounded down to an integer.
  • He i gh tZh is an example of a V coordinate threshold value determined based on the V coordinate of the texel having the largest V coordinate among the texture texels.
  • the pixel coordinate (U, V) is used as the pixel coordinate (S, T) in the ST coordinate system, and the pixel V coordinate is the V coordinate threshold.
  • the pixel coordinates (U, V) are rotated 180 degrees and converted to pixel coordinates (S, T) in the ST coordinate system. Therefore, even if the texture pattern data is divided, appropriate texel data can be read from the inner memory MEM.
  • the address calculation unit 86 calculates the coordinates (S, T) of the texel in the ST space according to the following equation if the texture pattern data division force S is not applied.
  • the address calculation unit 86 calculates the texel coordinate (S, T) force, the address (memory word address) WAD of the memory node including the texenter, and the bit position (bit address) BAD in the memory word. Ask. Note that the memory word address WAD required by the address calculation unit 86 is not the final memory address, but the offset address from the beginning of the texture pattern data. The final memory address is obtained from the value and force of the memory word address WAD and signals T and segment in the texture cache block 126 in the subsequent stage.
  • the memory word address WAD and the bit address BAD are obtained from the following equations.
  • the operation symbol “/” in this expression means ⁇ , where the quotient is rounded down to find the quotient with «, and the operation symbol“% ”means to find the remainder in the division where quotient is found with «.
  • WAD (W 1 d t h / w + 1)-(T / h) + (S / w)
  • FIG. 24 is an explanatory diagram of the bi-linear interpolation of ⁇ , which is the division force S of texture pattern data.
  • the texture pattern data is divided and stored (notching part) as shown in the figure. Without moving (in UV space) 180 degrees times in UV space (ie, in UV space), the part marked in ST space corresponds to the coordinates (U, V) of the pixel mapped in UV space.
  • the ST space coordinates are (S, T)
  • the four techno detectors located at) are referenced in the bilinear filtering process.
  • the ST space corresponding to the coordinates (U, V) of the pixel mapped in the UV space is used. If the coordinates of (S, T) are (S, T), coordinates (S-1, ⁇ ), coordinates (S, ⁇ 1 1), and coordinates (S-1, ⁇ 1 1) Yes Four texel data are referenced.
  • Tetschia pattern data is stored separately, because there is a texenometer between the two divided triangles, that is, for bilinear filtering between the two divided triangles.
  • the texometers near the ST space coordinates (S, ⁇ ) corresponding to the coordinates (U, V) of the pixels mapped to the UV space when bilinear filtering is performed can be placed. Even if the data is referred to, the pixel drawing process can be performed without fail.
  • the texture is not divided into the memory MEM (arranged in the ST space) in a manner in which the texture is mapped to the polygon, but is divided into two segments, and one segment. Is rotated 180 degrees and placed in memory MEM (located in ST space).
  • the texture pattern data here does not mean the techsenator only in the area where the texture is placed (corresponding to the hatched part of the block in Fig. 19), but the other area (block in Fig. 19).
  • Techseno 1 ⁇ data In other words, the texture pattern data is a texo sensor for a square area containing a triangular texture. (Corresponding to the block in Fig. 19).
  • triangle textures that map to triangular polygons as they are in a two-dimensional array wastes about half of the techsenators in the array, so if polygons are triangles, it is better to store them separately. .
  • the texture is a right triangle (see Fig. 19), so that the two sides forming a right angle coincide with the U axis and V axis of the UV space, respectively, and the right vertex is
  • the origin point in the UV space By setting the origin point in the UV space, the amount of data required to specify the coordinates of the vertices of the triangle in the UV space can be reduced.
  • a polygon representing the shape of each surface of a three-dimensional solid projected in a two-dimensional space can be used as a two-dimensional sprite erecting on the screen.
  • polygons are used in a sprite manner, they are still polygons.
  • Such a polygon used in a sprite is called a pseudo sprite.
  • the amount of memory required to temporarily store techsenators can be reduced by acquiring technodata in units of lines, as with the original splice. .
  • the member M ap 0 (first form) (see Fig. 19 (a)), and one techno lev mouth consisting of techno data arranged in one dimension in one node of the memory MEM.
  • the coordinates of each vertex can be specified arbitrarily using A y, A x, B y, B x, C y, and C x (see Fig. 3), and therefore the size can also be specified arbitrarily.
  • the texture repetitive mapping force S is performed: t is the texture pattern data is not divided. Therefore, it is preferable to store the texture pattern data in the memory MEM when the rectangular texture is repeatedly mapped horizontally and / or vertically. Since the force is repeated, the same texture pattern data can be used and the memory capacity can be reduced.
  • the coordinates of the pixel in the ST space are included in the intercept placed in the ST space after moving by 180 degrees: ⁇ Take into account 4 texels (see Figure 24).
  • texels used for nonlinear filtering are placed between the segments that are divided and divided (see FIG. 24). Because of these powers, the bilinear finalizing process can be realized without any problem even when the texture pattern data is divided. ,
  • the same texture pattern data is used by masking the upper N bits of the U coordinate hard part UI ⁇ iM bit and / or V coordinate saddle VI (set to "0").
  • the texture cache block 1 2 6 requests the texometer from the memory manager 1 4 0.
  • the texture buffer is a temporary storage area for texture pattern data set on the main RAM 25.
  • the memory manager 1 4 0 indicates that the texture pattern data requested by the merge sorter 1 0 6 has not been read into the texture buffer in the main RAM 2 5, ⁇ , DMAC 4 through the DMAC interface 1 4 2 DMA 3 ⁇ 43 ⁇ 4 is requested, and the texture pattern data stored in the external memory 50 is read into the newly obtained texture buffer area.
  • the memory manager 1 4 0 determines the text shown in FIG. 30 and FIG. 3 1 described later according to the value of the member “T segment” output from the merge sorter 1 0 6 and the size information of the entire texture pattern data. Remove the cache buffer area. In the form of true male, texture The function of buffer area acquisition processing is achieved with hard-wired logic.
  • the MCB initializer 141 of the memory manager 140 is hardware for initializing the contents of the MCB (Memory Control Block) structure array.
  • the texture buffer managed by the memory manager 140 is an area. Acquisition, release, and force of S Repeated fragmentation (fragmentation) occurs, and it becomes difficult to secure a large area.In order to avoid this fragmentation, MCB initializer 141 determines the contents of the MCB structure array. Initialize and reset the texture buffer to its initial state-
  • the MCB structure is a structure used for texture buffer management, and always forms an MCB structure array with 128 instances.
  • the MCB structure array is arranged on the main RAM 25, and the start address of the MCB structure column is indicated by an RPU control register “MCB Array Base Add s s” described later.
  • FIG. 25 (a) is a diagram showing a configuration of a boss MCB structure
  • FIG. 25 (b) is a diagram showing a configuration of a general MCB structure.
  • the boss MCB structure includes members “Bwd”, “F wdj”, “En t r y”, and “T a p”.
  • the general MCB structure includes members “Bwd”, “Fwd”, “U s er”, “S ⁇ z e”, “Ad dr s s” and “Tag”.
  • Member “: Bwd” indicates the backward link in the chain of boss MCB structure instances (see Figure 33 below).
  • Member “Bwd” contains an index (7 bits) that points to the MCB structure instance.
  • the member “Fwd” indicates the forward link in the chain of boss MCB structure instances.
  • Member “Fwd” contains an index (7 bits) that points to the MCB structure instance.
  • the member “En t r y” indicates the number of general MC B structure instances included in the chain of the boss MC B structure instance.
  • Member “Ta p” is given an index (7 bits) that points to the most recently released general MCB structure instance included in the chain of boss MCB structure instances.
  • Member “User” Shows the number of polygon structure instances / sprite structure instances that share the texture buffer area managed by the MC B structure instance. However, since multiple sprite structure instances do not share the texture buffer area, the texture buffer area of the sprite structure instance is managed ⁇ , and the maximum value of this value is "1".
  • Member “S 1 z ej” indicates the size of the texture buffer area managed by the general MCB structure instance. The texture buffer area is managed in units of 8 bytes, and the actual size (number of bytes) is The value indicated by the member “S ize” is multiplied by “8”.
  • the member “A dd ress” indicates the start address of the texture buffer area managed by the general MCB structure instance. However, what is stored in this member is bits 3 to 15 of the physical address of main RAM 25 (13 bits of A [15 ⁇ 3]).
  • the member “T ag” is a value of the member “T segment men ts” that specifies the texture pattern data stored in the crane in the texture buffer area managed by the general MC B structure instance.
  • “T se gme nt” is a member of the polygon structure and sprite structure in the texture mapping mode (see Figures 3, 3 and 6).
  • Figure 26 is an explanatory diagram of the size of the texture buffer area managed by the boss MCB structure instance. As shown in Figure 26, the eight boss MCB structure instances [0] to [7] manage texture buffer areas of different sizes. This figure shows which size of texture buffer area is under the control of which boss MCB structure instance.
  • FIG. 27 is a diagram showing initial values of the boss MCB structure instances [0] to [7].
  • the number in ⁇ is the index of the boss MCB structure instance.
  • Figures 2 and 8 show the initial values of general MCB structure instances [8] to [127].
  • the number in the mouth is the index of the general MCB structure instance.
  • MCB initializer 141 in FIG. 2 initializes the contents of the MCB structure array to the values described in FIG. 27 and FIG. The initial value depends on each MCB structure instance.
  • Figure 27 (a) shows the initial values of the boss MCB structure instances [0] to [6]. These boss MCB structure instances have no managed texture buffer area in the initial state, and the number of other general MCB structure instances forming the chain is “0”. Each of “Bwd”, “Fwd”, and “Ta p” stores an index indicating itself, and the value of the member “En try” indicates “0”.
  • Figure 27 (b) shows the initial value of the boss MCB structure instance [7].
  • Boss MCB structure Instance [7] manages ⁇ 1 area allocated as texture buffer in the initial state. Actually, it forms a chain with the general MCB structure instance [8] that manages the area collectively. Therefore, the values of members “: Bwd”, “Fwd”, and “Ta p” all indicate “8”, and the value of member “Enter” indicates “1”.
  • Figure 28 (a) shows the initial value of the general MCB structure instance [8].
  • General MCB structure instance [8] manages the ⁇ S area of the texture buffer in the initial state. Therefore, the member “S 1 ze” indicates the total size of the texture buffer set in the RPU control register “Texture-Buffer Size”, and the member “Ad dress” indicates the RPU control register “Tex”. This indicates the first address of the texture buffer set to “ture buffer base add ress”.
  • the value obtained by multiplying the value of the member “S 1 z e” by “8” represents the actual size of the texture buffer.
  • the value of the member “Ad dr s s” represents only 13 bits in total, from the 3rd bit to the 15th bit (A [15: 3]) of the physical address of the main RAM25.
  • the general MCB structure instance [8] is the only general MCB structure instance included in the chain of the boss MCB structure instance [7] in the initial state, the members “B wd” and “Fwd” Both values are “7”. In the initial state, there are no polygons / sprites that share the general MCB structure instance [8], so the values of members “Us e r” and “Tag” are “0”.
  • Figure 28 (b) shows the initial values of general MCB structure instances [9] to [126].
  • General MCB structure instances [9] All general MCB structure instances after that are free in the initial state! 3 ⁇ 4Set as MCB structure instance and not included in the boss MCB structure instance chain.
  • a chain of free general MCB structure instances is linked with the member “Fwd” pointing to the next general MCB structure instance, and is closed like a chain of boss MCB structure instances.
  • a value indicating “own index +1” is set in the member “Fwd” of one ⁇ MCB structure instance [9] to [126], and the other members “Bwd”, “User”, “ “S ize”, “Ad dress” and “T ag” are all set to “0”.
  • Figure 28 (c) shows the initial value of one MCB structure instance [127].
  • the general MCB structure instance [127] is set as the end of the free general MCB structure instance chain and is not included in the boss MCB structure instance chain. Therefore, the member “Fwd” of one ⁇ MCB structure instance [127] “0” Force S Set to indicate the end of a chain of free general MCB structure instances.
  • the other members “Bwd”, “U ser”, “S 1 ze”, “Ad dress” and “T ag” are all set to “0”.
  • FIG. 29 is a list of RPU control registers related to the memory manager 140 of FIG. All RPU control registers shown in Figure 29 are provided in RPU9.
  • the RPU control register “MCB Array Base Add res sJ shown in Fig. 29 (a) specifies the base address of the MCB structure array used by the memory manager 140 using the physical address of the main RAM 25. As for the setting, all 16 bits can be set, but the base address of the MCB structure column must be set according to the word line (4 byte line). Is placed at I / O bus address “0xFF FFE624”.
  • the RPU control register “MCB Resou rc e” shown in Fig. 29 (b) sets an index that points to the first MC B structure instance of the free general MC B structure instance chain at the initial setting. For example, this register is placed at the I / O bus address “0 xFFFFE 626”.
  • the RPU control register “MCB I ti a l i ze r I ter v a 1” shown in FIG. 29 (c) sets the cycle of the initialization process of the MCB structure array performed by the MCB initializer 141.
  • This initialization period is set in units of clock cycles. For example, set to initialize every 4 clock cycles. For example, this register is placed at the IZO bus address “0 XFFFFE62D”.
  • the RPU control register “MCB Initializer Enabl eJ shown in Figure 29 (d) controls the enable / disable of MCB initializer 141.
  • MCB initializer 141 is It is ignored by “0”. For example, this register is placed at I / O bus address “0xFFFFE62C”.
  • the RPU control register “T tex ure Bu ff er S ize” shown in Fig. 29 (e) sets the overall size of the texture buffer. For example, this register is placed in the I / O bus address “0xFFFFE62A”.
  • FIG. 30 and 31 are flowcharts showing the flow of texture buffer area acquisition processing.
  • the memory manager 140 reads the member “T” output from the merge sorter 106.
  • the following processing is executed with the value of “se gme nt” as the input argument “ta gj” and the size information of the entire texture pattern data as the input argument “size”.
  • step S 1 the memory manager 140 identifies the boss MCB structure instance corresponding to the argument “s 1 ze ” (see FIG. 26), and sets the identified boss MCB structure instance index to the variable “boss ”.
  • step S2 the memory manager 140 adds to the chain of boss MCB structure instances pointed to by the variable “boss” a general MCB structure instance whose value of the member “Tag” matches the argument “tag” (step S4 In ⁇ S6, this is called “Detected MCB structure instance”.) Check whether the force is sufficient. If it exists, the process proceeds to step S 4 in FIG. 31, and if not, the process proceeds to step S 7 (step S 3).
  • step S4 of FIG. 31 the memory manager 140 deletes the detected MC B structure instance from the chain of boss MCB structure instances identified in step S1.
  • Step 1 the memory manager 140 selects the boss MCB structure instance corresponding to the member “Size” of the detected MC B structure instance (see FIG. 26), and the member “Fwd” of the boss MCB structure instance. Insert the detected MCB structure instance between the MCB structure instance pointed to by.
  • step S6 the memory manager 140 increments the value of the member “User” of the detected MCB structure instance. As a result, the texture buffer area was successfully acquired (normal end).
  • the memory manager 140 sets the index indicating the detected MCB structure instance as the return value “mc b”, outputs it to the texture cache block 126, and “1” indicating that the texture buffer area has already been acquired.
  • the return value “f 1 ag” set to “” is output to the texture cache block 126.
  • step S7 the memory manager 140 adds the member “S 1 ze” to the chain of boss MCB structure instances pointed to by the variable “boss”.
  • General MC B structure instance whose value is greater than or equal to the argument “size” and whose member “U ser” is “0”. It is called “instance”). Then, the process proceeds to step S 11, and the label that does not exist proceeds to step S 9 (step S 8).
  • step S 9 the memory manager 140 increments the variable “boss”.
  • step S 11 the memory manager 140 determines whether the member “S 1 ze” of the detected MCB structure instance is equal to the argument “size”. To do. If “No”, the process proceeds to step S 12, and if “Ye s”, the process proceeds to step S 18.
  • step S14 the detected MCB structure instance with the argument “size” and the member “S ize” that is 3 ⁇ 4 “T” was not found ⁇ , that is, a member with a value larger than the argument “size”.
  • the first MC B structure instance is obtained from the chain of free general MC B structure instances where the detected MC B structure instance with “S 1 ze” is detected.
  • step S15 the memory manager 140 adds the value obtained by adding the argument “s ⁇ ze” to the member “Ad dress” of the detected MCB structure instance to the member “Add” of the corresponding general MC B structure instance of “Furiichi”. ress ”, and set the value of the argument“ size ”from the member“ S ize ”of the detected MC B structure instance to the member“ S 1 ze ”of the free general MCB structure instance.
  • step S 15 among the areas managed by the detected MCB structure instance, the area obtained by subtracting the area indicated by the argument “s 1 Z e” is divided, and the obtained free general MCB Assign to a structure instance.
  • step S 16 the memory manager 140 identifies the boss MCB structure instance corresponding to the member “S ize” of the free general MCB structure instance (see FIG. 26), and identifies the identified boss MCB structure instance. And a general MCB structure instance that is currently pointed to by the member “B wd” of the corresponding boss MCB structure instance and a free general MCB structure instance between Increment the value of “try”.
  • the free general MCB structure The instance is newly incorporated in the chain of boss MC B structure instances corresponding to the size of the area allocated in step SI 5 as the last general MC B structure instance.
  • step S 1 7 the memory manager 1 4 0 is set to the member “S ize”> argument “si ze ” Assign the argument “size” to the member “S ize” of a detection MCB structure instance.
  • the member “S 1 ze” of the detected MC B structure instance is rewritten to the value of the argument “s 1 ze”.
  • step S 19 the memory manager 14 0 assigns the argument “tag” to the member “T ag” of the detected MC B structure instance.
  • step S 2 the memory manager 1 4 0 deletes the detected MC B structure instance from the chain! '
  • step S 21 the memory manager 14 0 identifies the boss MC B structure instance corresponding to the member “S 1 ze” of the detected MC B structure instance (see FIG. 26), and identifies the identified boss MC
  • the detection MC B structure instance is inserted between the B structure instance and the general MC B structure instance currently indicated by the member “F wd” of the boss MC B structure instance.
  • step S 2 the memory manager 1 4 0 increments the value of the member “U s e r” of the detected MC B structure instance.
  • steps S 1 8 to S 2 2 the detected MC B structure instance is deleted from the chain of currently linked boss MC B structure instances, and the boss MC B corresponding to the new member “S ize”. It is newly incorporated into the chain of structure instance as the first general MC B structure instance. '
  • the memory manager 1 4 0 sets the index indicating the detected MC B structure instance as the return value “mcb”, outputs it to the texture cache block 1 2 6 and indicates that a new texture buffer area has been acquired.
  • the return value “f 1 ag” set to “0” is output to the texture cache block 1 2 6.
  • the memory manager requests DMA from the DMAC 4 via the DMAC interface 14 2, and batches the texture pattern data from the external memory 50 into the newly secured texture buffer area.
  • this is a polygon, and the sprite's texture pattern data is sequentially applied to the reserved area as the drawing progresses.
  • step S2 will be given.
  • step S2 is performed only when the texture buffer area for polygons is reserved, and is not performed for sprites. Therefore, when the texture buffer area is reserved for the sprite, steps S2 and S3 are skipped and the process always proceeds to step S7.
  • the return value “f 1 a g” indicates “1”. This is because multiple polygons share one texture buffer area (that is, texture pattern data has already been read into the texture buffer area), so a new DMA ⁇ 3 ⁇ 4 is requested to read the texture pattern data. This indicates that it is not necessary. ,
  • step S 7 to S 10 the loop from step S 7 to S 10 to step S 7 does not have a general MC B structure instance suitable for the chain of boss MC B structure instances corresponding to the required size of the texture buffer area. In this case, it means that the chain of boss MC B structure instances with a larger index is searched sequentially.
  • the texture buffer area is acquired. Ends with an error as if failed. This ⁇ , the polygon / sprite that requested this texture buffer area is mapped with invalid texture pattern data in the drawing process.
  • the memory manager 1 4 0 finishes drawing the polygon sprite that fills the reserved texture buffer area, it releases the reserved texture buffer area and re-stores it to store other texture pattern data. Make it available. Such a texture buffer area release process will be described.
  • Fig. 32 is a flowchart showing the flow of texture buffer processing.
  • the index of the general MC B structure instance that managed the texture buffer area used is output to the memory manager 140.
  • the memory manager 140 executes the texture buffer release process using this index as the input argument “mc bj”.
  • step S31 the memory manager 140 decrements the “Us er” of the general MCB structure instance (referred to as “released MCB structure instance” in the following processing) indicated by the argument “mc b”. .
  • step S32 the memory manager 140 determines whether the value of the decremented member “Us er” is “0”, and proceeds to “Ye s” ⁇ step S 3 3 to set the “No” texture buffer. End the release process.
  • step S33 the memory manager 140 deletes the released MCB structure instance from the chain including the released MCB structure instance.
  • the memory manager 140 identifies the boss MCB structure instance corresponding to the member “Size” of the released MCB structure instance (see FIG. 26), and identifies the member “T” of the identified boss MC B structure instance.
  • the general MC B structure instance that “ap” currently points to referred to as “Tatsu: ⁇ MCB structure instance” in the following processing
  • the MCB that the member “Bwd” of the Tatsu: M CB structure instance points to Insert an MMB structure instance between the structure instance and.
  • step S35 the memory manager 140 inserts the argument “mc b” into the member “Ta p” of the boss MCB structure instance corresponding to the member “S ize” of the released MCB structure instance, and the member “En “try” is incremented and the texture buffer release process is terminated.
  • FIG. 33 is a diagram showing the chain structure of the boss MCB structure instance and the general structure force S of the general MCB structure instance S inserted in the chain of the boss MCB structure instance.
  • Figure 33 (a) and Figure 33 (b) show the boss MCB structure instance BS ⁇ —general MC B structure instance forest A ⁇ —general MC B structure instance # 8 ⁇ boss 1 ⁇ B structure instance
  • An example is shown in which a general MC B structure instance #O is newly inserted into the chain of a boss MCB structure instance BS that is linked in a closed ring shape, such as BS, as the previous general MC B structure instance.
  • Fig. 33 (a) shows before insertion
  • Fig. 33 (b) shows after insertion.
  • ⁇ —general MC B structure instance # 8 ⁇ boss 1 ⁇ B structure instance
  • An example is shown in which a general MC B structure instance
  • the memory manager 140 rewrites the member “Fwd” of the boss MCB structure instance BS that was pointing to the general MCB structure instance #A so that it points to the general MCB structure instance #C, and the boss MC B Rewrite member “Bwd” of general MCB structure instance #A that points to structure instance BS to point to general MCB structure instance #C.
  • the memory manager 140 sets the member “Fwd” of the general MCB structure instance #C to be newly inserted into the chain, the member “Bwd” to the general MCB structure instance #A, and the boss MCB structure. Rewrite to point to the instance BS.
  • the texture data is not read from the external memory 50 every time, but the read texture data is temporarily stored in the texture buffer on the main RAM 25. As the texture data is reused, useless access to the external memory 50 can be avoided. Also, by dividing the texture buffer on the main RAM 25 into the required size and dynamically allocating and releasing the area, the texture buffer usage efficiency increases, and the hardware resources for the texture buffer Can be prevented from becoming excessively large.
  • the drawing power of graphic elements is sequentially performed in units of horizontal lines. Therefore, texture data mapped to sprites is textured horizontally as the drawing process progresses. Since it is only necessary to read about 50 external memories in line units, the size of the area reserved in the texture buffer can be reduced. On the other hand, it is difficult to predict in advance which part of the texture data that will be mapped to the polygon will need the data on the texture data. Secure to Textile Janoffa.
  • the plurality of boss MCB structure instances are divided into a plurality of groups according to the size of the area to be managed, and the MC B structure instances in the group are mutually connected in a ring shape. Linked (see Figure 26 and Figure 33). For this reason, it is possible to easily search the MCB structure instance and thus each area of the texture buffer.
  • MCB initializer 141 force You can cancel the fragmentation of the texture buffer area by setting the initial value to the default value. As a means of eliminating fragmentation, not only can it be achieved with a circuit scale smaller than general garbage collection, but processing time is also short. Also, since it is a process for drawing graphic elements (polygon and sprite), if the entire texture buffer is initialized every time one video frame or one field is drawn, the drawing process There is no problem.
  • the MC PU sharizer 14 1 1 sets the interval for accessing the MC B structure instance in order to set the MC B structure instance to the initial value.
  • the initialization process can be performed in purple.
  • the main RAM 2 from other function units 2 is placed in the main RAM 2 5 of the MC B structure. There is a risk that the latency of access to 5 will increase and the performance of the entire system will deteriorate.
  • the texture buffer can be configured in an arbitrary size and on the main RAM 25 shared by the RPU 9 and other functional units. In this way, by enabling the texture notch to be set freely on the main shakuhachi of ⁇ 5, the size of the texture buffer area required is small: ⁇ ⁇ IJ area can be used by other functional units.
  • line buffers LB1 and LB 2 that can store data for one line of the screen are provided in RPU9 for drawing.
  • RPU9 for drawing.
  • two pixel buffers in RPU9 that store data for the number of pixels less than one line.
  • two buffers in RPU 9 that can store data for K (K is an integer greater than or equal to 2) lines.
  • RPU 9 uses a double buffer; ⁇ , but-A single buffer method can be used, or three or more buffers can be used; ⁇ can also be used .
  • YSU19 outputs Noless P PL every time sorting of one polygon instance is confirmed, but it outputs pulse P PL every time sorting of a predetermined number of polygon instances is confirmed. You can also. No. The same is true for Luz SPL.
  • the slicer 118 is a flag field of the polygon / sprite common data CI, and the force to determine whether the input data is for drawing the polygon. This distinction can also be made with a specific bit (79th bit) of the structure instance input at the same time as the sprite common data CI.
  • the polygon is a triangle, but the shape is not limited to this.
  • the splice is a quadrangle, the shape is not limited to this.
  • the shape of the texture is a triangle or a square, the shape of the texture is not limited to this.
  • the texture was divided into two, but the number of divisions is not limited to this.
  • the texture mapped to the polygon is a right triangle, the shape of the texture is not limited to this and can be any shape.
  • the texture buffer area acquisition processing by the memory manager 140 is achieved by hard wired logic. However, it can also be achieved by software processing by CPU 5, and there is an advantage that the above logic is unnecessary and processing can be made flexible. However, since the new time is slow, the CPU 5 must respond at high speed. Sincerely with hard-wired logic, this defect does not occur.

Abstract

 バーテックスソータ114は、ポリゴン構造体インスタンスを、ポリゴン/スプライト共通データCIに変換し、バーテックスエキスパンダ116は、スプライト構造体インスタンスを、同一形式のポリゴン/スプライト共通データCIに変換する。後段の回路118,120,122,124,126,11,130及び132は、同一形式のポリゴン/スプライト共通データCIに基づいて、スクリーンに表示される画像を生成する。ハードウェア規模を抑制しながらも、ポリゴン及びスプライトの任意の組み合わせからなる画像を生成でき、かつ、メモリ容量の増大を招くことなく、同時に描画できるポリゴン及びスプライトの数を多くできる。

Description

明細書 画像生成装置、 テクスチャマッピング装置、 画像処¾¾置、 及びテクスチャ格納方法 技術分野 '
本発明は、 二次元空間に投影された三次元立体の各面の形状を表すための多角形状のダラフ イツク要素 (ポリゴン) およびスクリーンに平行な矩形状のグラフィック要素 (スプライト) の任意の組み合わせからなる画像を生成する画像生成装置及びその関連技術に関する。
また、 本発明は、 スクリーン上の三次元モデルを構成するグラフィック要素 (ポリゴン) 及 ぴ二次元のグラフィック要素 (スプライト) にテクスチャをマッピングするテクスチャマツピ ング装置及びその関連技術に関する。
さらに、 本発明は、 複数のグラフィック要素からなる、 スクリーンに表示される画像を生成 する画像生成装置及びその関連技術に関する。 背景技術
従来より、 ポリゴンとスプライトとを混在して表示する技術が^ Ϊする。 この 特許文 献 1 (特開平 7— 8 5 3 0 8号公報) に紹介されているように、 2 Dシステムと 3 Dシステム とを独立に用意して、 表示のためのビデオ信号に変換する際に、 スプライトとポリゴンとを加 算合成する。
しかしながら、 この方法の:^には、 2 Dシステムと、 3 Dシステムとの、 それぞれに個別 に専用回路と、 フレームメモリが必要な上に、 ポリゴンとスプライト,とを、 十分に混合して表 現することは困難である。
特許文献 1では、 この問題を解決するための画像表示方法を開示している。 この画像表示方 法では、 画像表示面に表示する物体を、 その物体の各面を構成するポリゴンの描画命令により 描画すると共に、 物体のポリゴンをテクスチャ記憶領域に記憶されているテクスチャ画像によ り装飾する。
画像表示面に常に正立する所定の大きさの矩形のポリゴンに、 テクスチャ記憶領域上の、 上 記矩形と同じ大きさの矩形テクスチヤ画像を配 gi "る矩开細画命令を設定する。 この矩开鄉画 命令によって、 画像表示面上の上記矩形の位 g¾びテクスチャ記憶領域上の矩形テクスチャ画 像の位置を指定する。 この矩赚画命令により、 画像表示面上の任意の位置に、 矩形領域の描 画を行うことができる。
このように、 3 Dシステムを利用して、 2 Dシステムのスプライ卜と類似する画像(以下、「擬 似スプライト」 と呼ぶ。) を表示するようにして、 ハードウェアを少なくしている。
しかしながら、 3 Dシステムを利用しているので、 テクスチャ記憶領域には、 »1スプライ ト画像全体、 つまり、 膨テクスチャ画像全体を欄しておく必要がある。 結局、 ポリゴンに せよ、 擬似スプライトにせよ、 1グラフィック要素にマッピングするテクスチャ画像の全体を テクスチャ記憶領域に総内しなければならなレ、。 これは、 スクリーンにおける描画 の水平 ラインに含まれるピクセル群を、 テクスチャ画像が配置されるテクセル空間に写像すると、 3 Dシステムの^、 テクセル空間中のあらゆる S 上に写像される可能性があるからである。 これに対し、 スプライ卜の は、 テクセル空間の水平軸に5 Pfi1な 上にのみ写像される。 ポリゴンゃ ¾スプライトといったグラフィック要素ごとにテクスチャ画像全体を格納した のでは、 テクスチャ記憶領域の容量は限られているため、 同時に描画できるポリゴン及 スプライトの数が少なくなる。 同時に描画できるポリゴン及 υ凝似スプライ卜の数を多くした レ、 ¾ ^は、 メモリ容量を大きくせざるをえず、 少ないメモリ容量で、 同時に多くのポリゴン及 «似スプライ卜の描画を行うのは困難である。
また、 3 Dシステムを利用しているので、 3 Dシステムのポリゴンと同じ形状の、 擬似スプ ライトを表示できるに過ぎなレ、。 つまり、 ポリゴンが η (ηは 3以上の皿) 角形であれば、 スプライトも η角形になってしまレ、、両者の形状を異ならせることはできない。ちなみに、 三角形のポリゴン 2つで、 四角形の擬似スプライトを構成できるが、 この場合も、 2つの三角 形のポリゴンの画像全体を、 テクスチャ記憶領域に格納しておく必要があり、 必要なメモリ容 量が大きくなる。
そこで、 本発明は、 ハードウェア規模を抑制しながらも、 二次元空間に微された三次元立 体の各面の形状を表すための多角形状のグラフィック要素およびスク,リーンの枠に ¥ fな矩形 状のグラフィック要素の任意の組み合わせからなる画像を生成でき、 力、つ、 メモリ容量の増大 を招くことなく、 同時に描画できるグラフィック要素の数を多くできる画像^^装置及びその 関連技術を^することを目的とする。
ところで、 特許文献 2 (特開平 8—1 1 0 9 5 1号公報) に開示されたテクスチャマツピン グ装置は、 テクスチャマッピング部と、 画像メモリとにより構成される。 画像メモリは、 フレ ームメモリとテクスチャメモリとから構成され、 フレームメモリには、 テクスチャマッピング の ¾ ^となる 3次元画像データが表示平面に対応したフィル座標系で «され、 テクスチャメ モリには、 マッピングすべきテクスチャデータがテクスチャ座標系で格納される。
一般に、 このようなテクスチャメモリには、 マッピングされるそのままの態様で、 テクスチ ャカ される。 そして、 一般に、 テクスチャは、 二次元配列としてテクスチャメモリに格納 される。 このため、 マッピングされるそのままの態様で、 テクスチャメモリにテクスチャを格 納したのでは、 マツビングされない無駄なテクセルが発生する ¾ ^がある。
特に、 三角形にマッピングする三角形のテクスチャでは、 二次元配列内のおよそ半分ものテ クセルが無駄になってしまう。
そこで、 本発明の他の目的は、 メモリに格納されるテクスチャパターンデータに含まれる無 駄なテクセノ^ 'ータを極力削減して、 必要なメモリ容量を抑制できるテクスチャマツビング装 置及びその関連技術を«することである。
ところで、 特許文献 2には、 上記のようなテクスチャマッピング装置が開示されているが、 この特許文献 2は、 テクスチャメモリの領域管理については特に着目していない。 しカゝし、 適 切な領域管理をしないと、 テクスチャデータ取得のための外部への無駄なアクセスが多くなつ たり、 容量の大きいテクスチャメモリを確保しなければならなレヽ事態が発生する。
そこで、 本発明のさらに他の目的は、 テクスチャデータ取得のための無駄な外部メモリへの アクセスを回避でき、 かつ、 テクスチャデータを一時的に編内しておくためのハードウェアリ ソースが ig ijに大きくなることを抑制できる画^ ω装置及びその関連技術を^することで ある。 発明の開示
本発明の第 1の観点によれば、 画像生 «置は、 複数のグラフィック要素からなる、 tin己ス クリーンに表示される画像を^^する画胜成装置であって、 歸己複数のダラフィックス要素 は、 二次元空間に された三次元立体の各面の形状を表すための多角形状のグラフィック要 素および前記スクリーンの枠に平行な矩形状のダラフィック要素の任意の組み合わせからなり、 ffft己多角形状のダラフィック要素を生成するための第 1の表示情報を、 所定形式のデータに変 換する第 1のデータ変換手段 (バーテックスソータ 1 1 4に相当) と、 Ι ΙΕ矩形状のグラフィ ック要素を生成するための第 2の表示情報を、 l己所定形式のデータに変換する第 2のデータ 変換手段 (バーテックスエキスパンダ 1 1 6に相当) と、 ffrt己第 1のデータ変換手段およひ tir 記第 2のデータ変換手段から受け取った鎌己所定形式のデータに基づいて、 tin己スクリーンに 表示される it己画像を«する画像生成手段 (バーテックスソータ 1 14及びバーテックスェ キスパンダ 1 1 6の後段の回路に相当) と、 を備える。
この構成によれば、 多角形状のグラフィック要素 (例えば、 ポリゴン) を生成するための第
1の表示情報および矩形状のグラフィック要素 (例えば、 スプライト) を^^するための第 2 の表示情報を同一形式のデータに変換するので、 多角形状のグラフィック要素と矩形状のダラ フィック要素とで、 画^ Ϊ成手段の内 能プロックを極力共通化することができる。 このた め、 ハードウェア規模の抑制を図ることができる。 また、 従来のように 3 Dシステムだけではなく、 スクリーンの枠に平行な矩形状のグラフィ ック要素の描画を行う 2 Dシステムをも搭載しているので、 矩形状のグラフィック要素を描画 する ^は、 当該ダラフィック要素全体のテクスチャ画像を一括して取得する必要はなく、 例 えば、 スクリーンにおける 1ライン単位での画像データの取得が可能である。 このため、 メモ リ容量の増大を招くことなく、 同時に描画できるグラフィック要素の数を多くできる。
以上の結果、 ハードウェア規模を抑制しながらも、 二次元空間に 影された三次元立体の各 面の形状を表すための多角形状のグラフィック要素およびスクリーンの枠に5 Wな矩形状のグ ラフィック要素の任意の組み合わせからなる画像を生成でき、 かつ、 メモリ容量の増大を招く ことなく、 同時に描画できるグラフィック要素の数を多くできる。
上記画 成装置において、 第 1の二次元直 ¾¾標系は、 lift己グラフィック要素の fiJlBスク リーンへの表示に用いられる二次元座標系であり、 第 2の二次元直 標系は、 fiilEグラフィ ック要素にマッピングされる画像データ力 己置される二次元座標系であり、 爾己所定形式のデ ータは、 複数の頂点フィールドを含み、 ΙίίΕ頂点フィ一ノレドはそれぞれ、 第 1フィーノレドと第 2フィーノレドとを含み、 脑第 1のデータ変換手段は、 廳己第 1の二次元直 3¾標系における 艦己多角形状のダラフィック要素の頂点の座標を肅己第 1フィーノレドに棚し、 力つ、 描画モ 一ドに応じた形式で fillB多角形状のグラフィック要素の頂点のパラメータを fillH第 2フィール ドに難し、 應己第 2のデータ変換手段は、 嫌己第 1の二次元直 ¾¾標系における^ ΠΒ矩形状 のグラフィック要素の頂点の座標を編己第 1フィーノレドに格納し、 かつ、 fiffS第 1の二次元直 ¾¾標系における 己矩形状のグラフィック要素の頂点の座標を前記第 2の二次元直交座標系 へ写像した座標を ΙΐίΐΞ第 2フィーノレドに格納する。
この構成によれば、 第 1のデータ変換手段は、 所定形式のデータの第 2フィーノレドに、 描画 モードに応じた形式で頂点のパラメータを漏するので、 所定形式のデータの形式の同一性を 保持しながらも、 3 Dシステムにおいて、 異なる描画モードでの描画を実現できる。
上記画 置において、 tiff己第 2のデータ変換手段は、廳己第 2の表示情報に含まれる、 廳己第 1の二次元直 標系における嫌己矩形状のグラフィック要素の 1つの頂点の座標、 及 び Ιίί Εグラフィック要素のサイズ情報に基づレ、て、 tilt己第 1の二次元直 ¾1¾標系における他の 3つの頂点の一部または全部の座標を算出し、 予め前記第 2の表示情報に含まれる頂点の座標 と算出された頂点の座標とを廳己第 1フィーノレドに欄し、 力つ、 予め嫌己第 2の表示情報に 含まれる頂点の座標と算出された頂点の座標とを鎌己第 2の二次元直 3¾標系へ写像した座標 を^^し、 生成された tiHS第 2の二次元直魏標系の座標を tiff己第 2フィーノレドに^ frTる。 この構成によれば、 他の 3つの頂点の一部または全部の座標を計算で求めるので、 第 2の表 示情報に 4つの頂点全ての座標を含める必要はなく、 第2の表示情報の格納に必要なメモリ容 量を抑制できる。
上記画 置におレ、て、歸己第 2のデータ変換手段は、薩己第 2の表示情報に含まれる、 嫌己第 1の二次元直交座標系における Ι ΙΞ矩形状のグラフィック要素の 1つの頂点の座標、 前 記グラフィック要素の滅率、 及ひ職グラフィック要素のサイズ情報に基づレヽて、 ι の二次元直交座標系における他の 3つの頂点の一部または全部の座標を算出し、 予め前記第 2 の表示情報に含まれる頂点の座標と算出された頂点の座標とを 第 1ブイールドに格納し、 かつ、 予め tiiiE第 2の表示情報に含まれる頂点の座標と算出された頂点の座標とを tina第 2の 二次元直 ¾1¾標系へ写像した座標を^^し、 ^^された鎌己第 2の二次元直 標系の座標を ΙίίΐΒ第 2フィーノレドに格納する。
この構成によれば、 他の 3つの頂点の一部または全部の座標を計算で求めるので、 第 2の表 示情報に 4つの頂点全ての座標を含める必要はなく、 第 2の表示情報の ¾ に必要なメモリ容 量を抑制できる。 また、 第 2の二次元直 ¾|¾標系へ写像された座標はグラフィック要素の 率が反映されたものであるため、 原画像を拡大また〖满小した画像をスクリーンに表示する場 合でも、 拡大後または縮小後の画像データを予めメモリ上に用意する必要はなく、 画像データ の格納に必要なメモリ容量を抑制できる。
上記!Kte¾¾置において、 l己第 1のデータ変換手段は、 fiJlB第 1の表示情報に含まれる、 lift己多角形状のグラフィック要素の頂点の前記第 1の二次元直交座標系における座標を取得し て前記第 1フィールドに格納し、 前記描画モードがテクスチャマッピングでの描画を示してい る 、 廳己第 1のデータ変換手段は、 廳己第 1の表示情報に含まれる、 ΙϋΙΞ多角形状のダラ フィック要素の頂点の frlE第 2の二次元直 標系における座標を算出するための情報と遠近 補正用パラメータとを取得し、 鎌己第 2の二次元直 標系における頂点の座標を算出して、 遠近補正を施し、 遠近補正後の頂点の座標と 近補正用パラメータとを it己第 2フィーノレ ドに搬 ήし、 tin己描画モードがグーローシェーディングでの描画を示している 、 i のデータ変換手段は、 fffl己第 1の表示情報に含まれる、 ffJlE多角形状のグラフィック要素の頂 点のカラーデータを取得し、 取得したカラーデータを IB第 2フィールドに格納する。
この構成によれば、 所定形式のデータの形式の同一性を保持しながらも、 3 Dシステムにお いて、 テクスチャマッピングおよびグーローシエーディングといった 2種類の描画モードでの 描画を実現できる。
上記画像 装置にぉレ、て、 編己所定形式のデータは、 当該データが ¾ίΠΕ多角形状のダラフ ィックス要素である力膽己矩形状のグラフィックス要素であるかを示すフラグフィーノレドをさ らに含み、 ΙίίΙΒ第 1のデータ変換手段は、 SiilSフラダフィ一ノレドに当該データが嫌己多角形状 のグラフィックス要素であることを示す情報を棚し、 m 2のデータ変換手段は、 膽己フ ラグフィールドに当該データが編己矩形状のダラフィックス要素であることを示す情報を する。
この構成によれば、 所定形式のデータの同一性を保持しながらも、 所定形式のデータを受け 取る画像^^手段は、 フラグフィールドを参照することにより、 描画^のグラフィック要素 の種類を容易に判別して、 グラフィック要素の種類ごとの処理を行うことができる。
この画像生成装置にぉレ、て、 tiHB画像 手段は、 藤己第 1フィールドに格納された頂点の 座標に基づいて、 己スクリーンの描画 のラインと tiff己グラフィック要素の辺との 2つの 交点の座標を算出し、 その差分を算出して第 1のデータとする交点算出手段 (スライサ 1 1 8 に相当) を含み、 受け取った ΙίίΙΕ所定形式のデータに含まれる嫌己フラグフィールドが、 編己 多角形状のグラフィック要素であることを示 、 廳己交点算出手段は、 嫌己描画モードに 応じて lift己第 2ブイ一ノレドに 内された頂点のパラメータに基づいて、 ffi|a2つの交点におけ るパラメータを算出し、 その^^を算出して第 2のデータとし、 受け取った ΙΐίΙΞ所定形式のデ —タに含まれる藤己フラダフィ一ノレドが、 鐘矩形状のダラフィック要素であることを示" « 合、 嫌己交点算出手段は、 lift己第 2フィールド:に含まれる肅己第 2の二次元直 ¾1標系におけ る頂点の座標に基づいて、 嫌己 2つの交点におけるパラメータとしての、 ftjf己 2つの交点の前 記第 2の二次元直 ¾¾標系における座標を算出し、 その^を算出して第 2のデータとし、 前 記交点算出手段は、 前記第 2のデータを前記第 1のデータで除して前記第 1の二次元座標系に おける単 ίί 標当りの当該パラメータの変化量を求める。
この構成によれば、 フラグフィーノレドを参照することにより、 グラフィック要素の種類を容 易に判別して、 その種類に応じた第 2のデータの算出を行うことができる。 また、 第 1の二次 標系における単 標当りのパラメータの変ィ匕量が後段に送出されるめで、後段において、 上記 2つの交点間の各パラメータを線形補間により容易に算出できる。
この画像生成装置にぉレヽて、 受け取った鎌己所定形式のデータに含まれる l己フラダフィー ノレドが firlH多角形状ダラフィック要素であることを示し、 かつ、 fflf己描画モードがテクスチヤ マッピングでの描画であることを示している ¾^、 tiff己交点算出手段は、 嫌己第 2フィールド に m ftされている遠近補正後の頂点の座標と遠近補正用パラメータとに基づいて、 ffrf己 2つの 交点の遠近補正後の頂点の座標と遠近補正用パラメータとを算出し、 その を算出して ffifB 第 2のデータとし、 受け取つた前記所定形式のデータに含まれる前記フラダフィールドが前記 多角形状グラフィック要素であることを示し、 カゝつ、 ΙίίΙΒ描画モードがグーローシエーデイン グでの描画であることを示している 、 tins交点算出手段は、 tiriE第 2フィールドに格納さ れているカラーデータに基づいて、 ttflB 2つの交点のカラーデータを算出し、 そのカラーデー タの を算出して l己第 2のデータとする。 この構成によれば、 描画モードがテクスチャマッピングでの描画であることを示している場 合、 後段において、 上記 2つの交点間の第 2の二次元直據標系における各座標を、 遠近補正 後の頂点の座標と遠近補正用パラメータの線 間により容易に算出できる。 一方、 描画モー ドがグーローシェーディングでの描画であることを示している^、 後段において、 上記 2つ の交点間の各カラーデータを線形補間により容易に算出できる。
この画^ «装置において、 ttHE画 手段は、嫌己矩形状のグラフィック要素に対して、 ffif己交点算出手段により算出された、 前記第 1の二次元直交座標系の単位座標値当たりの前記 第 2の二次元直 標系の座標の変ィ匕量を、 編己 2つの交点のレ、ずれ力一方の嫌己第 2の二次 元直 ¾1標系における座標に順^口えてレ、き、 tiiiS 2つの交点間の l己第 1の二次元直 ¾¾標 系の各座標における前記第 2の二次元直交座標系の座標を算出する加算手段 (ピクセルステッ ノ 1 2 0に相当) をさらに含み、 ItJfK)ロ算手段は、 ΙΐΠ己描画モードがテクスチャマッピングで の描画を示している前記多角形状のグラフィック要素に対して、 前記第 1の二次元直交座標系 の単 標値当たりの tilt己第 2の二次元直 ¾1標系における遠近補正後の頂点の座標と遠近補 正用パラメータの変化量を、 tijfe 2つの交点のレ、ずれ力一方の嫌己第 2の二次元直魏標系に おける遠近補正後の頂点の座標と遠近補正用パラメータに順 ¾fo¾えてレ、き、 廳己 2つの交点間 の遠近補正後の頂点の座標と遠近補正用パラメータを算出し、 廳5¾ロ算手段は、 廳己描画モー ドがグーローシエーディングでの描画を示している前記多角形状のグラフィック要素に対して、 tin己交点算出手段により算出された、 前記第 1の二次元直交座標系の単位座標当たりの力ラー データの変化量を、 鍾己 2つの交点のいずれ力一方のカラーデータに順 ¾fc¾えていき、 ΙϋΐΒ 2 つの交点間の前記第 1の二次元直交座標系の各座標におけるカラーデータを算出する。
このように、 矩形状のグラフィック要素に対して、 第 1の二次 標系における単 標当 りの第 2の二次元直 標系の座標の変化量に基づレ、て、 第 2の二次元直 ¾¾標系における上 記 2つの交点間の各座標を線形補間により容易に算出できる。 一方、 描画モードがテクスチャ マッピングでの描画を示している多角形状のグラフィック要素に対して、 第 1の二次元座標系 における単41¾標当りの第 2の二次元直 ¾¾標系の遠近補正後の頂点の座標と遠近補正用パラ メータの変化量に基づレヽて、 上記 2つの交点間の遠近補正後の頂点の座標と遠近補正用パラメ ータを線形補間により容易に算出できる。 また、 描画モードがグーローシェーディングでの描 画を示している多角形状のグラフィック要素に対して、 第 1の二次元座標系における単 ίώ 標 当りのカラーデータの変化量に基づいて、 上記 2つの交点間の各カラーデータを線形浦間によ り容易に算出できる。
上記画^^ ¾置において、 IS画^^手段は、 ήίΐ スクリーンを構成するライン単位で、 所定のライン II醉に従って描画処理を行い、 辦己第 1のデータ変換手段は、 複数の觸己第 1フ ィールドに含まれる頂点の座標の順が、 歸己所定のライン順序にお!/、て項点が出現する順に一
@ττるように、 嫌己頂点フィールドの内容を A t え、 tins第 2のデータ変換手段は、 m 形状のグラフィック要素の頂点の座標の順が、 前記所定のライン順序において頂点が出現する 順に一 "るように、 tiilB各頂点フィールドにデータを格納する。
この構成によれば、 多角形状のグラフィック要素および矩形状のグラフィック要素のレヽずれ についても、 所定形式のデータにおいて、 頂点の出 嗔に並べられているので、 後段での描画 処理が容易になる。 '
上記画像生成装置において、 廳己画像 «手段は、 廳己所定形式のデータを受け取って、 前 記第 1フィ一ノレドに格納された頂点の座標に基づレ、て、 藤スクリーンの描画職のラインと 前記グラフィック要素の辺との 2つの交点の座標を算出し、 その差分を算出して第 1のデータ とし、 力、つ、 Mt己第 2フィールドに欄された頂点のパラメータに基づいて、 firlB 2つの交点 におけるパラメータを算出し、 その^ を算出して第 2のデータとし、 かつ、 tiJlH第 2のデー タを tilf己第 1のデータで除して前記第 1の二次 標系における単位座標当りの当該パラメ一 タの変化量を求める交点算出手段 (スライサ 1 1 8に相当) を含む。
この構成によれば、 第 1の二次 標系における単ィ 標当りのパラメータの変ィヒ量が後段 に送出されるので、 後段において、 上記 2つの交点間の各パラメータを線开細間により容易に 算出できる。
この画像 «装置において、 廳己画像^ ¾手段は、 藤己交点算出手段により算出された、 前 記第 1の二次元直交座標系の単^ ¾標当たりの当該ハ。ラメータの変化量を、 前記 2つの交点の レ、ずれ力一方の嫌己パラメータに順 ¾fc¾えてレヽき、 tff!H 2つの交点間の tilt己第 1の二次元直交 座標系の各座標におけるパラメータを算出するカロ算手段 (ピクセルステツパ 1 2 0に相当) を さらに む。
このように、 第 1の二次元座標系における単^ ffi標当りのパラメータの変化量に基づいて、 上記 2つの交点間の各パラメータを線形補間により容易に算出できる。
上記画像生成装置において、 所定纖 IJに従って、 描画処理における嫌己多角形状のグラフィ ック要素および前記矩形状のグラフィック要素の描画優先順位を決定するマージソート手段 (マージソータ 1 0 6に相当) をさらに備え、 膽己第 1の表示情報は、 ΙίίΙ己描画優先順位が高 レ、順に予め第 1の配列に棚され、 嫌己第 2の表示情報は、 ΙίίΐΞ描画優^/頃位が高レ、順に予め 第 2の配列に格納され、 ffiiaマージソート手段は、 fijfS第 1の表示情報と tins第 2の表示情報 との ΙίίΙΕ描画優 feJ噴位を比較し、 爾己第 1の表示情報の廳己描画優先順位が ΙίίΙΕ第 2の表示情 報の ItifS描画優fel頃位より高レヽ^ \ ΙΞマージソート手段は、 嫌己第 1の配列から tiiia第 1 の表示情報を読み出し、 前記第 2の表示情報の前記描画優 5¾頃位が前記第 1の表示情報の前記 描画優先順位より高い^、 fit己マージソート手段は、 嫌己第 2の配列から ΙίΐΙΒ第 2の表示情 報を読み出し、 tfrlBマージソート手段は、 編己第 1の表示情報を読み出した は、 当該第 1 の表示情報を単一のデータ列として出力し、 tiil5第 2の表示情報を読み出した^は、 当該第 2の表示情報を鎌己単一のデータ列として出力する。
この構成によれば、 第 1の表示情報あるいは第 2の表示情報の如何に関係なく、 全ての表示 情報を描画優先順位に基づいて整列した上で、 同じ単一のデータ列として出力されるので、 多 角形状のダラフィック要素と矩形状のグラフィック要素とで、 後段の機能プロックを極力共通 ィ匕でき、 ハードウェア規模の抑制を一層図ることができる。
この画像生成装置において、 所定のライン順序に従って行う描画処理において、 前記グラフ ィック要素の複数の頂点の前記第 1の二次元直交座標系における座標のうち、 f己所定のライ ン順序にぉレヽて最も早く出現する頂点の座標を出現頂点座標としたときに、 廳己所定纖 IJは、 I己出現頂点 標が tins所定のライン順序において早く出現する廳己グラフィック要素の tfrt己 描画優先順位が高くなるように定められる。 '
この構成によれば、 出現頂点座標が早く出現するグラフィック要素の描画優先順位が高くな る所定繊 IJにしたがってマージソートを行うので、 単一のデータ列として出力される第 1の表 示情報及び第 2の表示情報に対して、 出力順に描画処理を行うだけでよレヽ。 このため、 1フレ ーム以上の画像を格納するための大容量のバッファ (フレームバッファ等) を実装する必要は 必ずしもなく、 より容量の小さいバッファ (ラインバッファや、 1ラインに満たないピクセル を描画するピクセルバッファ等) を実装した であっても、 多くの多角形状のグラフィック 要素及び矩形状のダラフィック要素を組み合わせた画像の表示が可能になる。
この画像生成装置にぉレヽて、 婦己マージソート手段は、 ffl 出現]^点座標が同じ値を示して いる齢、 編己第 1の表示情報に含まれる表示深度情報と嫌己第 2の表示情報に含まれる表示 深度情報と、 を比較し、 より奥に描画される方の f己グラフィック要素の l己描画優先順位が 高いと判断する。
この構成によれば、 多角形状のグラフィック要素と矩形状のグラフィック要素とで出現頂点 座標が同じ 、 描画舰のラインにおいて、 表示 «の順で描画優先順位が決定される。 従 つて、描画練のラインにおいて、より奥に描画されるグラフィック要素が先に描画される (表 示深度順の描画)。 このため、 半透明合成を適切に行うことができる。
この画像生成装置において、 tiff己マージソート手段は、 前記出現頂点、座標が、 最初に描画す るラインより前に位置する齢は、 当該出現頂, 標を最初に描画するラインに相当する座標 に置き換えて、 fiJlH描画優先順位を決定する。
この構成によれば、 多角形状のグラフィック要素及び矩形状のグラフィック要素の双方の出 現頂点座標が、 最初に描画するライン (つまり、 スクリーンの先頭ライン) より前に位置する は、 それらは同一座標とみなされるので、 上記のように、 表示深度情報に基づいて、 より 奥に描画される方のグラフィック要素の描画優 噴位が高いと判断される。 従って、 スクリー ンの先頭ラインにおいて、 グラフィック要素は、 表示深 頃で描画される。 このような先頭ラ インでの処理を行わない 、 先頭ラインの描画においては、 必ずしも表示深 頃での描画が 保証されなレヽが、 この構成によれば、 先頭ラインから表示深 噴での描画を行うことが可能と なる。 表示深度順で描画する効果は上記と同様である。 - この画像生成装置において、 謙己マージソート手段は、 インタレース表示が行われる齢、 fflf己出現頂点座標が、 奇数フィ一ノレドおよび偶数フィ一ノレドのうちの表示 ¾ ^のフィールドで 描画されないラインに相当する 、 そのラインの次のラインに相当する座標に当該出現頂点 座標を置き換えて扱う。
この構成によれば、 インタレース表示カ行われる において、 表示 のフィールドで描 画されないラインに相当する出現頂点座標と、 そのラインの次のライン (表示 のフィール ドで描画されるライン) に相当する出現頂点鹿標と、 が同一座標として极ゎれるので、 上記の ように、 表示深度情報に基づいて、 より奥に描画される方のグラフィック要素の描画優先順位 が高いと判断される。 このため、 インタレース表示の でも表示深 頃での描画処理力 S保証 される。 表示深度順で描画する効果は上記と同様である。
本発明の第 2の観点によれば、 テクスチャマッピング装置は、 多角形状のグラフィック要素 にテクスチャをマッビングするテクスチャマツビング装置である。 前記テクスチャは複数の切 片に分割され、 廳己テクスチャが ϋίΙΕグラフィックス要素にマッピングされる態様で配置され る第 1の二次元テクセル空間において少なくとも 1つの ήίίΙ己切片が回転及ひ 動されて、 tiff己 切片の全てが、 it己テクスチャがメモリに される態様で配置される第 2の二次元テクセル 空間に配置される。 '
そして、 このテクスチャマッピング装置は、 嫌己第 2の二次元空間に配置される tiff己切片の 全てが 内されている二次元配列から tif!E複数の切片を読み出す読出手段と、 読み出された前 記複数の切片を結合する結合手段と、 fill己複数の切片を結合して得られた ΙίίΙΕテクスチャを前 記多角形状のグラフィック要素にマッピングするマッピング手段と、 を備える。
この構成によれば、 テクスチャは、 グラフィックス要素にマッピングされる態様でメモリに TOされるのではなく、 複数の切片に分割され、 カゝつ、 少なくとも 1つの切片が回 ひ 動 されて、 メモリに される。 このため、 例えば三角形等、 四角形以外のポリゴンにマツピン グするテクスチャをメモリに^ 3する ¾ ^においても、 テクスチャが されなレヽ無駄な記憶 領域を極力省くことができ、 効率良く できるので、 テクスチャパターンデータを^する メモリの容量を小さくできる。
つまり、 テクスチャパターンデータを構成するテクセノ^ータのうち、 テクスチャが配置さ れる領域のテクセノ^ータは実体的な内容 (カラーを直接的あるいは間接的に示す情報) を含 むものであるが、 テクスチャが酉己置されない領域のテクセルザ'ータは、 実体的な内容を含まな レ、無駄なものである。 この無駄なテクセゾ^'ータを極力省くことで、' 必要なメモリ容量を抑制 できる。
ここで言うところのテクスチャパターンデータとは、 テクスチャ力 ¾己置される領域のみのテ クセルデータを意味するのではなく、 それ以外の領域のテクセルデータを含む。 例えば、 三角 形のテタスチヤを含む四角形の領域のテクセルデータである。
このテクスチャマッピング装置において、 tfjf己多角形状のグラフィック要素は、 三角形状の グラフィック要素であり、 前記テクスチャは、 三角形状のテクスチャである。
特に三角形のグラフィック要素にマッピングする三角形のテクスチャをそのまま 2次元配列 に格納すると、 酉己列内のおよそ半分のテクセノ^ータが無駄になる。 三角形のグラフィック要 素にマッピングされる三角形のテクスチャを複数に分割して格納することにより、 無駄になる テクセノ ータを大幅に減らすことができる。
このテクスチャマッピング装置において、 Ιίΐ テクスチャは、 2つの ήΐίΐΞ切片に分割され、 そのうちの 1つの ffif己切片が回転及ひ移動されて、 tfriH 2つの切片が tiriH二次元配列に格納さ れている。
この構成によれば、 三角形のグラフィック要素にマッピングされる三角形のテクスチャを 2 つに分割して Wlすることにより、 無駄になるテクセノ^ータを大幅に減らすことができる。 このテクスチャマッピング装置において、 己三角形状のテクスチャは、 前記第 2の二次元 テクセル空間の第 1座標軸に 亍な辺と ΙίίΙ己第 1座標軸に直交する第 2座標軸に TOな辺とを 有する直角三角形状のテクスチ'ャであり、 前記直角三角形状のテクスチャは、 前記第 1座標軸 あるいは漏己第 2座標軸のレ、ずれかに TOな il によって、 1«2つの切片に分割されており、 I S 1つの切片が 1 8 0度回転及ひ 動されて、 firf己 2つの切片が l己二次元配列に^!内され ている。
この構成によれば、 テクスチャは直角三角形状であるため、 直角をなす 2辺をそれぞれ、 第
1の二次元テクセル空間の一方座標軸及 方座標軸に一致させ、 カゝつ、 直角の頂点を第 1の 二次元テクセル空間の原点に設定することにより、 第 1の二次元テクセル空間における三角形 の頂点の座標の指定のために必要なデータ量を少なくできる。
上記テクスチャマツビング装置において、 tillsテクスチャの tiJlE二次元配列への 内形態と して、 第 1格納形態及び第 2 形態が用意されており、 tinsテクスチャは、 複数のテクセノレ からなり、 編己第 1漏形態では、 rn 2の二次元テクセル空間の第 ι座標軸あるレ、は HIIB 第 1座標軸に直交する第 2座標軸のレヽずれかに、 sp fかつ一次元に並んだ第 1の所定数のテク セルを 1単位とし、 その 1単位のテクセルがメモリの 1ワードに^ ήされるように、 llE全て の切片が SfllH二次元配列に格納され、 嫌己第 2 内形態では、 編己第 2の二次元テクセル空間 に二次元に並んだ第 2の所定数のテクセルを 1単位とし、 その 1単位のテクセルが 己メモリ の 1ヮードに格納されるように、 嫌己全ての切片が ήίΠΞ二次元配列に格納される。
ここで、 多角形状のグラフィックス要素 (例えば、 ポリゴン) を、 二次元空間に された 三次元立体の各面の形状を表すためのものとする。 このように、 三次元立体を表すためのダラ フィック要素であっても、 (スプライトと同様の) スクリーンに正立する二次元のグラフィック 要素として使用する もある。
スクリーンは複数の ffiに並んだ水平ラインで構成されるところ、 三次元立体を表すための グラフィック要素を二次元のグラフィック要素として使用する は、 1水平ラインごとにテ クセノ^ータを取得することにより、 テクセ 'Λ ^—タを一時^するためのメモリ容量を削減 することができる。 ,
第 1の搬形態では、 メモリの 1ヮードに一次元に並んだテクセ 一タカ されるので、 1水平ラインごとにテクセノ^ータを取得する際のメモリへのアクセス回数を減らすことがで さる。
一方、 多角形状のグラフィックス要素によって三次元立体を表 は、 スクリーンの水平 ラィン上のピクセルを第 1の二次元テクセル空間に写像したとき、 必ずしも第 1の二次元テク セル空間の水平ライン上に写像されるとは限らない。
このように、 ピクセルが第 1の二次元テクセル空間の水平ライン上に写像されなレヽ: ^でも、 第 2の格納形態ではメモリの 1ヮードに二次元に並んだテクセノ^一タカ S格納されるので、 ピ クセルが写像された座標に配置されたテクセノ^一タカ メモリカゝら既に取得したテクセノ^ ータの中に存在する可能性が高く、 テクセ /^、一タ取得のためのメモリへのアクセス回数を減 らすことができる。
上記テクスチャマツビング装置にぉレヽて、 ffllEテクスチャの繰り替えしマッビングが行われ る は、 嫌己分割並びに編己回転及ひ夥動なしに、 鎌己テクスチャは嫌己二次元配列に されており、 tirlE読出手段は、嫌己二次元配列から IEテクスチャを読出し、 tfilB^合手段は、 結合処理を行わず、 tilt己マッビング手段は、 tilt己読出手段が読み出した HBテタスチヤを tiHE 多角形状のグラフィック要素にマッピングする。
この構成によれば、 テクスチャは分割並びに回 fe¾ひ 動なしに二次元配列に格納されるの で、 水平方向及び Z又は垂直方向にテクスチャ力 s繰り返すようなテクスチャマッビングを行う 際の、 テクスチャパターンデータのメモリへの格納に好適である。 しかも、 繰り返しマツピン グなので、 同じテクスチャパターンデータを使用することができ、 メモリ容量の肖 IJ減が可能と なる。
本発明の第 3の観点によれば、 画像処«置は、 ノ ィリニアフィルタリングを 亍する画像 処理装置である。 テクスチャが複数の切片に分害 IIされ、 前記テクスチャが多角形状のグラフィ ック要素にマツビングされる態様で配置される第 1の二次元テクセル空間において少なくとも 1つの l己切片が 1 8 0度回転及ひ 動されて、 fillB切片の全てが、 Ι ΐ己テクスチャがメモリ に格納される態様で配置される第 2の二次元テクセル空間に配置されており、 かつ、 tin己第 2 の二次元テクセル空間においてバイリニアフィルタリングで用いるテクセルが IB切片に ¾ して配置されるように、 tilt己切片の全てが二次元配列に格納される。
そして、 この画像処 a¾置は、 tinsグラフィック要素に含まれるピクセルが写像される廳己 第 1の二次元テクセル空間の座標に対応する編己第 2の二次元テクセル空間における座標(S, Τ) を算出する座標算出手段と、 写像された編己ピクセルに対応する漏 3¾標 (S, T) 力 S、
1 8 0度回転及ひ移動なしに tfriE二次元配列に された肅己切片に含まれる 、 firiE第 2 の二次元テクセル空間の座標 (S , T)、座標 (S + 1 , Τ)、座標 (S , T+ l )、及び座標 (S + 1, T+ 1 ) に位置する 4つのテクセルを読み出し、 写像された嫌己ピクセルに対応する前 t (s, τ) 力 1 8 0度回 び移動して tin己二次元配列に搬内された廳己切片に含ま れる^ \ 艦己第 2の二次元テクセル空間の座標 (S , T)、 座標 (S— 1, T)、 座標 (S, T一 1 )、 及び座標 ( S— 1, T— 1 ) に位 gi "る 4つのテクセルを読み出す読出手段と、 tiff己 読出手段が読み出した嫌己 4つのテクセルを用いて、 写像された tirf己ピクセルのバイリニアフ ィルタリングを 亍するバイリニァフィルタリング実行手段と、 を備える。
この構成によれば、 写像されたピクセルに対応する座標 (s, τ) 力 s、 1 8 o m^ 動して二次元配列に された切片に含まれる ^でも、 これを考慮して、 4テクセルを取得 する。 また、 分割して欄される切片同士の間には、 ノ ィリニアフィルタリングで用いるテク セルが切片に ¾するように格納される。
これらのこと力ら、 テクスチャを分割してメモリに する^でも、 バイリニアフィルタ リング処理を問題なく実現できる。
本発明の第 4の観点によれば、 画像処¾¾置は、 三角形状のグラフィック要素にテクスチャ をマッビングし、 tiilBグラフィックス要素を構成する各ピクセルの描画処理を行う画像処¾¾ 置である。 ピクセルの描画力行われる二次元直 ¾H標系を第 1の座標系とし、 tilt己第 1の座標 系における座標を (X, Y) で表し、 tilt己テクスチャを構成する各テクセルが ΙίίΐΞグラフイツ クス要素にマッビングされる態様で配置される二次元直 ¾ 標系を第 2の座標系とし、 己第 2の座標系における座標を (U, V) で表し、 廳己各テクセルがメモリに 内される態様で配 置される二次元直 «標系を第 3の座標系とし、 肅己第 3の座標系における座標を (S, T) で表し、 鎌己各テクセルのうちで最大の V座標を持つテクセルの V座標に基づいて V座標閾値 が定められる。
そして、 この画像処¾¾置は、 ΙϋΙΕ第 1の座標系におけるピクセルの座標 (X, Υ) を觸己 第 2の座標系に写像し、 ピクセルの座標 (U, V) を求める座標算出手段と、 肅己ピクセ ルの V座標が ffllBV座標閾値以下の 、 ΙίίΙΕピクセルの座標 (U, V) を ΙίίΐΞ第 3の座標系 における tiff己ピクセルの座標 (S , T) とし、 ピクセルの V座標が編己 V座標閾値を超え る 、 嫌己各ピクセルの座標 (U, V) を 1 8 0度回転及ひ移動して ffif己第 3の座標系にお ける嫌己ピクセルの座標 (S, T) に変換する座標変換手段と、 ftif己各ピクセルの座標 (S, τ) に基づいてテクセノ^ータを tinsメモリから取得する読出手段と、 を備える。
この構成によれば、 テクスチャが V座標閾値を境に 2分割されて、 V座標が大きい方の切片 が 1 8 0度回^ ¾ひ移動して格納されているj^に、 先から適切なテクセノ^ータを読み 出すことができる。 ,
この画像処3¾置において、 前記座標変換手段は、 テクスチャの繰り返しマッピングが行わ れる 、 編己ピクセルの V座標が廳己 V座標閾値以下カ かにかかわらず、 U座標の上 4M ビット (Mは 1以上の :) を 「0」 に置き換えた値を嫌己ピクセルの S座標とし、 V座標の 上位 Nビット (Nは 1以上の難) を 「0」 に置き換えた値を編己ピクセルの T座標として、 藤己第 2の座標系における rfB各ピクセルの座標 (u, V) を鎌己第 3の座標系における tina 各ピクセルの座標 (S , T) に変換する。
この構成によれば、 上 {4Mビット及び Z又は上位 Nビットをマスクする (「0」 にする) こと により、 同じテクスチャパターンデータを使用して、 容易にテクスチャの繰り返しマッピング を実現できる。 その結果、 メモリ容量の削減が可能となる。
本発明の第 5の観 によれば、 テクスチャ格納方法は、 多角形状のグラフィック要素にマツ ビングされるテクスチャを複数の切片に分割するステップと、 前記テクスチャが前記グラフィ ック要素にマッピングされる態様で配置される第 1の二次元テクセル空間において少なくとも
1つの鎌己切片を回 ひ 動して、 tfr!Eテクスチャがメモリに 内される態様で配置される 第 2の二次元テクセル空間に配置された全ての ffilB切片を、 ttlt己テクスチヤを分割せずに二次 元配列に^ ήした に要する記憶溶量より少なレ、記憶溶量の記憶領域に される二次元配 列に格納するステップと、 を含む。
本発明の第 6の観点によれば、 画像 装置は、 複数のグラフィック要素からなる、 スクリ ーンに表示される画像を生成する画像 置であって、 ffilBグラフィック要素にマッピング するためのテクスチャデータを外部のメモリカゝら読み出すための要求を行うデータ要求手段と、 nut己メモリから読み出されたテクスチャデータを一時的に保管するテクスチャバッファ手段と、 前記テクスチャバッファ手段の領域を分割し、 新たに描画を開始する ΐ ΐ己グラフィック要素に マッピングされるテクスチャデータを格納するために当該テクスチャデータのサイズに応じた 領域の割り当てと、 描画が完了した編己グラフィック要素にマッピングされているテクスチャ データを格納していた領域の解放と、 を行うテクスチャバッファ管理手段と、 を備える。 この構成によれば、 テクスチャデータを毎回外部メモリ (例えば、 図 1の外部メモリ 5 0に 相当) 力 ら読み出すのではなく、 読み出したテクスチャデータをテクスチャバッファ手段に一 時的に保持しておくことにより、 テクスチャデータが再利用される に、 無駄な外部メモリ へのアクセスを避けることができる。 また、 テクスチャバッファ手段を必要とされるサイズに 領域分割し、 領域の確保と解放とを動的に行うことで、 テクスチャバッファ手段の使用効率が 高まり、 テクスチャバッファ手段のためのノヽードウエアリソース力 sii jに大きくなることを防 ぐことができる。 1
この画像^^装置において、 tirf己複数のグラフィックス要素は、 二次元空間に された三 次元立体の各面の形状を表すための多角形状のダラフィック要素および前記スクリーンの枠に
¥ίΐな矩形状のグラフィック要素の任意の組み合わせからなり、 廳己テクスチャバッファ管理 手段は、 嫌己矩形状のグラフィック要素にマツビングされるテクスチャデータの格納領域とし て、 当該テクスチャデータの一部分のみが格納可能なサイズを割り当て、 前記多角形状のダラ フィック要素にマッピングされるテクスチャデータの! ^内領域として、 当該テクスチャデータ の全体が格納可能なサイズを割り当てる。
この構成によれば、 グラフィック要素の描画が水平ライン単位で順次的に行われる^ \ 矩 形状のグラフィック要素 (例えば、 スプライト) にマッピングされるテクスチャデータは描画 処理の進行に応じてテクスチャデータの水平ライン単位で外部メモリから読み出せばよいため、 テクスチャバッファ手段に確保する領域のサイズを抑えることができる。 一方、 多角形状のグ ラフィック要素 (例えば、 ポリゴン) にマッピングされるテクスチャデータは、 テクスチャデ ータ上のどの部分のデータが必要になるかを事前に予測することは難しいため、 テクスチャデ ータ全体を格納可能なサイズの領域をテタスチヤバッファ手段に確保する。
この画像 «装置において、 藤己データ要求手段は、 廳己矩形状のグラフィック要素にマツ ビングされるテクスチャデータを要^- る際には、 描画が進むに従ってマッピングするテクス チヤデータを部分単位で要求し、 ttrlE多角形状のグラフィック要素にマッピングされるテクス チヤデータを要求する際には、 マッピングするテクスチャデータの全体を一括して要求する。 上記画像 «装置において、 tiilBテクスチャバッファ管理手段は、 鎌己テクスチャバッファ 手段の各領域を管理する複数の構造体ィンスタンスを用レヽて tinsテクスチヤバッファ手段を管 理する。
このように、 構造体ィンスタンスを用いてテクスチヤバッファ手段の各領域を管理すること で、 領域の確保 ·解放のための処理が簡便になる。
この画像賊装置において、 肅己複数の構造体インスタンスは、 管理する領域のサイズに応 じて複数のグループに分けられ、 前記グノレープ内の前 1¾冓造体ィンスタンスは、 リング状に互 いがリンクされている。 - この構成によれば、 構造体インスタンス、 ひいてはテクスチャバッファ手段の各領域の検索 を容易に行うことができる。
この画像 «装置は、 全ての嫌 at造体ィンスタンスを初期値に設定する構造胸期化手段 をさらに備える。
このように、 全ての構造体インスタンスを初期値に設定することにより、 テクスチャバッフ ァ手段の領域のフラグメンテーションを解消できる。 フラグメンテーションを解消する手段と しては、 一般的なガーベージコレクションより小さい回路規模で達成できるだけでなく、 処理 時間も短い。 また、 グラフィック要素の描画のための処理であるため、 1ビデオフレームまた は 1フィーノレドの描画力 S完了する毎にテクスチャバッファ手段の全体を初期化するようにすれ ば、 描画処理上全く問題がなレ、。
この画像生成装置は、 ΙίίΙΒ»造 ί糊期化手段が、 嫌講造体インスタンスを初期値に設定す るために tirtss造体ィンスタンスにアクセスする間隔を設定する制御レジスタをさらに備え、 tin己制御レジスタには、 外部からアクセス可能である。
このように、 制御レジスタに外部からアクセス可能にして、 構造 刀期化手段がアクセスす る間隔を自由に設定可能とすることで、 システム全体のパフォーマンスの低下を引き起こすこ となく、 初期化処理を新できる。 なお、 例えば、 構造体配列を雜メモリ上に設ける:^に は、 構造胸期化手段からのアクセスが時間的に集中して行われると、 他の機能ユニットから の共有メモリへのアクセスのレイテンシが大きくなり、 システム全体のパフォーマンスを低下 させる恐れがある。
上記画像生成装置において、 廳テクスチャバッファ手段は、 編己画像生成装置および外部 の機能ュニットが する メモリ上に、 任意の位 g¾び/又はサイズで構成可能である。 このように、 テクスチャバッファ手段を、 メモリ上に位 びサイズとも自由に設定可 能とすることで、 必要とされるテクスチャバッファ領域が少なレヽ ¾ ^には、 の領域を他の 機能ュニッ卜が用いることが可能になる。 図面の簡単な説明
本発明の新規な特徴は、 特許請求の範囲に記載されている。 しかしながら、 発明そのもの及 びその他の特徴と効果は、 ' 寸図面を参照して具体的な実施例の詳細な説明を読むことにより 容易に される。
図 1は、 本発明の実施の形態によるマルチメディァプロセッサ 1の内部構成を示すブロック 図である。
図 2は、 図 1の RPU 9の内部構成を示すブロック図である。 - 図 3は、 テクスチャマツビングモードのポリゴン構造体の構成を示す図である。
図 4は、 テクスチャァトリビュート構造体の構成を示す図である。
図 5は、 グーローシエーディングモードのポリゴン構造体の構成を示す図である。
図 6 (a) は、 シザリングディセーブル時のスプライト構造体の構成を示す図である。 図 6 (b) は、 シザリングイネーブル時のスプライト構造体の構成を示す図である。
図 7は、 図 2のマージソータ 106の入出力信号の説明図である。
図 8は、 図 2のバーテックスエキスパンダ 116の入出力信号の説明図である。
図 9は、 スプライトの頂点パラメータ算出の説明図である。
図 10は、 図 2のバーテックスソータ 114の入出力信号の説明図である。
図 11は、 ポリゴンの頂点パラメータ算出の説明図である。
図 12は、 ポリゴンの頂点ソート処理の説明図である。
図 13は、 ポリゴン/スプライト共通データ C Iの構成を示す図である。
図 14は、 図 2のスライサ 118による、 グーローシェーディングモードのポリゴンに対す る処理の説明図である。
図 15は、 図 2のスライサ 118による、 テクスチャマッピングモードのポリゴンに対する 処理の説明図である。 '
図 16は、 図 2のスライサ 118による、 スプライトに対する処理の説明図である。
図 17は、 図 2のバイリニアフィルタ 130によるバイリニアフィルタリングの説明図であ る。
図 18 (a) は、 繰り返しマッピングが行われる場合において、 ST空間に配置されたテク スチヤの例示図である。 図 18 (b) は、 繰り返しマッピングが行われる場合において、 UV 空間に配置された、ポリゴンにマッピングされるテクスチャの例示図である。図 18 (c) は、 テクスチャ力 S繰り返してマッピングされた、 XY空間におけるポリゴンの描画の例示図である。 図 19 (a) は、 ポリゴン構造体のメンバ MAPが 「0」 の^ "において、 ST空間に配置 された、 ポリゴンにマッピングされるテクスチャの例示図ある。 図 19 (b) は、 ポリゴン構 造体のメンバ MAPが 「1」 の^こおいて、 ST空間に配置された、 ポリゴンにマッピング されるテクスチャの例示図ある。 '
図 20は、 ST空間に配置された、スプライ卜にマッピングされるテクスチャの例示図ある。 図 21 (a) は、 ポリゴン構造体のメンバ MAPが 「0」 の において、 1メモリワード に格納されるテクセルブロックの説明図である。 図 21 (b) は、 ポリゴン構造体のメンバ M
APが「1」の^において、 1メモリワードに ^されるテクセルブロックの説明図である。 図 21 (c) は、 1メモリヮードへのテクセルブロックの格納状態の説明図である。
図 22は、 図 2のテクセルマツパ 124の内部構成を示すブロック図である。
図 23は、 図 22のテクセルアドレス算出部 40の内部構成を示すブロック図である。 ' 図 24は、 テクスチャパターンデータの分割格納が行われた場合のバイリニアフィノレタリン グの説明図である。
図 25 (a) は、 ボス MCB構造体の構成を示す図である。 図 25 (b) は、 一般 MCB構 造体の構成を示す図である。 '
図 26は、 ボス MCB構造体インスタンス [0]〜 [7] が管理するテクスチャバッファ領 域のサイズの説明図である。
図 27は、 ボス MCB構造体インスタンス [0]〜 [7] の初期値を示す図である。
図 28は、 一般 MCB構造体インスタンス [8]〜 [: 127] の初期値を示す図である。 図 29は、 図 2のメモリマネージャ 140に関する RPU制御レジスタの一覧図である。 図 30は、 テクスチャバッファ領域取得処理の流れの一部を示すフローチャートである。 図 31は、テクスチャバッファ領域取得処理の流れの他の一部を示すフローチヤ一トである。 図 32は、 テクスチャバッファ領域解放処理の流れを示すフローチャートである。
図 33は、 ボス MCB構造体インスタンスのチェーンの構造と、 ボス MCB構造体インスタ ンスのチェーンに一般 MCB構造体ィンスタンス力 S新たに挿入される ij^の と、 を示す図 である。 発明を実施するための最良の形態
以下、 本発明の実施の形態について、 図面を参照しながら説明する。 なお、 図中、 同一また は相当部分については同一の参照符号を付してその説明を援用する。 また、 信号のどのビット かを示す必要があるときは、信" ^の後に、 [a : b] あるいは [a] を 1 "る。 [a : b] は、 その信号の第 a番目のビットから第 b番目のビットを意味し、 [a] は、 その信号の第 a番目の ビットを意味する。 「0b」 は 2進数を、 「0x」 は 16進数を意味する。 数式中、 「·」 は乗算 を意味する。 図 1は、 本発明の実施の形態によるマルチメディァプロセッサ 1の内部構成を示すプロック 図である。 図 1に示すように、 このマルチメディアプロセッサは、 外部メモリインタフェース 3、 DMAC d i r e c t memo r y a c c e s s c on t r o l l e r) 4、 中 央演算処¾¾置 (以下、 「CPU」 と呼ぶ。) 5、 CPUローカル RAM7、 レンダリングプロ セッシングュニット (以下、 「RPU」 と呼ぶ。) 9、 カラーパレット RAMI 1、 サウンドプ ロセシングユニット (以下、 「SPU」 と呼ぶ。) 13、 SPUローカル RAMI 5、 ジオメト リエンジン(以下、 「GE」 と呼ぶ。) 17、 Yソーティングユニット (以下、 -「YSU」 と呼ぶ。) 19、 外部インタフェースブロック 21、 メイン RAMアクセスアービタ 23、 メイン RAM 25、 IZOバス 27、 ビデオ D AC (d i g i t a l t o ana l o g c onve r t e r) 29、 オーディオ D ACブロック 31、 及び A/Dコンバータ (以下、 「ADC」 と呼 ぶ。) 33を具 る。 メイン RAM 25及 部メモリ 50を して説明する必要がないと きは、 「メモリ MEM」 と表記する。
C P U 5は、 メモリ MEMに格納されたプログラムを^して、 各種演算やシステム全体の 制御を行う。 また、 CPU 5は、 DMA C4にプログラム及ぴデータの^ ¾要求を行うことも できるし、 DMAC4を介さずに、 外部メモリインタフェース 3及び外部バス 51を通じて、 外部メモリ 50から直接プログラムコードをフェッチし、 外部メモリ 50に直接データァクセ スを行うこともできる。
I/Oバス 27は、 CPU 5をバスマスタとするシステム制御用のバスであり、 バススレイ ブである各機能ユニット (外部メモリインタフェース 3、 DMAC4、 RPU9、 SPU13、 GE17、 YSU19、 外部インタフェースブロック 21、 及び ADC33) の制御レジスタ 及びローカル RAM7, 11, 15へのアクセスに用いられる。 このようにして、 これらの機 能ユニットは、 I/Oバス 27を通じて、 CPU 5により制御される。
CPUローカル RAM 7は、 CPU 5専用の RAMであり、 サブルーチンコールや割り込み 時におけるデータの退避などを行うためのスタック領域、 及び C PU 5のみが扱う変数の 内 領域等として使用される。
本発明の特徴の 1つである RPU 9は、 ポリゴン及びスプライ卜から構成される三次元ィメ ージをリアルタイムに生成する。 具体的には、 RPU9は、 YSU19によるソート済みの、 ポリゴン構造体配列の各構造体インスタンス及ぴスプライト構造体配列の各構造体インスタン スを、 メイン RAM 25から読み出し、 所定の処理を ϋίΐして、 スクリーン (表示画面) のス キャンに合わせて水平ラインごとにイメージを^^する。 生成されたイメージは、 コンポジッ トビデオ信号波形を示すデータストリームに変換され、ビデオ D AC 29に出力される。また、 RPU9は、 DMAC4に対して、 ポリゴン及びスプライトのテクスチャパターンデータの取 り込みのための DMA転送要求を行う機能を有する。
テクスチャパターンデータとは、 ポリゴンまたはスプライトに貼り付けられる 2次元の画素 酉己列データであり、 各画素データは、 カラーパレット RAMI 1のエントリを指定するための 情報の一部である。 以降、 テクスチャパターンデータの画素を 「テクセル」 と呼称し、 スクリ ーンに表示されるィメージを構成する画素を指す「ピクセル」 とは区別して使用する。従って、 テクスチャパターンデータは、 テクセルデータの集合である。
ポリゴン構造体配列は、 多角形状のグラフィック要素であるポリゴンのための構造体配列で あり、 スプライト構造体配列は、 スクリーンに5 Pfiな矩形のグラフィック要素であるスプライ トのための構造体配列である。 ポリゴン構造体配列の要素を、 「ポリゴン構造体ィンスタンス」 と呼び、 スプライト構造体配列の要素を、 「スプライト構造体インスタンス」 と呼ぶ。 ただし、 両者を区別して説明する必要がないときは、 単に 「構造体インスタンス」 と呼ぶこともある。 ポリゴン構造翻己列に格納された各ポリゴ «造体ィンスタンスは、 ポリゴンごとの表示情 報 (スクリーンにおける頂点座標、 テクスチャマッピングモードでのテクスチャパターンに関 する情報及びグーローシエーディングモードでのカラーデータ (RGBのカラーコンポーネン ト) を含む。) であり、 1つのポリゴン構造体インスタンスに 1つのポリゴンが対応している。 スプライト構造体配列に格納された各スプライト構造体インスタンスは、 スプライトごとの表 示情報 (スクリーンにおける座標及びテクスチャパターンに関する情報を含む。 ) であり、 1つ のスプライト構造体インスタンスに 1つのスプライ卜が対応している。
ビデオ D AC 29は、 アナ口グのビデオ信号を生成するためのデジタル/アナ口グ変換器で ある。 ビデオ DAC29は、 RPU 9から入力されたデータストリームをアナログのコンポジ ットビデオ信号に変換し、 ビデオ信号出力端子 (図示せず) 力 テレ,ビジョンモニタ等 (図示 せず) に出力する。
カラーパレツト RAMI 1は、 本実施の形態では 512色すなわち 512エントリのカラー パレットからなる。 RPU9は、 テクスチャパターンデータに含まれるテクセノ^ータをカラ —パレットのエントリを指定するインデックスの一部として、 カラーパレット RAMI 1を参 照し、 テクスチャパターンデータを、 カラーデータ (RGBのカラーコンポーネント) に変換 する。
S PU 13は、 P CM (pu l s e c o de mo du l a t i on)波形データ (以下、 「ウェーブデータ」 と呼ぶ。)、 アンプリチユードデータ、 及びメインボリュームデータを生成 する。 具体的には、 S P U 13は、 最大 64チヤンネル分のウェーブデータを^^して時分割 多重化するとともに、 最大 64チヤンネル分のェンべロープデータを生成してチヤンネルポリ ユームデータと乗算し、アンプリチユードデータを B¾割多重化する。そして、 SPU13は、 メインボリュームデータ、 時分割多重化されたウェーブデータ、 及ぴ時分割多重化されたアン プリチュードデータを、 オーディオ DACブロック 31に出力する。 また、 SPU13は、 D MAC 4に対して、 ウェーブデータ及びエンベロープデータの取り込みのための DMA転送要 求を行う機能を有する。
オーディオ DACブロック 31は、 SPU13から入力されたウェーブデータ、 アンプリチ ユードデータ、 及びメインボリュームデータをそれぞれアナログ信号に変換し、 結果をアナ口 グ乗算して、 アナログオーディオ信号を する。 このアナログオーディオ信号は、 オーディ ォ信号出力 » (図示 ¾rf)力 テレビジョンモニタ等(図^ rf)のオーディオ入力端子(図 示せず) に出力される。
SPUローカル RAMI 5は、 SPU13がウェーブ再生及びエンベロープ生成を行う際に 用いるパラメータ (例えば、 ウェーブデータやエンベロープデータの格納アドレスやピッチ情 報など) を格納する。
GE17は、 三次元イメージを表示するための謝可演算を HfrTる。 具体的には、 GE17 は、 行列積、 べクトルァフィン変換、 べクトル直交変換、 透視職変換、 頂点明度/ポリゴン 明度計算 (ベタトル内積)、 及びポリゴン裏面力リング処理 (ベタトル外積) などの演算を する。
YSU19は、 メイン R AM 25に格納されてレ、るポリゴン構造体配列の各構造体ィンスタ ンス及びスプライト構造体配列の各構造体ィンスタンスを、 ソートルール 1〜4に従ってソー トする。 この 、 ポリゴン構造体配列とスプライト構造体配列とで、 別個にソートが行われ る。
以下、 YSU19によるソートノ ル 1〜4について説明する力 その前に座標系について 説明する。 テレビジョンモニタ等のディスプレイ装置 (図示せず) への実際の表示に用いられ る二次 標系をスクリーン座標系と呼ぶ。 本実施の形態では、 スクリーン座標系は、 水平方 向 2048ピクセル X垂直方向 1024ピクセルの 2次元ピクセノ H己列から構成される。 座標 原点は左上にあり、 右方向が X軸の正、 下方向が Y軸の正に相当する。 ただし、 実際に表示さ れる領域は、 スクリーン座標系の全空間ではなく一部の空間である。 この表示領域をスクリー ンと呼ぶことにする。 ソートルール 1〜4における Y座標はスクリーン座標系の値である。 ソートノ!^ル 1は、 最小 Y座標が小さい順に、 各ポリゴン構造体インスタンスを並^ える ことである。 最小 Y座標とは、 ポリゴンの 3頂点の Y座標のうち、 最も小さい Y座標のことで ある。 ソートノ "ル 2は、 最小 Y座標が同じである複数のポリゴンについては、 デプス値が大 きい順に、 各ポリゴン構造体インスタンスを並べることである。
ただし、 YSU19は、 スクリーンの先頭ラインに表示されるピクセルを持つ複数のポリゴ ンについては、 最小 Y座標が異なっている でも、 それらが同一であるとみなして、 ソート ノ! ^"ノレ 1ではなく、 ソートノ ノレ 2に従って、 各ポリゴン構造体ィンスタンスの並^ えを行 う。 つまり、 スクリーンの先頭ラインに表示されるピクセルを持つポリゴンが複数^ Ϊする場 合は、 最小 Y座標が同一であるとみなして、 デプス値が大きレ、順に並^ えられる。 これがソ ートルール 3である。
インタレーススキャンの^でも、 ソートノ^ "ル 1〜 3が適用される。 ただし、 奇数フィー ルドを表示するためのソートでは、 奇数ラインに表示されるポリゴンの最小 Y座標及び/又は その奇数ラインの 1つ前の偶数ラインに表示されるポリゴンの最小 Y座標が同一であるとみな して、 ソートルール 2によるソートを行う。 ただし、 先頭の奇数ラインは除く。 なぜなら、 そ の 1つ前の偶数ラインが しないからである。 一方、 偶数フィ一ノレドを表示するためのソー トでは、 偶数ラインに表示されるポリゴンの最小 Y座標及び/又はその βラインの 1つ前の 奇数ラインに表示されるポリゴンの最小 Υ座標が同一であるとみなして、 ソー I ル 2によ るソートを行う。 これがソートルール 4である。
スプライ トに関するソートノトル 1〜 4は、,それぞれポリゴンに関するソートノ ル 1〜 4 と同様である。 ここで、 スプライトの最小 Y座標は、 スプライトの 4頂点の Y座標のうち、 最 も小さい Y座標である。
外部メモリインタフェース 3は、 外部バス 5 1を介して、 外部メモリ 5 0からのデータの読 み出し、 及び外部メモリ 5 0へのデータの書き込みを司る。 この^、 外部メモリインタフエ ース 3は、 図示しない E B I優先順位テーブルに従って、 C P U 5及び DMAC 4からの外部 バスアクセス要求要因 (^部バス 5 1へのアクセスを要求する要因) を!^して、 レヽずれか 1 つの外部バスアクセス要求要因を選択する。 そして、 選択した外部バスアクセス要求要因に対 して外部バス 5 1へのアクセスを許可する。 E B I優先順位テーブルは、 C P U 5からの複数 種類の外部バスァクセス要求要因及び DM A C 4力らの外部バスァクセス要求要因の優先順位 を定めたテーブルである。
DMAC 4は、 メイン RAM 2 5と、 外部バス 5 1に接続された外部メモリ 5 0と、 の間で DMA¾¾を行う。 この齢、 DMAC 4は、 図示しない DM A優先順位テーブルに従って、 C PU 5、 R P U 9、 及び S PU 1 3力らの DMA¾¾要求要因 (DMA を要财る要因) を調停して、 いずれか 1つの DMA 要求要因を選択する。 そして、 外部メモリインタフエ ース 3に対して、 DMA要求を行う。 DMA優 fe)噴位テーブルは、 C P U 5、 R P U 9、 及び S P U 1 3からの DMA要求要因の優先順位を定めたテーブルである。
外部インタフェースブロック 2 1は、 周辺装置 5 4とのインタフェースであり、 2 4チャン ネルのプログラマブルなデジタノレ入出力 (I /O) ポートを含む。 2 4チャンネルの 1 0ポ ートの各々は、 4チャンネノレ分のマウスインタフェース機能、 4チャンネル分のライトガンィ ンタフェース機能、 2チャンネル分の汎用タイマ/カウンタ、 1チャンネル分の調歩同期式シ リァルインタフヱース機能、 および 1チヤンネル分の汎用パラレル Zシリアル変換ポート機能 のうち 1または複数に内部接続されている。
ADC33は、 4チャンネルのアナログ入力ポートに接続され、 これらを介して、 アナログ 入力装置 52から入力されたアナ口グ信号をデジタル信号に変換する。 例えば、 マイク音声等 のアナログ入力信号をサンプリングしてデジタノ^—タに変換する。 - メイン RAMアクセスアービタ 23は、 機能ユニット (CPU5、 RPU9、 GE17、 Y S U 19、 DMA C 4、 及び外部ィンタフェースプロック 21 (汎用パラレル Zシリアル変換 ポート)) からのメイン RAM25へのアクセス要求を調停して、 レ、ずれかの機能ユニットにァ クセス許可を出す。
メイン R AM 25は、 C P U 5のワーク領域、 変数 TO領域、 およ 想記憶管理領域等と して利用される。 また、 メイン RAM25は、 CPU 5が他の機能ユニットに受け渡すデータ の格納領域、 RPU9及び SPU13が外部メ,モリ 50から DMAによって取得したデータの m^m, GE17及び Y SU19の入力データ及び出力データの格納領域等としても使用さ れる。
外部バス 51は、 外部メモリ 50にアクセスするためのバスである。 CPU5および DMA C4力 ら、 外部メモリインタフェース 3を介してアクセスされる。 外部バス 51のアドレスバ スは、 30ビットから成り、 最大で 1Gバイト (=8Gビット) の外部メモリ 50を接続する ことができる。 外部バス 51のデータバスは、 16ビッ卜から成り、 8ビット又は 16ビット のデータバス幅を持つ外部メモリ 50を赚できる。 異なるデータバス幅'を持つ外部メモリを 同時に接続可能であり、 アクセスする外部メモリによってデータバス幅を自動的に切り替える 機能が備えられる。 '
図 2は、 図 1の RPU 9の内部構成を示すブロック図である。 図 2に示すように、 RPU9 は、 RPU内メイン RAMアクセスアービタ 100、 ポリゴンプリフェツチヤ 102、 スプラ ィ トプリフェツチヤ 104、 マージソータ 106、 プリフェッチバッファ 108、 リサイクノレ ノくッファ 110、 デプスコンハ0レータ 112、 ノくーテックスソータ 114、 ノくーテックスェキ スパンダ 116、 スライサ 118、 ピクセノレステツハ °120、 ピクセノ^ィザ 122、 テクセ ノレマツノヽ °124、 テクスチャキャッシュプロック 126、 バイリニアフイノレタ 130、 カラー ブレンダ 132、 ラインバッファブロック 134、 ビデオエンコーダ 136、 ビデオタイミン グジエネレータ 138、メモリマネージャ 140、及ぴ DMACィンタフェース 142を含む。 ラインバッファブロック 134は、 各々スクリーンの 1水平ラインに対応するラインバッファ LB 1及び LB 2を含む。 メモリマネージャ 140は、 MCBィニシャライザ 141を含む。 なお、 図 2では、 説明の便宜のため、 カラーパレット RAMI 1を RPU9に含めて記載して いる。
RPU内メイン RAMアクセスアービタ 100は、 ポリゴンプリフェツチヤ 102、 スプラ ィトプリフェツチヤ 104、 及びメモリマネージャ 140力らメイン RAM25へのアクセス 要求を調停して、 いずれかにアクセス要求の許可を出す。 許可されたアクセス要求は、 メイン RAMアクセスアービタ 23に出力され、 マルチメディアプロセッサ 1内の他の機能ュニット 力、らのアクセス要求との間で調停が行われる。
ポリゴンプリフェツチヤ 102は、 メイン RAM25から、 YSU 19によるソート後の各 ポリゴン構造体インスタンスを取り込む。 ポリゴンプリフェツチヤ 102には、 YSU19か ら、 ノ、 °ノレス PPL力 S入力される。 YSU19は、 1つのポリゴン構造体インスタンスのソート 力 S確定するたびに、 ノ、。ルス P PLを出力する。 従って、 ポリゴンプリフェツチヤ 102は、 ポ リゴン構造体配列の全ポリゴン構造体ィンスタンスのうち、 いくつのポリゴン構造体ィンスタ ンスのソートが完了したかを知ることができる。
このため、 ポリゴンプリフェツチヤ 102は、 全ポリゴン構造体インスタンスのソートの完 了を待つことなく、 1つのポリゴン構造体ィンスタンスのソー卜が確定するたびに、その都度、 ポリゴン構造体インスタンスを取得できる。 その結果、 フレームの表示中に、 当該フレームの ためのポリゴン構造体インスタンスのソートを行うことができる。 また、 インタレーススキヤ ンによる表示を行う^にも、 フィールドの表示中に当該フィールドのためのソートを行って も、 正しい描画結果が得られる。 なお、 ポリゴンプリフェツチヤ 102は、 ビデオタイミング ジェネレータ 138からの垂直走査カウント信号 V から、 フレームおよびフィーノレドの切り 替わりを知ることができる。
スプライトプリフェツチヤ 104は、 メイン RAM25から、 YSU 19によるソート後の 各スプライト構造体インスタンスを取り込む。 スプライトプリフェツチヤ 104には、 YSU 19から、 パルス SPLが入力される。 YSU19は、 1つのスプライト構造体インスタンス のソートが確定するたぴに、 パルス SPLを出力する。 従って、 スプライトプリフェツチヤ 1 04は、 スプライト構造体配列の全スプライト構造体インスタンスのうち、 いくつのスプライ ト構造体ィンスタンスのソー卜が完了したかを知ることができる。
このため、 スプライトプリフェツチヤ 104は、 全スプライト構造体インスタンスのソート の完了を待つことなく、 1つのスプライト構造体インスタンスのソートカ確定するたぴに、 そ の都度、 スプライト構造体インスタンスを取得できる。 その結果、 フレームの表示中に、 当該 フレームのためのスプライト構造体インスタンスのソートを行うことができる。 また、 インタ レーススキャンによる表示を行う ^にも、 フィールドの表示中に当該フィールドのためのソ ートを行っても、 正しい描画結果が得られる。 なお、 スプライトプリフェツチヤ 104は、 ビ デォタイミングジェネレータ 138からの垂直 ^カウント信号 Vじから、 フレームおよびフ ィールドの切り替わりを知ることができる。
さて、 マージソータ 106の説明に移る前に、 ポリゴン構造体、 テクスチャァトリビュート 構造体、 およびスプライト構造体の構成を説明する。 本実施の形態では、 ポリゴンは三角形と する。 - 図 3は、 テクスチャマツビングモードのポリゴン構造体の構成を示す図である。 図 3に示す ように、 本実施の形態では、 このポリゴン構造体は、 128ビットで構成されている。 このポ リゴン構造体のメンバ Ty p eは、 ポリゴンの描画モードを示し、 テクスチャマツビングモー ドのポリゴンに対しては 「0」 が設定される。 メンバ Ay, Ax, By, Bx, じ 及び は、 それぞれ、 ポリゴンの、 頂点 Aの Y座標、 頂点 Aの X座標、 頂点 Bの Y座標、 頂点 Bの X 座標、 頂点 Cの Y座標、 及ひ TI点 Cの X座標を示す。 これらの Y座標及び X座標は、 スクリー ン座標系の値である。 ,
メンバ Bw, Cw, L i g h t及び T s e gme n tは、 それぞれ、 ポリゴンの、 頂点 Bの パースペクティブコレクト用パラメータ (=Az /Bz)、頂点 Cのパースペクティブコレクト 用パラメータ (^AzZCz) 明度、 及びテクスチャパターンデータの Wl{立置情報を示す。 メンバ Ta t t r i bu t e, Ma p, F i l t e r, De p t h及び V ι ewp o r tは、 それぞれ、 テクスチャァトリビュート構造体のインデックス、 テクスチャパターンデータのフ ォーマット觀1|、 バイリニアフィルタリングあるいは二ァレストネイバ一のいずれかを示すフ ィルタリングモード、 デプス値、 及びシザリングのビューポート指定情報を示す。
バイリ-ァフィルタリング及び二アレストネイバ一については後财る。 デプス値 (「表示深 度情報」 と呼ぶこともある。) は、描画 のピクセルが重なった 、 どのピクセルを先に描 画するかを示す情報であり、 その値が大きいほど先に (奥に) 描画され、 その値が小さいほど 後で (手前に) 描画される。 シザリングは、 指定されたビューポートの外側にあるポリゴン及 び/又はスプライトを表示しないようにするとともに、 ポリゴン及ひン又はスプライトのビュ 一ポー卜からはみ出した部分を切り取つて表示しなレヽようにする機能である。
以上が、 テクスチャマツビングモードのポリゴン構造体の各メンバの内容であり、 1つのポ リゴン構造体のィンスタンス (ポリゴン構造体に代入された値) により 1つのポリゴンが定義 される。
図 4は、 テクスチャァトリビュート構造体の構成を示す図である。 図 4に示すように、 本実 施の形態では、 このテクスチャァトリビュート構造体は、 32ビットで構成されている。 この テクスチャアトリビュート構造体のメンバ d t h, He i gh t, M, N, :8 1 及び? a 1 e t t eは、 それぞれ、 テクスチャの幅 (単位:テクセル数) より 「1」 小さい値、 テク スチヤの高さ (単位.テクセル数) より 「1」 小さレ 直、 「Wi d t h」 の上位からのマスクビ ット数、 「: He 1 gh t」 の上位からのマスクビット数、 カラーモード (1ピクセル当りのビッ ト数一 1)、 及ぴパレツトブロックナンバを示す。 カラーパレツトの 512色のエントリは、 選 択されたカラーモードに応じて複数のブロックに分割されており、 メンバ Pa 1 e t t eによ り、 使用するパレットブロックが示される。 - テクスチャァトリビュート構造体のインスタンスは、 描画ポリゴン毎に 1つずつ用意される ものではなく、 64個のテクスチャアトリビュート構造体インスタンスが、 テクスチャマツピ ングモードの全ポリゴン構造体ィンスタンス及び全スプライト構造体ィンスタンスで共有され る。
図 5は、 グーローシエーディングモードのポリゴン構造体の構成を示す図である。 図 5に示 すように、 本実施の形態では、 このポリゴン構造体は、 128ビットで構成されている。 この ポリゴン構造体のメン T y p eは、 ポリゴンの描画モードを示し、 グーローシエーディング モードのポリゴンに対しては 「1」 が設定される。 メンバ Ay, Ax, By, Bx, Cy及ぴ Cxは、 それぞれ、 ポリゴンの、 頂点 Aの Y座標、 頂点 Aの X座標、 頂点 Bの Y座標、 頂点 B の X座標、 頂点 Cの Y座標、 及 点 Cの X座標を示す。 これらの Y座標及び X座標は、 スク リーン座標系の値である。
メンバ Ac, Be, 及び Ccは、 それぞれ、 ポリゴンの、 頂点 Aのカラーデータ (RGB各 5ビット)、 頂点 Bのカラーデータ (RGB各 5ビット)、 及 点 Cのカラーデータ (RGB 各 5ビット) を示す。
メンバ D e p t h, V i ewp o r t及び N a 1 p h aは、 それぞれ、 デプス値、 シザリン グのビューポート指定情報、 及びアルファプレンディングで する ( 1一 c ) を示す。 ( 1一 α) は透明度を示し、 「000 数)」 力 S透明度 0%、 すなわち完全不透明を表し、 「111 (二進数)」 力;透明度 87. 5%を表す。
以上が、 グー口ーシエーディングモードのポリゴン構造体の各メンバの内容であり、 1つの ポリゴン構造体のィンスタンス (ポリゴン構造体に代入された値) により 1つのポリゴンが定 義される。
図 6 (a) は、 シザリングディセーブノレ時のスプラィト構造体の構成を示す図、 図 6 ( b ) は、 シザリングイネ一プル時のスプライト構造体の構成を示す図である。 図 6 (a) に示すよ うに、 本実施の形態では、 シザリングディセーブル時のスブライト構造体は、 64ビットで構 成されている。 このスプライト構造体のメンバ Ax及び Ayは、 それぞれ、 スプライトの左上 の X座標及び Y座標を示す。 これらの Υ座標及び X座標は、 スクリーン座標系の値である。 メンバ D e p t h, F l 1 t e r及び T a t t r ι b u t eは、 それぞれ、 デプス値、 フィ ルタリングモード (バイリニアフィルタリングあるいは二ァレストネイバ一)、及びテクスチャ ァトリビュート構造体のィンデックスを示す。 メンバ Z o o mX, Z o o mY及び T s e gm e n tは、それぞれ、 x軸方向のスプライト拡大率 . γ軸方向のスプライト拡大率(拡 縮率)、 及びテクスチャパターンデータの格樹立置情報を示す。
図 6 (b) に示すように、 本実施の形態では、 シザリングイネーブル時のスプライト構造体 は、 64ビッ卜で構成されている。 このスプライト構造体のメンバ Ax及び Ayは、それぞれ、 スプライトの左上の X座標及び Y座標を示す。 これらの Y座標及び X座標は、 スクリーン座標 系の値である。
メンバ De p t h, S c i s s o r, V i ewp o r t, F i l t e r及び Ta t t r ι b u t eは、それぞれ、デプス値、 シザリング適用フラグ、シザリングのビューポート指定情報、 フィルタリングモード (バイリユアフィルタリングあるいは-アレストネイバ一)、 及びテクス チヤアトリビュート構造体のィンデッタスを示す。 メンバ Z o o mX, Z o o mY及び T s e gme n tは、 それぞれ、 X軸方向のスプライト拡大率 (ぉ纖率)、 Y軸方向のスプライト拡大 率 (漏率)、及びテクスチャパターンデータの ¾ ^立置情報を示す。 メンバ S c i s s o rの 設定(オン Zオフ)を変えることで、スプライトごとにシザリングの適用の有無を制御できる。 シザリングイネーブル時のスプライト構造体においては、 シザリングディセーブル時のスプ ライト構造体に比べ、 X座標及び Y座標のビット数がそれぞれ 1ビット少ない。 シザリングイ ネーブル時にスプライトがスクリーンに配置される際には、 後述のバーテックスエキスパンダ 1 16によって、 X座標に 51 2ピクセノレ分のオフセット、 Y座標に 256ピクセノレ分の才フ セットカ幼卩えられる。 また、 デプス値のビット数も 1ビット少ないが、 シザリングイネーブル 時には、 後述のテクセルマツパ 124によって、 構造体に TOされているデプス値の L SB側 に 1ビットの 「0」 が付加され、 シザリングディセーブル時と同様に 8ビットのデプス値とし て扱われる。
以上が、 シザリングディセーブル時及びシザリングイネーブル時のスプライト構造体の各メ ンバの内容であり、 1つのスプライト構造体のインスタンス (スプライト構造体に代入された 値) により 1つのスプライトが定義される。 スプライトのテクスチャアトリビュート構造体の 構成は、 図 4のポリゴンのテクスチャアトリビュート構造体の構成と同じである。 テクスチャ ァトリビュート構造体のインスタンスは、 描画スプライト毎に 1つずつ用意されるものではな く、 64個のテクスチャアトリビュート構造体インスタンスが、 テクスチャマッピングモード の全ポリゴン構造体インスタンス及び全スプライト構造体インスタンスで共有される。 図 2に戻って、 マージソータ 1 0 6は、 ポリゴンプリフェツチヤ 1 0 2及びスプライトプリ フェツチヤ 1 0 4から、 それぞれ、 ポリゴン構造体インスタンス及びそれに付随するテクスチ ャァトリビュート構造体インスタンス、 並びに、 スプライト構造体インスタンス及びそれに付 随するテクスチャアトリビュート構造体インスタンスを受け取り、 上述した Y S U 1 9による ソート "ル 1〜4と同様の後述のソート ^ル 1〜4 (以下、 「マージソート ル 1〜4」 と呼ぶ。) に従って、 マージソートを菊亍し、 結果をプリフェッチバッファ 1 0 8に送出する。 ここで、ポリゴ/ «造体インスタンスの各々、およぴスプライト構造 ンスタンスの各々は、 既に Y S U 1 9によって、 ソートルール 1〜4に基づく描画処 SJI1Iに並^ えられていること に注意されたレ、。 以下、 マージソータ 1 0 6の詳細を説明する。
図 7は、 図 2のマージソータ 1 0 6の入出力信号の説明図である。 図 7を参照して、 ポリゴ ンプリフェツチヤ 1 0 2は、 ポリゴン有効ビットレジスタ 6 0、 ポリゴンバッファ 6 2、 及び ポリゴンアトリビュートバッファ 6 4を含む。 スプライトプリフェツチヤ 1 0 4は、 スプライ ト有効ビットレジスタ 6 6、 スプライトバッファ 6 8、 及びスプライトァトリビュートバッフ ァ 7 0を含む。 . .
ポリゴン有効ビットレジスタ 6 0は、 ポリゴン構造体ィンスタンスの有効 ( 1 ) /無効 (0) を示すポリゴン^ ¾)ビット (1ビット) を Wlする。 ポリゴンバッファ 6 2は、 メイン RAM 2 5カゝら^ ¾されたポリゴン構造体インスタンス (1 2 8ビット) を格 »Τる。 ポリゴンァト リビュートバッファ 6 4は、 メイン RAM 2 5から されたポリゴン用のテクスチャァトリ ビュート構造体インスタンス (3 2ビット) を格納する。
スプライト有効ビットレジスタ 6 6は、 スプライト構造体インスタンスの有効 ( 1 ) ノ無効 ( 0 ) を示すスプライト有効ビット (1ビット) を する。 スプライトバッファ 6 8は、 メ イン RAM 2 5力ら^!されたスプライト構造体インスタンス (6 4ビット) を格納する。 ス プライトアトリビュートバッファ 7 0は、 メイン RAM 2 5から^!されたスプライト用のテ クスチヤァトリビュート構造体インスタンス (3 2ビット) を格納する。
マージソ一タ 1 0 6に対する入出力信号を説明する。 ビデオタイミングジェネレータ 1 3 8 力 ら与えられる表示領域上端ライン番 ^言号 L Nは、 R P U 9がポリゴン及び/又はスプライ トの描画を開始する水平ライン番号 (つまり、 スクリーンの先頭ライン番号) を示す。 この値 L Nは、 C P U 5によって R P U 9に設けられた表稀域 J ^ライン制御レジスタ (図示 ·¾τΤ ) に設定される。
ビデオタイミングジェネレータ 1 3 8から与えられるィンタレース Ζノンィンタレース f glj 信号 I N Iは、 R P U 9で行われている現在の描画処理が、 ィンタレーススキヤン用のものか ノンインタレーススキャン用のものかを示す。 この値 I N Iは、 C P U 5によって、 R P U 9 に設けられた R P U制御レジスタ (図示せず) のうちの 1ビットに設定される。 ビデオタイミングジエネレータ 1 3 8から与えられる奇数フィールド /偶数フィールド mSiJ 信号 O E Iは、 現在描画処理中のフィールドが、 奇数フィールドか偶数フィールドかを示す。 マージソ一タ 1 0 6は、 プリフェッチバッファ 1 0 8に、 ポリゴンノスプライトデータ P S D、 テクスチャァトリビュート構造体インスタンス TA I、 及びポリゴン /スプライト籂别信 号? S Iを出力する。
ポリゴン / スプライトデータ P S D ( 1 2 8ビット) は、 ポリゴン構造体インスタンスある いはスプライト構造体インスタンスのいずれかである。 ポリゴン/スプライトデータ P S Dが スプライト構造 ンスタンスである^は、 データが L S Bから詰められ、 上位 6 4ビ ットは 「0」 を示す。 また、 後述するデプス値の比較処理においては、 ポリゴン構造体インス タンスのデプス値 (1 2ビット) とスプライト構造体インスタンスのデプス値 (8ビット) と は、 ビット数が異なるので、 スプライト構造体インスタンスのデプス値の L S B側に 「0」 を 連接し、ポリゴン構造体インスタンスのデプス値と同じビット数(1 2ビット)に揃えられる。 但し、 この 1 2ビットに揃えられたデプス値は後段に出力されない。
テクスチャアトリビュート構造体インスタンス TA I ( 3 2ビット) は、 ポリゴン//スプラ ィトデータ P S Dがポリゴン構造体インスタンスの場合は、 当該インスタンスに付随するテク スチヤアトリビュート構造体インスタンスであり、 ポリゴン スプライ トデータ P S Dがスプ ライト構造体インスタンスの ¾ ^は、 当該インスタンスに付随するテクスチャァトリビュート 構造体インスタンスである。 ただし、 ポリゴン スプライトデータ P S Dが、 グーローシエー ディングモードのポリゴン構造体ィンスタンスである^ \ テクスチャァトリビュート構造体 インスタンスは付随しないので、 この信号 T A Iの値は全て 「0」 を示す。
ポリゴン Zスプライト^ gij信号 P S Iは、 ポリゴン/スプライトデータ P S Dカ、 ポリゴン 構造体ィンスタンスなのかスプライト構造体ィンスタンスなのかを示す信号である。
マージソータ 1 0 6の動作を説明する。 マージソータ 1 0 6は、 先ず、 ポリゴン有効ビット レジスタ 6 0に保持されたポリゴン有効ビットおよびスプライト有効ビットレジスタ 6 6に保 持されたスプライト有効ビッ卜をチェックする。 そして、 マージソータ 1 0 6は、 ポリゴン有 効ビット及びスプライト有効ビットの双方の値が 「0 (無効)」 の場合は、 ポリゴンプリフェツ チヤ 1 0 2のバッファ 6 2及び 6 4並びにスプライトプリフェツチヤ 1 0 4のバッファ 6 8及 び 7 0力 らのデータを取得しなレ、。
マージソータ 1 0 6は、 ポリゴン有効ビット及びスプライト有効ビットのどちら力一方の値 「1 (有効)」 の ¾ ^は、 「1」 を示している方のバッファ 6 2及び 6 4あるいは 6 8及ぴ 7 0からデータを取得し、 ポリゴン Zスプライトデータ P S D及ぴテクスチャァトリビュート構 造体インスタンス TA Iとして、 プリフェッチバッファ 1 0 8に出力する。
マージソータ 1 0 6は、 ポリゴン有効ビット及びスプライト有効ビットの双方の値が 「1」 の場合は、 次に説明するマージソートルール 1〜4に従って、 ポリゴンプリフェツチヤ 1 0 2 のバッファ 6 2及び 6 4あるいはスプライトプリフェツチヤ 1 0 4のバッファ 6 8及び 7 0か らデータを取得し、 ポリゴン /スプライトデータ P S D及びテクスチャァトリビュート構造体 インスタンス TA Iとして、 プリフェッチバッファ 1 0 8に出力する。 マージソートルール 1 〜 4の詳細は次の通りである。 - まず、 ビデオタイミングジェネレータ 1 3 8から与えられるインタレース/ノンインタレー ス調リ信号 I N Iがノンィンタレースを示している ij^を説明する。 マージソータ 1 0 6は、 ポリゴン構造体インスタンスに含まれる 3頂点の Y座標 (A y , B y , C y ) の内で最も小さ い値と、 スプライト構造体インスタンスに含まれる Y座標 (A y) と、 を比較し、 描画処理頃 で先に出現する (つまり、 Y座標が小さい方の) ポリゴン構造体インスタンスあるいはスプラ イト構造体インスタンスを選択する (マージヅートルール 1 Y S U 1 9によるソートルール 1に相当)。 Y座標はスクリーン座標系の値である。
ただし、 双方の Y座標が同じ値を示している^は、 マージソータ 1 0 6は、 ポリゴ:/ «造 体インスタンスに含まれるデプス値 D e p t hと、 スプライト構造体インスタンスに含まれる デプス値 D e p t hと、 を比較し、 デプス値が大きレ、方の (つまり、 より奥に描画される方の) ポリゴン構造体インスタンスあるいはスプライト構造体インスタンスを選択する (マージソー トノトル 2 · Y S U 1 9によるソート/レール 2に相当)。 この場 、 上記したように、 スプライ ト構造体ィンスタンスに含まれるデプス値のビット数 (8ビット) をポリゴン構造体ィンスタ ンスに含まれるデプス値のビット数 (1 2ビット) に揃えた後に比 を行う。
また、 Y座標の値が、表示領域上端ライン番号ィ言号 L Nに相当する Y座標より小さい場合は、 マージソータ 1 0 6は、 その Y座標の値を表示領域上端ライン番^ ί言号 LNに相当する Y座標 の値に置き換えて (マージソート Λ ^ノレ 3 · Y S U 1 9によるソートノトノレ 3に相当)、 マージ ソートノレール 1及ぴ 2に従って、 マージソートを行う。
次に、 ィンタレースノノンィンタレース識リ信号 I N Iがィンタレースを示している ¾ ^を 説明する。 マージソータ 1 0 6は、 奇数フィーノレド Z偶数フィーノレド mgiJ信号 O E Iから、 表 示 となるフィールドを判別し、 当該フィーノレドで描画されなレヽ水平ラインに相当する Y座 標の値は、 次の水平ラインに相当する Y座標と同じ値として扱い (マージソートノ^-ル 4 : Y S U 1 9によるソートノ!^ル 4に相当)、 上記マージソートゾトノレ:!〜 3に従って、 マージソー 卜を仃フ σ
図 2に戻って、 プリフェッチバッファ 1 0 8は、 マージソータ 1 0 6から、 マージソート後 の構造体インスタンス (つまり、 ポリゴン Zスプライトデータ PSD及びテクスチャアトリビ ユート構造体ィンスタンス T A I ) を順次読み込み、 読み込んだ順番で構造体ィンスタンスを 出力する F I FO (f i r s t— i n f i r s t— ou t)構造のバッファである。つまり、 プリフェッチバッファ 108には、 マージソータ 106により並^ えられた)噴番で構造イン スタンスが格納される。 そして、 格納された構造インスタンスは、 対応するポリゴンあるいは スプライトの表示のための描画サイクノレにおいて、 格納された順番で出力される。 なお、 プリ フェッチバッファ 108は、 ビデオタイミングジェネレータ 138からの垂直走査カウント信 号 VC力 ら、 描画中の水平ラインを知ることができる。 つまり、 描画サイクルの切り替わりを 知ることができる。 本実施の形態では、 例えば、 プリフェッチバッファ 108は、 物理的には リサイクノレバッファ 110とバッファを將することが可能であり、 リサイクルバッファ 11 0のエントリ数を含め、 (128ビット + 32ビット) X I 28エントリとする。 ちなみに、 ポ リゴン Zスプライト識別信号 P S Iは、 ポリゴン Zスプライトデータ P SDの第 79ビットの 空白ビットと置き換えられる。 '
リサイクルバッファ 110は、 次の描画サイ,クルでも使用される (つまり、 再利用できる) 構造体インスタンス (つまり、 ポリゴン スプライトデータ PSD及びテクスチャアトリビュ ート構造体インスタンス TAI) を鶴内する F I FO構造のバッファである。 従って、 リサイ クルバッファ 110に された構造体インスタンスは、 次の描画サイクルで使用される。 1 描画サイクルは、 1水平ラインの表示を行うための描画期間である。 つまり、 1描画サイクル は、 ラインバッファ LB 1あるいは LB 2のいずれかに、 対応する水平ラインの表示のために 必要な全てのデータの描画が行われる期間である。 本実施の形態では、 例えば、 リサイクノレバ ッファ 110は、 物理的にはプリフェッチバッファ 108とバッファを することが可能で あり、 プリフェッチバッファ 108のエントリ数を含め、 (128ビット +32ビット) X I 2 8エントリとする。 '
デプスコンパレータ 112は、 プリフエッチバッファ 108の先頭の構造体ィンスタンスに 含まれるデプス値と、 リサイクルバッファ 110の先頭の構造体インスタンスに含まれるデプ ス値と、 を比較して、 より大きなデプス値を持つ (つまり、 より奥に表示されるべき) 構造体 インスタンスを選択して、 後段に出力する。 この 、 デプスコンパレータ 112は、 選択し た構造体ィンスタンスがポリゴン構造体ィンスタンスの場合は、 バーテックスソータ 114へ 出力し、 スプライト構造体インスタンスの場合は、 バーテックスエキスパンダ 116に出力す る。 また、 デプスコンパレータ 112は、 選択した構造体インスタンスをスライサ 118に出 力する。 なお、 デプスコンパレータ 112は、 ビデオタイミングジェネレータ 138からの垂 直走査カウント信号 VCから、 描画中の水平ラインを知ることができる。 つまり、 描画サイク ルの切り替わりを知ることができる。
ここで、 デプスコンパレータ 112により選択された構造体インスタンスが、 次の描画サイ クルでも使用される (つまり、 次の水平ラインの描画にも使用される) ij^は、 スライサ 11 8により、 当該構造体インスタンスがリサイクルバッファ 110に出力され書き込まれる。 た だし、 デプスコンパレータ 112により選択された構造体ィンスタンスが、 次の描画サイクル で使用されない (つまり、 次の水平ラインの描画には使用されない) は、 リサイクルバッ ファ 110には書き込まれない。 - 従って、リサイクルバッファ 110には、現ラインの描画に使用される構造体インスタンス、 及び次ラインの描画に される構造体インスタンスが、 現ラインの描画順、 及 ラインの 描画順に格納される。
図 8は、 図 2のバーテックスエキスパンダ 116の入出力信号の説明図である。 デプスコン パレータ 112から出力される構造体インスタンスに含まれるポリゴン Zスプライトデータ P SDのサイズは 128ビッ卜であるが、 バーテックスエキスパンダ 116に入力されるポリゴ ン /スプライトデータ PSDはスプライト構造体インスタンスであるため、 128ビットのポ リゴン Zスプライトデータ P SDの下位 64ビットのみが入力される。 図 8を参照して、 バー テックスエキスパンダ 116は、 受け取ったスプライト構造体インスタンスに含まれる、 スプ ライトの左上の頂点座標 (Ax, Ay), Y軸方向の拡大率 Z o omY、 及び X軸方向の拡大率 Z o omX、 並びに、 当該スプライト構造体インスタンスに付随するテクスチャァトリビュー ト構造体インスタンスに含まれる、 テクスチャパターンの幅より 「1」 小さレ、 {[SWi d t h及 ぴ高さより 「1」 小さレ !He i g h tに基づいて、 当該スプライ卜の頂点の座標 (スクリー ン座標系における XY座標および UV座標系における UV座標) を算出し、 ポリゴン スブラ ィト共通データ C Iとしてスライサ 118へ出力する。 スクリーン座標系は の通りであり、 UV座標系は、 テクスチャパターンデータを配置する二次元直交座標系である。 以下、 スプラ ィトの頂点のパラメータ (XYUV座標) 算出の詳細を説明する。
図 9は、 スプライトの頂点パラメータ算出の説明図である。 図 9 (a) には、 UV空間にお けるスプライトのテクスチャパターンデータ (文字 A) が例示される。 この図において、 1つ の小矩形は、 1テクセルを示す。 そして、 テクセルの 4頂点のうち、 左上角の UV座標が、 そ のテクセルの位置を示す。
この図に示すように、 テクスチャの幅 (水平方向のテクセノレ数) を 「Wi d t h+l」、 テク スチヤの高さを 「He i gh t + l」 とすると、 テクスチャの左上, 右上, 左下の各項点の U V座標がそれぞれ (0, 0)、 (W i d t h + 1 , 0)、 及び (0, He i gh t + 1) となるよ うに、 スプライトのテクスチャパターンデータは、 UV空間に配置される。 ここで、 「Wi d t h」 および 「He l gh t」 の値は、 テクスチャアトリビュート構造体のメンノ^ Wi d t hお よび He i g h tに格納される値である。 すなわち、 これらのメンバには、 テクスチャの幅、 高さより 1小さレ、 ί直が格納される。
図 9 (b) には、 XY空間におけるスプライトの描画例が示される。 この図において、 1つ の小矩形は、 ピクセルの集合からなり、 図 9 (a) の 1テクセルに対応する。 スプライトの左 上、 右上、 及び左下の各頂点は、 それぞれ頂点 0、 頂点 及ひ T頁点 2として扱われる。 つま り、 各頂点は、 描画の際の出現噴が早いほうから、 頂点 0、 頂点 1、 及ひ II点 2として扱われ る。 各頂点 0〜2の X座標、 Y座標、 U座標、 及び V座標を、 X*、 Y*、 UB*、 及び VR * (「*」 は、 「頂点」 に付けた添え字であり、 * = 0, 1, 2) とすると、 それぞれの値は以 下のようにして求められる。
頂点 0については次の通りである。
X0=Ax
Y0=Ay '
UB 0 = 0 ,
VR0 = 0
ここで、 Ax及び Ayは、それぞれスプライト構造体インスタンスのメンバ 「Ax」及び「A y」 に格納された値である。 このように、 スプライト構造体インスタンスのメンバ 「Ax」 及 び 「 A y」 の値が、 スプライトの頂点 0の X座標及び Y座標となる。
頂点 1については次の通りである。
Xl=Ax + Zo omX - (Wi d t h+l)
Yl=Ay
UB 1 =Wi d t h
VR 1 =0 '
頂点 2につレ、ては次の通りである。
X2=Ax
Y2=Ay + Z o omY - (He i gh t + 1)
UB 2 = 0
VR2=He i g h t
なお、 スプライトの右下の頂点 3の XYUV座標は、 他の 3項点の XYUV座標から得られ るため、 ここでは算出されない。
ここで、 Ψΐ\^ι d t h及び高さ He i gh tは、 それぞれ 8ビットであるところ、 UB*及 び VR* (* = 0, 1, 2) の各パラメータは、 符号なしで、 鐘部 10ビット、 小数部 6ビ ットの 16ビット固定小数点数であるため、 バーテックスエキスパンダ 116は、 演算結果の L SB側に 6ビットの 「0」、 MSB側に 1または 2ビットの 「0」 を連接して、 16ビット固 定小数点数 UB *及び VR *とする。
バーテックスエキスパンダ 116は、 演算結果、 つまり、 各頂点 0〜2の XYUV座標を、 ポリゴン Zスプライト共通データ C Iとして、 スライサ 118に出力する。 ただし、 ポリゴン /スプライト共通データ C Iの後述のフィーノレ WG* (* = 0, 1, 2) は、 常に 「0x0 040」 (=1. 0) として出力される。 後zM"るが、 バーテックスエキスパンダ 116が出力 するポリゴン/スプライト共通データ C Iの構造 (形式) は、 バーテックスソータ 114が出 力するポリゴン スプライト共通データ C Iの構造 (形式) と同じである。
図 10は、 図 2のバーテックスソータ 114の入出力信号の説明図である。 図 10を参照し て、 バーテックスソータ 114は、 受け取ったポリゴン構造体インスタンス及びそれに付随す るテクスチャァトリビュート構造体インスタンスから、 ポリゴンの各頂点のパラメータ (XY UV座標、 パースペクティブコレクト用パラメータ、 及びカラーデータ) を取得及び算出し、 各頂点のパラメータを ,Υ座標が小さレヽ順に並 えて、 ポリゴン /スプライト共通データ C I としてスライサ 118へ出力する。以下、ポリゴンの頂点のパラメータ算出の詳細を説明する。 まず、 ポリゴンが、 テクスチャマッピングの対象である^について説明する。
図 11は、 ポリゴンの頂点パラメータ算出の説明図である。 図 11 (a) には、 UV空間に おけるポリゴンのテクスチャパターンデータ (文字 A) が例示される。 この図において、 1つ の小矩形は、 1テクセルを示す。 そして、 テクセルの 4頂点のうち、 左上角の UV座標が、 そ のテクセルの位置を示す。
本実施の形態では、 ポリゴンが三角形の例を挙げており、 ポリゴンにマッピングされるテク スチヤ (この例では四角形) は、 1つの頂点が UV座標の (0, 0) に、 残り 2つの頂点がそ れぞれ U軸上および V軸上に配置される。 従って、 テクスチャの幅 (水平方向のテクセル数) を「Wi d t h+l」、テクスチャの高さを「He i gh t + l」 とすると、テクスチャの左上, 右上, 左下の各頂点の UV座標がそれぞれ (0, 0)、 (Wi d t h+1, 0)、 及び (0, He i gh t + 1) となるように、 ポリゴンのテクスチャパターンデータは、 UV空間に配置され る。
ここで、 「W i d t h」 および 「He i g h t」 の値は、 テクスチャァトリビュート構造体の メンノ^ V i d t hおよび H e i gh tに ¾ήされる値である。すなわち、これらのメンバには、 テクスチャの幅、 高さより 1小さレ、値が される。 なお、 テクスチャデータは、 メモリ ME される際に、 その一部が折り返されて■される^があるが、 ここでは説明を省略 する。 図 11 (b) には、 XY空間におけるポリゴンの描画例が示される。 この図において、 1つ の小矩形は、 ピクセルの集合からなり、 図 11 (a) の 1テクセルに対応する。 同様に、 1つ の小三角形は、 ピクセルの集合からなり、 図 11 (a) の 1テクセルに対応する。
ポリゴンの 3頂点 A, B及び Cの XY座標は、 それぞれ (Ax, Ay)、 (Bx, By) 及び (Cx, Cy) で表される。 「Ax」、 「Ay」、 「Bx」、 「By」、 「Cx」、 及び 「Cy」 は、 そ れぞれポリゴン構造体インスタンスのメンバ Ax、 Ay、 Bx、 By、 Cx、 及び C yに格納 された値である。 このように、 ポリゴン構造体インスタンスのメンバ Ax及び Ayの値力 ポ リゴンの頂点 Aの X座標及び Y座標、 メンバ Bx及び Byの値が、 ポリゴンの頂点 Bの X座標 及び Y座標、 メンバ C X及び C yの値が、 ポリゴンの頂点 Cの X座標及び Y座標となる。 そして、 ポリゴンの頂点 Aは、 図 11 (a) の UV座標の (0, 0) に関連付けられ、 頂点 Bは、 UV座標の (Wi d t h, 0) に関連付けられ、 頂点 Cは、 UV座標の (0, He i g h t) に関連付けられる。 従って、 バーテックスソータ 114は、 スプライ卜の;^と同様に して、 頂点 A、 B、 及び Cの UV座標 (Auy Av) (Bu, Bv)、 及び (Cu, Cv) を算 出する。 ,
頂点 Aについては次の通りである。
Au = 0
Av = 0
頂点 Βについては次の通りである。
B u =W i d t h
B v = 0
頂点 Cについては次の通りである。
Cu = 0
C v=He l g h t
そして、 ノ ーテックスソータ 114は、 頂点 A、 B、 及び Cの UV座標 (Au, Av), (Β u, Βν), 及び (Cu, Cv) に、 パースペクティブコレクト (遠近補正) を施す。 ノ、。—スぺ クティブコレクトを施した後の頂点 A、 B、及び Cの UV座標は、 (Au - Aw, Av · Aw)、 (B u · Bw, B v · Bw)、 及び (Cu · Cw, C v · Cw) となる。
ここで、 「Wi d t h」 及び 「He i g h t」 は、 それぞれテクスチャァトリビュート構造体 インスタンスのメンノ^ Wi d t h及び He i gh tに^!された値である。 また、 「Bw」 及び 「Cw」 は、 それぞれポリゴン構造体インスタンスのメンバ Bw及び Cwに; TOされた値であ る。 後述のように、 頂点 Aのパースペクティブコレクト用パラメータ Awは、 常に 「1」 であ るため、 「Aw」 はポリゴン構造体インスタンスには格納されていない。 次に、 バーテックスソータ 114は、 頂点 A, B及び Cのパラメータ (XY座標、 パースべ クティブコレクト後の UV座標、 及びパースペクティブコレクト用パラメータ) を Y座標が小 さレ、順にソート (並^ え) する。 ソート後の頂点は、 Y座標が小さレ、順に頂点 0, 1, 2と して扱われる。 図 11 (b) の例では、 頂点 Aが頂点 1に、 頂点 Bが頂点 0に、 頂点 Cが頂点 2になっている。 バーテックスソータ 114によるソート処理の詳細を説明する。
図 12は、 ポリゴンの頂点ソート処理の説明図である。 図 12には、 ソート前の頂点とソー ト後の頂点との関係が示されている。 「A」、 「B」、 「C」 力 Sソート前の頂点に付けられている頂 点名であり、 「0」、 「1」、 「2」 がソート後の頂点に付けられている頂点名である。 また、 「A y」、 「By」、 及び 「Cy」 は、 それぞれポリゴン構造体インスタンスのメンバ Ay、 By、 及 び yに搬 されている値であり、 ソート前のポリゴンの頂点 A、 B、及び Cの Y座標である。 頂点 0の Υ座標 Υ 0≤頂点 1の Υ座標 Υ 1≤頂点 2の Υ座標 Υ 2、 であり、 これらの関係は 固定である。 そして、 ソート前の頂点 Α、 Β、 及び Cの Υ座標 Ay、 By、 及び Cy間の大小 関係に従って、 頂点 A、 B、 及び Cの各々力 S 頂点 0、 1、 及び 2のいずれかに割り当てられ る。 例えば、 項点間の¥座標が8 ≤八7<じ7でぁる¾^、 バーテックスソータ 114は、 頂点 0の各パラメータに頂点 Bの各パラメータを代入し、 頂点 1の各パラメータに頂点 Aの各 パラメータを代入し、 頂点 2の各パラメータに頂点 Cの各パラメータを代入する。
この例を、 図 11を参照しながら詳細に説明する。 この 、 各頂点 0〜2の X座標、 Y座 標、 U座標、 V座標、 及びパースペクティブコレクト用パラメータを、 X*、 Y*、 UB*、 VR*、 及ひ^ WG* (「*」 は、 「頂点」 に付けた添え字であり、 * = 0, 1, 2) とすると、 それぞれの値は以下のようになる。
頂点 0については次の通りである。 ,
X0 = B X
Y0=B y '
UB 0=B u · Bw
VR0=B v · Bw
WGO = Bw
頂点 1については次の通りである。
X 1 =Ax
Yl=Ay
UB 1 =Au · Aw
VR 1 =Av · Aw
WG 1 =Aw 頂点 2につレヽては次の通りである。
X 2=Cx
Y2=Cy
UB 2=Cu · C
VR2=C v · Cw
WG2=Cw
ここで、 「Aw」、 「Bw」、 及び 「Cw」 の値は、 それぞれ符号なしで、 S¾部 2ビット、 小 数部 6ビットの 8ビット固定小数点数であるところ、 UB*、 VR*、 及ひ (* = 0, 1, 2) の各パラメータは、 符号なしで、 皿部 10ビット、 小数部 6ビットの 1 6ビット固 定小数点数であるため、 「Aw」、 「Bw」、 及び 「Cw」 の値の MSB側に 8ビットの 「0」 が 連接される。 また、 「Au」、 「Bu」、 「CuJ、 「Av」、 「B v」、 及び 「Cv」 の値は、 それぞ れ符号なしで、 整数部 8ビット、 小数部 0ビッ卜であるため、 符号なしで、 整数部 2ビット、 小数部 6ビットの 8ビット固定小 ^数の 「Aw」、 「Bw」、 及び 「Cw」 の値との乗算の結果 は、 符号なしで、 部 1 0ビット、 小数部 6ビットの 1 6ビット固定小数点数となり、 特に 空白ビットは生じなレ、。
バーテックスソータ 1 14は、 演算結果、 つまり、 各頂点 0〜 2のパラメ一タ (XY座標、 ノ、。一スぺクティブコレクト後の UV座標、 及びパースペクティブコレクト用パラメータ) を、 ポリゴン/スプライト共通データ C Iとして、 スライサ 1 1 8に出力する。 後述するカ、 バー テックスソータ 1 14が出力するポリゴン /スプライト共通データ C Iの構成 (形式) は、 バ ーテックスエキスパンダ 1 1 6が出力するポリゴン Zスプライト共通データ C Iの構成 ( ^) と同じである。 '
次に、 ポリゴンがグーローシェーディングの対象である場合を説明する。 ポリゴンの 3頂点 A, B及び Cの XY座標は、 それぞれ (Ax, Ay)、 (Bx, B y) 及び (Cx, Cy) で表 される。 「Ax」、 「Ay」、 「B x」、 「B y」、 「Cx」、 及び 「Cy」 は、 それぞれポリゴン構造 体インスタンスのメンバ Ax、 Ay、 Bx、 B y、 Cx、 及び C yに格納された値である。 こ のように、 ポリゴン構造体インスタンスのメンバ Ax及び Ayの値が、 ポリゴンの頂点 Aの X 座標及び Y座標、 メンバ B x及び Byの値が、 ポリゴンの頂点 Bの X座標及び Y座標、 メンバ C X及び C yの値が、 ポリゴンの頂点 Cの X座標及び Y座標となる。
また、 ポリゴンの 3頂点 A, B及び Cのカラーデータは、それぞれ (Ar, Ag, Ab)、 (B r, B g, B b) 及ぴ (C r, C g, Cb) で表される。 (A r, Ag, Ab)ゝ (B r, B g, B b) 及び (C r, C g, Cb) は、 それぞれポリゴン構造体インスタンスのメンバ Ac、 B c、 及び C cに格納された値である。 Ab=Ac [14 10] (青成分)、 Ag=Ac [9 : 5] (誠分)、 Ar =Ac [4 : 0] (赤成分)、 Bb=Bc [14: 10] (青成分)、 Bg=Bc [9 : 5] (誠分)、 Br=Bc [4: 0] (赤成分)、 Cb=Cc [14 10] (青成分)、 Cg=Cc [9 . 5] 分)、 C r =Cc [4 · 0] (赤成分)、 である。
このように、 ポリゴ #造体インスタンスのメンバ Acの値カ、 ポリゴンの頂点 Aのカラー データ、 メンバ Beの値が、 ポリゴンの頂点 Bのカラーデータ、 メンバ Ccの値が、 ポリゴン の頂点 Cのカラーデータとなる。 - バーテックスソータ 114は、 図 12の表に従って、 頂点 A, B及ぴ Cのパラメータ (XY 座標及びカラーデータ) を Y座標が小さい順にソート (並べ替え) する。 ソート後の頂点は、 Y座標が小さい順に頂点 0, 1, 2として扱われる。 この点は、 テクスチャマッピングモード と同様である。 頂点間の Y座標が By≤Ayく Cyである (図 11 (b)) を例に挙げて説 明する。
各頂点 0〜2の X座標、 Y座標、 B値 (青成分)、 R値 (赤成分)、 及び G値 分) を、
X*、 Y*、 UB*、 yR*、及ひVG* (「*」 は、 「頂点」 に付けた添え字であり、 * = 0, 1, 2) とすると、 それぞれの値は以下のようになる。
頂点 0については次の通りである。
X0=Bx
Y0=By
UB 0=B b
VR0 = B r
WG 0=B g
頂点 1については次の通りである。
X 1 =Ax '
Y 1 =Ay
UB 1 =Ab
VR 1 =Ar
WGl=Ag
頂点 2については次の通りである。
X2=Cx
Y2=Cy
UB 2 = Cb
VR2=C r WG2=C g
ここで、 「UB*」、 「VR*」、 及び 「WG*」 (* = 0, 1, 2) の各パラメータは、 16ビ ットの値であるため、 各色成分の L SB側に 6ビット、 MSB則に 5ビッ卜の 「0」 が連接さ れる。
バーテックスソータ 114は、 演算結果、 つまり、 各頂点 0〜 2のパラメータ (X Y座標、 及びカラーデータ) を、 ポリゴンノスプライト共通データ C Iとして、 スライサ 118に出力 する。 次に説明するが、 バーテックスソータ 114が出力するポリゴン Zスプライト共通デー タ C Iの構成 (形式) は、 バーテックスエキスパンダ 116が出力するポリゴン/スプライト 共通データ C Iの構成 (形式) と同じである。
図 13は、ポリゴン/スプライト共通データ C Iの構成を示す図である。図 13を参照して、 ポリゴン / スプライト共通データ C Iは、ブイ一ノレド F (1ビット), WG* (各 16ビット), VR* (各 16ビット), UB* (各 16ビット), Y* (各 10ビット) 及ぴ X* (各 11ビ ット) からなる (計 208ビット)。 * = 0, 1, 2であり、 頂点を示す。
フィーノレド Fは、 ポリゴン/ /スプライト共通データ C I 、 ポリゴンについてのものである か、 スプライトについてのものであるか、 を示すフラグフィールドである。 従って、 バーテツ クスソータ 114は、 ポリゴンを示す 「1」 をフィールド Fに; する。 一方、 バーテックス エキスパンダ 116は、 スプライトを示す 「0」 をフィールド Fに格納する。
バーテックスエキスパンダ 116力、ら出力されるポリゴン/スプライト共通データ C Iでは、 フィールド VR*, UB*, 丫*及び *は、 それぞれ頂点 *の V座標、 U座標、 Y座標、 及 ぴ X座標である。 この^^、 フィール KWG*には、 「0x0040」 (=1. 0) 力 S格納され る。 上述したように、 頂点 *の出 噴は、 早いほう力 ら頂点 0、 頂点 1、 及ひ TS点 2である。 バーテックスソータ 114力 ら出力される、 テクスチャマッピングの ¾ ^であるポリゴン/ スプライト共通データ C Iではく フィーノレ KWG*, VR*, UB*, Y*及び X*は、 それ ぞれ頂点 *のノヽ。一スぺクティブコレクト用パラメータ、ノヽ。一スぺクティブコレクト済み V座標、 パースペクティブコレクト済み U座標、 Υ座標、 及び X座標である。
バーテックスソータ 114力 ら出力される、 グーローシェーディングの ^であるポリゴン スプライト共通データ C Iでは、 フィールド WG*, VR*, UB*, Y*及び X*は、 そ れぞれ頂点 *の緑成分、 赤成分、 青成分、 Υ座標、 及び X座標である。
図 2のスライサ 118について説明する。 まず、 スライサ 118による、 グーローシエーデ ィングモードのポリゴンに対する処理を説明する。
図 14は、 図 2のスライサ 118による、 グーローシェーディングモードのポリゴンに対す る処理の説明図である。 図 14を参照して、 スライサ 118は、 与えられたポリゴン Ζスプラ イト共通データ C Iにより定義されるポリゴン (三角形) と、 描画 ¾ ^の水平ラインと、 の交 点の XY座標 (X s, Ys) 及び (Xe, Ye) を求める。 ここで、 ポリゴンに対しては、 描 画 の水平ラインと交わらない辺が する側の交点を終端 (Xe, Ye) とし、 当該辺が 存在しなレ、側の交点を始端 (X s, Y s) とする。
そして、 スライサ 118は、 描画 Y座標 Y rが Y 0≤ Y rく Y 1の範囲では、 頂点 0の R G B値 (VRO, WGO, UBO) 及ひ TS点 2の RGB値 (VR2, WG2, UB 2) に基づい て、 補間により、 交点始端の RGB値 (R s, G s, B s) を算出するとともに、 頂点 0 の RGB値 (VRO, WGO, UB 0) 及ひ I 点 1の RGB値 (VR 1, WG 1 , UB 1) に 基づいて、 直線補間により、 交点終端の RGB値 (Re, Ge, Be) を算出する。 また、 ス ライサ 1 18は、描画 Y座標 Yrが Yl≤Yr≤Y2の範囲では、頂点 0の RGB値(VRO, WGO, UBO) 及ひ T 点 2の RGB値 (VR2, WG2, UB 2) に基づいて、 麵補間に より、 交点始端の RGB値 (R s, G s, B s) を算出するとともに、 頂点 1の RGB値 (V Rl, WG 1, UB 1) 及ひ T 点 2の RGB値 (VR2, WG2, UB 2) に基づいて、 纖 補間により、 交点終端の RGB値 (Re, Ge, B e) を算出する。
そして、 スライサ 1 18は、 AR、 AG, ΔΒ及び AXgを算出する。 ここで、 AR、 AG、 厶 Bは、 描画^の水平ラインにおける AXgあたりの R、 G、 Bそれぞれの変化量であり、 Δ X gは、 描画対象の水平ラインにおける 1ピクセノレあたりの X座標の変化量である。 Δ X g は、 「+1」 または 「一 1」 のいずれかとなる。
^R= (Re-R s) / (Xe -X s)
AG= (Ge-G s) / (Xe— X s)
AB= (B e— B s) / (Xe— X s)
AXg= (Xe— X s) / I Xe-X s |
スライサ 1 18は、 デプスコンパレータ 1 12から受け取った構造体インスタンスと共に、 算出した X s, R s, G s, B s, Xe, Δ R, AG, 厶 B及び AXgを、 ピクセルステツパ 120へ送出する。 また、 スライサ 1 18は、 バーテックスソータ 1 14力、ら受け取ったポリ ゴン /スプライト共通データ c I 、 次の描画サイクルでも使用される は、 リサイクルバ ッファ 1 10に、 デプスコンパレータ 1 12から受け取った構造体インスタンスを書き込む。 なお、 ビデオタイミングジエネレータ 138からの垂直走査力ゥント信号 V C及びポリゴンの 頂点座標から、 次の描画サイクルでの使用の有無を知ることができる。
次に、 スライサ 1 18による、 テクスチャマッピングモードのポリゴンに対する処理を説明 する。
図 15は、 図 2のスライサ 1 18による、 テクスチャマッピングモードのポリゴンに対する 処理の説明図である。 図 15を参照して、 スライサ 1 18は、 与えられたポリゴン/スプライ ト共通データ C Iにより定義されるポリゴン (三角形) と、 描画 の水平ラインと、 の交点 座標である始端 (X s, Ys) 及び終端 (Xe, Ye) を求める。 この点は、 グーローシエー ディンダモードのポリゴンに対する処理と同じである。
ここで、 パースペクティブコレクト機能について説明する。 藤微変換された三次元ィメ ージを表現するテクスチャマッピングにおいて、 スクリーン上の描画ピクセノレに対応するテク セルを、 ポリゴンの各頂点座標に対応する、 U V空間のテクスチヤの各頂点座標の単なる線形 補完によって求めると、 マッピングされたイメージが歪んでしまうことがある。 この歪みを解 消するのがパースペクティブコレクト機能であり、具体的には、以下のような処理が行われる。 ポリゴンの各頂点 A, B, Cを UV空間へ写像したときの座標を、 (Au, Av), (Bu, B v), (Cu, Cv) とする。 また、 各頂点 A, B, Cのビュー座標を (Ax, Ay, Az), (B x, By, B z), (Cx, Cy, C z) とする。そして、 (Au/Az, Av/Az, 1/Az), (Bu/B z, B v/B z, 1/B z), (Ou/C z, Cv/Cz, 1/Cz) の線开補間に よって求められた値 (u/z, v/z, 1/z) の u/zに lZzの逆数を乗じた値 uおよび v/zに 1/zの逆数を乗じた値 v、 つまり (u, V) をテクセル座標 (U, V) としてテク セノ^、ータを取得することにより、 変換後の正確なテクスチャマッビングを する。 ここで、 ビュー座標とは、 ビュー座標系の座標である。 ビュー座標系は、 XYZの三軸から成 る三次元直交座標系であり、 視点を原点とし、 を z軸の正とする。
本実施の形態では、 lZAz, 1/B ζ, 1/C zを頂点毎に設定する代りに、 それぞれの 値に A zを掛け合わせた値、 すなわち、 Az/Az (=Aw), AzZB z (=Bw), z/ Cz (=Cw) をポリゴ^ «造体に設定する (図 3参照)。 但し、 頂点 Aに るパラメータ A wは常に 「1」 となるため、 ポリゴン構造体には設定しなレ、。
従って、 本実施の开$態では、 '(Au · Aw, Av · Aw, Aw), (Bu · Bw, B v · Bw, Bw), (Cu · Cw, C v · Cw, Cw) の線开漏間によつて求められた値 (u · w, v · w, w) の u . wに 1/wを乗じた値 uおよび v · wに lZwを乗じた値 v、 つまり (u, v) を テクセル座標 (U, V) としてテクセ Λ ^—タを取得することにより、 影変換後の正確 なテクスチャマッピングを実現する。
このことを念頭においた上で、 スライサ 1 18は、 描画 Y座標 Y rが Y 0≤ Y r < Y 1の範 囲では、 頂点 0の (UB0, VRO, WG0)、 及ひ TI点 2の (UB2, VR2, WG2) に基 づいて、麵補間により、 交点始端の (Us, Vs, Ws) を算出するとともに、頂点 0の (U B0, VRO, WG0)、 及ひ TI点 1の (UB 1, VR1, WG1) に基づいて、 S 補間によ り、 交点終端の (Ue, Ve, We) を算出する。 また、 スライサ 1 18は、 描画 Y座標 Y r が Yl≤Yr≤Y2の範囲では、頂点 0の (UB0, VR0, WG0)、及び頂点 2の (UB2, VR2, WG2) に基づいて、 直線補間により、 交点台端の (Us, Vs, Ws) を算出する とともに、 頂点 1の (UB1, VR1, WG1)、 及ひ頂点 2の (UB2, VR2, WG2) に 基づいて、 直線補間により、 交点終端の (Ue, Ve, We) を算出する。
このことを、 頂点間の Y座標が By Ay<Cyであり、 描画 Y座標 Y rが Y 1≤ Y r≤ Y 2の範囲である^^を例に挙げて説明する。 そうすると、 スライサ 118は、 頂点 0の (UB 0, VRO, WGO) = (Bu · Bw, B v · Bw, Bw)、 及ひ TI点 2の (UB 2, VR 2, WG2) = (Cu - Cw, Cv · Cw, Cw) に基づいて、 j! 補間により、 交点始端の (U s, Vs, Ws) を算出するとともに、 頂点 1の (UB1, VR 1, WG 1) = (Au - Aw, Av · Aw, Aw)、 及ひ T 点 2の (UB 2, VR2, WG2) = (Cu · Cw, C v · Cw, Cw) に基づいて、 直線補間により、 交点終端の (Ue, Ve, We) を算出する。
次に、 スライサ 118は、 Δυ、 Δν、 AW及び ΔΧ tを算出する。 ここで、 厶 U、 Δν、 AWは、描画練の水平ラインにおける厶 X tあたりの U座標 (=u -w), V座標(= V · w)、 ノ、一スぺクティブコレクト用パラメータ W (=w) それぞれの変ィ匕量であり、 AX tは、 描画 対象の水平ラインにおける 1ピクセノレあたりの X座標の変化量である。 Δ X tは、 「+ 1」 また は 「一 1」 のいずれかとなる。
AU= (Ue-Us) / (Xe-X s)
AV= (Ve— Vs) / (Xe-X s)
AW= (We -Ws) / (Xe-X s)
ΔΧ t = (Xe— X s) I Xe _X s I
スライサ 118は、 デプスコンパレータ 112から受け取った構填体インスタンスと共に、 算出した Xs, Us, Vs, Ws, Xe, AU, AV, AW及び ΔΧ ΐを、 ピクセルステツパ 120へ送出する。 また、 スライサ 118は、 バーテックスソータ 114から受け取ったポリ ゴン Ζスプライト共通データ c I力 次の描画サイクノレでも使用される;!^は、 リサイクルバ ッファ 110に、 デプスコンパレータ 112から受け取った構造体インスタンスを書き込む。 なお、 ビデオタィミングジエネレータ 138力 らの垂直走査力ゥント信号 V C及びポリゴンの 頂点座標から、 次の描画サイクルでの使用の有無を知ることができる。
次に、 スライサ 118によるスプライトに対する処理を説明する。
図 16は、 図 2のスライサ 118による、 スプライトに対する^!連の説明図である。 図 16 を参照して、 スライサ 118は、 与えられたポリゴン Ζスプライト共通データ C Iにより定義 されるスプライト (矩形) と、 描画練の水平ラインと、 の交点座標 (Xs, Ys) 及び (X e, Ye) を求める。 ここで、 スプライトに対しては、先に描画される側の交点を始端 (X s, Ys) とし、 後に描画される側の交点を終端 (Xe, Ye) とする。
スプライトの各頂点 0, 1, 2, 3を UV空間へ写像したときの座標は、 (UB0, VR0), (UB 1, VR 1), (UB 2, VR2), (UB 3, VR3) である。 ここで、 UB3, VR3 はスライサ 118に入力されないが、 それぞれ下記のようにスライサ 118内で求められる。 UB3=UB 1
VR3=VR2
スライサ 118は、 頂点 0の (UB0, VR0) 及ひ頁点 2の (UB2,-VR2) に基づい て、 直線補間により、 交点始端の UV座標 (Us, Vs) を算出するとともに、 頂点 1の (U B 1, VR1) 及び頂点 3の (UB3, VR3) に基づいて、 直線補間により、 交点終端の U V座標 (Ue, Ve) を算出する。
そして、 スライサ 118は、 Δυおよび Δνを算出する。 ここで、 厶 U、 Δνは、 描画^ の水平ラインにおける Δ X sあたりの U座標、 V座標それぞれの変化量である。 Δ X sは、 描 画^の水平ラインにおける 1ピクセノレあたりの X座標の変ィ匕量であるが、 常に 「 1」 となる ので、 算出は行わない。 ,
厶 U= (Ue— Us) Z (Xe— X s)
AV= (Ve— Vs) / (Xe -X s)
厶 Xs = (Xe-X s) / I Xe-X s | = 1
スライサ 118は、 デプスコンパレータ 112から受け取った構造体インスタンスと共に、 算出した Xs, Us, Vs, Xe, Δυ, 厶 V及び AXsを、 ピクセルステツパ 120へ送出 する。 また、 スライサ 118は、 バーテックスエキスパンダ 116から受け取ったポリゴンノ スプライト共通データ C I力 S、 次の描画サイクルでも使用される: t は、 リサイクノレバッファ 110に、 デプスコンパレータ 112から受け取った構造体インスタンスを書き込む。 なお、 ビデオタイミングジェネレータ 138からの垂直走查カウント信号 VC及ぴスプライ卜の頂点 座標から、 次の描画サイクノレでの使用の有無を知ることができる。
ここで、 スライサ 118は、 ポリゴン スプライト共通データ C Iのフィーノレド Fから、 ポ リゴンおよびスプライトの別を認識でき、ポリゴン構造体インスタンスのメンバ Ty p eから、 グーローシエーディング及びテクスチャマツビングの別を認識できる。
図 2に戻って、 ピクセルステツ 20は、 グーローシェーディングモードのポリゴンにつ いては、 スライサ 118から与えられたパラメータ (Xs, Rs, Gs, B s, Xe, AR, AG, ΔΒ及び ΔΧδ) から、描画職ピクセルの描画 X座標と RGB値を求め、 (1— α) 値 とともにピクセノ^ィザ 122に送出する。 具体的には、 ピクセルステツパ 120は、 交点の 始端 (描画開始端) 3の赤成分1^3に、 1ピクセル当たりの赤成分の変化量 ARを順 ¾fc¾口え ていき、 各ピクセルの赤成分 RXを求める。 この処理を、 交点の終端 (描画終了端) Xeに到 i fるまで行う。 «分 GX及び青成分 BXについても同様である。 また、 交点の始端 Xsに 厶 Xgを順 ¾fc¾えていき、 描画 X座標 Xrを求める。 なお、 X=0〜 | Xe— Xs |であり、 整数である。
RX=AXg · ^R · X+R s
GX=AXg · AG · X+G s
BX=AXg · ΔΒ · X+B s - Xr =AXg · X + X s
ピクセルステツパ 120は、 求めた各ピクセルの RGB値 (RX, GX, BX)、 並びに描画 X座標 Xてを、 ( 1— ο 難ぴにデプス値 (De p t h) とともに、 ピクセノ ィザ 122に 出力する。
また、 ピクセノレステツノ 120は、 テクスチャマッピングモードのポリゴンについては、 ス ライサ 118から与えられたパラメータ (X's, Us, Vs, Ws, Xe, AU, AV, AW 及び ΔΧ 1;) 力 ら、 描画驗ピクセルを UV空間へ写像したときの座標 (U, V) を求める。 具体的には、 ピクセノレステツパ 120は、 交点、の始端 (描画開始端) X sのノ、。一スぺクティブ コレクト用パラメータ Wsに、 1ピクセル当たりのパースペクティブコレクト用パラメータの 変ィ匕量
Figure imgf000046_0001
き、 各ピクセルのパースペクティブコレクト用パラメータ WXを求 める。 この処理を、 交点の終端 (描画終了端) Xeに到針るまで行う。 なお、 X=0〜 | X e— X s Iであり、 である。
WX=AX t · AW · X+Ws
ピクセノレステツノ、。 120は、 交点の台端 (描画開始端) 5の11座標 (=u · w) Usに、 1ピクセル当たりの U座標の変化量 Δυを順 ¾fc¾卩えていき、 求めた値に WXの逆数を掛け合わ せ、 各ピクセノレの U座標 UXを求める。 この処理を、 交点の終端 (描画終了端) Xeに到 るまで行う。 V座標 (=v - w) VXについても同様である。 また、 交点の始端 Xsに AXt を順次加えていき、 描画 X座標 Xrを求める。 なお、 X=0〜 | Xe— Xs |であり、 整数で ある。
UX= (厶 X t · · X + U s) · ( 1 /WX)
VX= (ΔΧ t · Δν · X + V s) · ( 1 /WX)
X r =ΔΧ t · X + X s
ピクセルステツパ 120は、 求めた各ピクセルの UV座標 (UX, VX) 並びに描画 X座標 Xrを、 スライサ 118から受け取った構造体インスタンス (テクスチャマッピングのポリゴ ン構造体インスタンス及ぴテクスチャアトリビュート構造体インスタンス) とともにテクセノレ マツパ 1 24に出力する。
さらに、 ピクセノレステツノ、°1 20は、 スプライトについては、 スライサ 1 1 8から与えられ たスプライトのパラメータ (X s, U s, V s, Xe, AU,
Figure imgf000047_0001
s、 から描画 ピクセルを UV空間へ写像したときの座標 (U, V) を求める。 具体的には、 ピクセルステツ ノ、° 1 20は、 交点の台端 (描画開始端) X sの U座標 U sに、 1ピクセノレ当たりの U座標の変 化量 Δυを順次加えていき、 各ピクセルの U座標 UXを求める。 この処理を、 交点の終端 (描 画終了端) Xeに到射るまで行う。 V座標 VXについても同様である。 また、 交点の始端 X sに AX s、 すなわち 「1」 を順 卩えていき、 描画 X座標 X rを求める。 なお、 X=0〜 | X e -X s Iであり、 である。
UX=AX s · Δυ · X+U s
VX=厶 X s · AV · X + V s
X r =X + X s
ピクセルステツパ 1 20は、 求めた各ピクセルの UV座標 (UX, VX)、 並びに描画 X座標 X rを、 スライサ 1 1 8力 受け取った構造体インスタンス (スプライト構造体インスタンス 及びテクスチャアトリビュート構造体インスタンス) とともにテクセルマツパ 1 24に出力す る。
ピクセノ^ィザ 1 22は、 ピクセルステツパ 1 20から与えられた RGB値の小数部にノィ ズを加え、 マツノ、バンドを目立たなくするディザリングを実行する。 なお、 ピクセルディザ 1 22は、 ディザリング後のピクセルの RGB値を、 描画 X座標 X r, (1— α) 値, 及びデプス 値とともに力ラーブレンダ 1 32に出力する。
テクセルマツパ 1 24は、 テクスチャアトリビュート構造体のメンバ F i 1 t e r力 「0」 を示している には座標 (UX, VX) の近傍 4つのテクセゾ^ータを指し示す 4組のヮー ドアドレス WADとビットアドレス BADを、 メンバ F i 1 t e r力 S 「1」 を示している^^ には座標 (UX, VX) に最も近い 1つのテクセノげ、ータを指し示す 1組のワードアドレス W ADとビットアドレス BADを算出して出力する。 また、 メンバ F i 1 t e r力 S 「0」 を示し ている^には、 ノくィリニァフィルタリングにおける各テクセルの係数部に相当するバイリ二 ァフィルタパラメータ BFPを算出して出力する。 更に、 シザリングイネーブル時のスプライ トと、 シザリングディセーブル時のスプライトと、 ポリゴンと、 で互レヽに異なるデプス値 (メ ンバ D e p t h) の形式を統一して出力する。
テクスチャキャッシュブロック 1 26は、 テクセノレマツパ 1 24から出力されたワードアド レス WAD、 ビットアドレス BAD、 構造体インスタンスのメンバ T s e gme n tから、 各 テクセルのァドレスを算出する。 算出されたァドレスが指し示すテクセノ^ータが既にキヤッ シュに格納されている^^、 されているテクセゾ^'ータ及びァトリビュート構造体のメン バ P a 1 e t t e力、ら、 カラーパレット RAM 1 1のエントリを選択するインデックスを生成 し、 カラーパレツト RAM I 1に出力する。
一方、 当該テクセノ^ータが、 キャッシュに格納されていない場合は、 テクスチャキヤッシ ュブロック 1 2 6は、 メモリマネージャ 1 4 0に対して、 テクセゾ^5'一タの取 示を出す。 メモリマネージャ 1 4 0は、 メイン RAM 2 5あるいは外部メモリ 5 0から該当するテクスチ ャパターンデータを取得して、テクスチャキャッシュブロック 1 2 6のキヤ-ッシュに ¾内する。 また、 メモリマネージャ 1 4 0は、 マージソータ 1 0 6からの指示で、 後段で必要になるテク スチヤパターンデータを、 外部メモリ 5 0から取得して、 メイン RAM 2 5に格納する。 この際、 メモリマネージャ 1 4 0は、 テクスチャマッピングモードのポリゴン用のテクスチ ャパターンデータについては、 1ポリゴンにマッピングされるデータ全体を一括して取得し、 メイン RAM 2 5に格納するのに対し、スプライト用のテクスチャパターンデータについては、 1スプライトにマッピングされるデータをライン単位で取得し、 メイン RAM 2 5に搬内する。 これは、 描画 ¾ ^の水平ラインに含まれるピクセル群を UV空間に写像すると、 ポリゴンの場 合は UV空間中のあらゆる ¾ 上に写像される可能性があるのに対し、 スプライトの^は U 軸に な 上にのみ写像されるからである。
本実施の形態では、 テクスチャキヤッシュブロック 1 2 6のキヤッシュは、 6 4ビット X 4 ェントリとし、 ブロック置換アルゴリズムは、 L RU ( l e a s t r e c e n t l y u s e d ) とする。
カラーパレット RAM I 1は、 テクスチャキャッシュブロック 1 2 6から入力されたテクセ ノ ータとメンバ P a 1 e t t eとが連接されたインデックスが示すエントリに含まれる RG B び半透明合成のための (1— α) 値を、 バイリニアフィルタパラメータ B F P、 デプス 値、 及び描画 X座標 X rとともにバイリニアフィルタ 1 3 0に出力する。
バイリニアフィルタ 1 3 0は、 バイリニアフィルタリングを 计る。 テクスチャマツピン グにおいて、最も単純なピクセル描画色の算出方法は、 UV空間に写像されたピクセル座標 (U x, vx) に最も近いテクセル座標に位 るテクセルのカラーデータを取得し、 取得した力 ラーデータからピクセルの描画色を算出する方法である。 この手法を 「ユアレストネイバ一」 と呼ぶ。
但し、 隣り合うピクセルを UV空間に写像した際の 2点間の »が 1テクセル分の »より 極めて小さレ、^ \ すなわち、 スクリーン上でテクスチャが大きく拡大されてマッピングされ る:^には、 二ァレストネイバ一ではテクセルの境界が明瞭に表示されてしまうため、 粗いモ ザイク状のテクスチャマツビングとなってしまう。 このような問題を解消する手法として、 パ イリエァフィノレタリングを^亍する。
図 17は、 バイリニアフィルタ 130によるバイリニアフィルタリングの説明図である。 図 17に示すように、バイリ-ァフイノレタ 130は、 UV空間に写像されたピクセル座標 (UX, VX) の近傍 4テクセルの RGBィ紐ぴ (1— α) 値の加重平均を算出し、 ピクセルの描画色 を決定する。 これにより、 テクセルのカラーが滑らかに補完され、 マッピング結果におけるテ クセルの境界が目立たなくなる。 具体的には、 ノ ィリニァフィルタリングは次式 (バイリユア フィルタリングの により紫亍される。ただし、次式において、 「u」は U座標 UXの小数部、 「v」 は V座標 VXの小数部、 「nu」 は (1一 u)、 「nv」 は (l_v)ゝ である。
RO • n u · n v+Rl • u • n v + R2 • n u · v + R3 • U · V
G = GO , n u · n v+Gl • u • n v+G2 • n u · v+G3 • U · V
B = BO • n u · n v + B 1 • u • n v + B 2 • n u · v + B 3 • U · V
A= AO * n u · n v+Al • u • n v+A2 • n u · v+A3 • u · V
ここで、 R0, Rl, 1 2及び1^3は、 それぞれ、 上記 4テクセルの R値であり、 GO, G 1, 02及ぴ03は、それぞれ、上記 4テクセルの G値であり、 B0, B 1, 82及び83は、 それぞれ、 上記 4テクセルの B値であり、 A0, Al, A 2及ぴ A 3は、 それぞれ、 上記 4テ クセルの (1— α) 値である。
バイリニアフィルタ 130は、 算出したピクセルの RGB値 (RGB) 並びに (1— α) 値 (Α) を、 デプス値並びに描画 X座標 Xrとともに、 力ラーブレンダ 132に出力する。 図 2を参照して、 力ラーブレンダ 132の説明の前に、 ラインバッファブロック 134につ いて説明する。 ラインバッファブロック 134は、 ラインバッファ LB 1及び LB 2を含み、 一方のラインパ'ッファが表示用に使用されているときは、 他方のラインノ ッファが描画用に使 用され、 表示用と描画用とを交互に切り替えて使用するダブルバッファ ^を採用する。 表示 用に使用されているラインバッファ (LB1, LB2) は、 ビデオタイミングジェネレータ 1 38からの水平 カウント信号 HC及び垂直 «カウント信号 VCに従って、 ピクセルごと の RGB値を、 ビデオエンコーダ 136に出力する。
力ラーブレンダ 132は、 半透明合成を実行する。 具体的には、 次の通りである。 力ラーブ レンダ 132は、 ピクセ Λ ^ィザ 122あるいはバイリニアフィルタ 130から与えられたピ クセルの RGBiil¾ぴ (l-α) 値と、 描画 ¾ ^のラインバッファ (LB1, LB2) の描画 ピクセル位置 (描画 X座標 Xr力 S示すピクセル) に:^されている RGB値とを用レ、、 次 式により、 ァノレフアブレンデイングを ¾ίϊし、 結果を同じラインバッファ (LB 1, LB 2) の描画対象ピクセル位置に書き込む。
Rb=R f · (1 -a r) +R r Gb=G f . (1 -a r ) 十 Gr
B b=B f - (1 -a r ) +B r
ab = a f · (1— a r) -fa r
ここで、 「1— a r」 は、 ピクセノ 1 ^'ィザ 122あるいはバイリニアフィルタ 130力 ^与え られた (1一 a) 値である。 「Rr」、 「G r」 及び 「Br」 は、 それぞれ、 ピクセノ ィザ 12 2あるいはバイリニアフィルタ 130から与えられた RGB値である。 「Rf」、「Gf」& '「B f」 は、 それぞれ、 描画用に使用されているラインバッファ (LB1, LB 2) の描画 像ピ クセル位置から取得した RGB値である。 一般的なアルファブレンディングのアルゴリズムに おいては、 上式の Rr, Gr, および B rの項は、 それぞれ R r · a r、 Gr · a r、 および B r · a rとなる力 本実施の形態では、 予め R r · a r, Gr · a r, および B r · a rの 計算結果を Rr、 Gr、 および B rとして用意しておくことにより、 演算回路の簡 匕を行つ ている。
ビデオエンコーダ 136は、 表示用に^ ffiされているラインバッファ (LB1, LB 2) か ら入力された RGB値と、 ビデオタイミングジェネレータ 138から入力されたタイミング情 報 (複合同期信号 S YN、 複合ブランキング信号 B L K、 バーストフラグ信号 B S Τ、 及びラ イン交番信号 LA等) と、 を信号 VSに対応したコンポジットビデオ信号を表すデータストリ ーム VDに変換する。 信号 VSは、 テレビジョン^: (NTS Cや PAL等) を指示する信号 である。
ビデオタイミングジエネレータ 138は、 入力されるクロックを基に、 水平走查カゥント信 号 HC及び垂直走査カウント信号 VC、 並びに、 複合同期信号 SYN、 複合ブランキング信号 B LK、バーストフラグ信号 B S T、及びライン交龍号 L Α等のタイミング信号を«する。 水平走査カウント信号 HCは、 システムクロックの 1周期毎にカウントアップされ、 1水平ラ インのスキャンが終了すると、'リセットされる。 また、 垂直走査カウント信号 VCは、 1ノ2 水平ラインのスキャンが終了するたびにカウントアップされ、 1フレームあるいは 1フィール ドのスキャンが終了すると、 垂直走査カウント信号 VCはリセットされる。
さて、 以上のように、 本実施の形態によれば、 バーテックスソータ 114及びバーテックス エキスパンダ 116は、 ポリゴン構造体およびスプライト構造体を同一形式のポリゴン/スプ ライト共通データ C Iに変換するので、 ポリゴンとスプライトとで、 RPU9の内部回路を極 力共通化することができる。 このため、 ハードウェア規模の抑制を図ることができる。
また、 従来のように 3Dシステム (ポリゴンの描画) だけではなく、 2Dシステム (スプラ ィ卜の描画) をも搭載しているので、 スプライトを描画する場合は、 スプライト全体のテクス チヤ画像を一括して取得する必要はなく、 例えば、 上記のように、 スクリーンにおける 1ライ ン単位でのテクセノ ータの取得が可能である。このため、メモリ容量の増大を招くことなく、 同時に描画できるポリゴン及びスプライトの数を多くできる。
以上の結果、 ハードウェア規模を抑制しながらも、 二次元空間に ¾ ^された三次元立体の各 面の形状を表すためのポリゴンおよぴスクリーンの枠に平行なスプライトの任意の組み合わせ 力らなる画像を^^でき、 かつ、 メモリ容量の増大を招くことなく、' 同時に描画できるポリゴ ン及ぴスプライ卜の数を多くできる。
また、 本実施の形態では、 バーテックスソータ 1 1 4は、 ポリゴン Zスプライト共通データ C Iのフィールド U B *、 VR *、 及ひ WG * (* = 0〜2 ) に、 描画モード (テクスチャマ ッビングあるいはグーローシエーディング) に応じた形式で頂点 *のパラメータを TOするの で、 ポリゴン /スプライト共通データ C Iの形式の同一性を保持しながらも、 3 Dシステムに おいて、 異なる描画モードでの描画を実現できる。
さらに、 本実施の形態では、 スプライトの 3つの頂点 1〜 3の座標を計算で求めるので、 ス プライト構造体に 4つの頂点。〜 3全ての座標を含める必要はなく、 スプライト構造体の TO に必要なメモリ容量を抑制できる。 もちろん、,スプライトの 3つの頂点 1〜3の座標のうちの 一部を計算で求め、 他をスプライト構造体に格納することもできる。 また、 バーテックスェキ スパンダ 1 1 6が算出する UV空間へ写像された座標は、 スプライトのお 率 Z o o mX, Z o o mY力 S反映されたものであるため、 原画像を拡大または縮小した画像をスクリーンに表示 する でも、拡大後または縮小後の画像データを予めメモリ MEM上に用意する必要はなく、 画像データの格納に必要なメモリ容量を抑制できる。
さらに、 本実施の形態では、 ポリゴン /スプライト共通データ C Iの同一性を保持しながら も、 ポリゴンノスプライト共通データ C Iを受け取るスライサ 1 1 8は、 フラグブイ一ノレドを 参照することにより、 描画^のグラフィック要素の種類 (ポリゴンあるいはスプライト) を 容易に判別して、 ダラフイツグ要素の種類ごとの処理を行うことができる。
さらに、 本実施の形態では、 ポリゴンおよびスプライトのいずれについても、 ポリゴン Zス プライト共通データ C Iにおいて、 頂点の出 頃に並べられているので、 後段での描画処理が 容易になる。
さらに、 本実施の形態では、 スライサ 1 1 8は、 スクリーン座標系における単位 X座標当り の頂点パラメータの変化量 (厶 R、 A G、 Δ Β、 厶 X g、 ΔΙΙ、 Δ ν、 AW、 Δ Χ ΐ、 厶 X s ) をピクセルステツパ 1 2 0に送出するので、 ピクセノレステツノ 1 2 0は、 ポリゴンと描画水平 ラインとの 2つの交点間の各パラメータ (RX、 GX、 B X、 UX、 VX、 X r ) およぴスプ ライトと描画水平ラインとの交点間の各パラメータ (UX、 VX、 X r ) を線纖間により容 易に算出できる。 さらに、 本実施の形態では、 マージソータ 1 0 6は、 マージソートノトル 1〜4に従って、 ポリゴン構造体ィンスタンス及びスプライト構造体ィンスタンスを描画優先順に整列した上で、 同じ単一のデータ列、 つまり、 ポリゴン Zスプライトデータ P S Dとして出力するので、 ポリ ゴンとスプライトとで、 後段の回路を極力共通ィ匕でき、 ハードウェア規模の抑制を一層図るこ とができる。
さらに、 本実施の形態では、 マージソータ 1 0 6は、 ポリゴンの出現 T頁点 標 (3頂点のう ち最も小さい Y座標) とスプライ トの出現頂点座標 (4頂点のうち最も小さい Y座標) とを比 較して、 スクリーンに早く出現する方の描画優 噴位が高くなるように (マージソートルール 1 )、 マージソートを行う。 このため、 後段では、 ポリゴン Zスプライトデータ P S Dとして出 力されるポリゴン構造体インスタンス及びスプライト構造体インスタンスに対して、 出力順に 描画処理を行うだけでょレヽ。 このため、 1フレーム以上の画像を格納するための大容量のバッ ファ (フレームバッファ等) を実装する必要は必ずしもなく、 より容量の小さレヽバッファ (ラ インバッファや、 1ラインに満たなレヽピクセルを描画するピクセルバッファ等) を実装した場 合であっても、 多くの,ポリゴン及びスプライトを組み合わせた画像の表示が可能になる。 また、 マージソータ 1 0 6は、 ポリゴンとスプライトとで出現頂点座標が同じ^^、 描画対 象の水平ラインにおいて、 デプス値が大きレヽ順で描画優先順位を決定する (マージソートノ ル 2)。 従って、描画対象の水平ラインにおいて、 より奥に描画されるポリゴンあるいはスプラ ィ卜が先に描画される (デブス値の順での描画)。
さらに、 マージソータ 1 0 6は、 ポリゴン及ぴスプライトの双方の出現頂点 標が、 最初に 描画するライン (つまり、 スクリーンの先頭ライン) より前に位置する は、 それらを同一 座標とみなすので (マージソートノ^~ノレ 3 )、 デプス値に基づいて、 より奥に描画される方を描 画優 噴位が高いと判 iii "る。 従って、 スクリーンの先頭ラインにおいて、 ポリゴン及びスプ ライトは、 デプス値の順で描画される。 このような先頭ラインでの処理を行わない 、 先頭 ラインの描画においては、 必ずしもデプス値の順での描画が保証されないが、 この構成によれ ば、 先頭ラインからデプス値の順での描画を行うことが可能となる。
さらに、 マージソータ 1 0 6は、 インタレース表示が行われる^において、 表示対靠のフ ィ一ノレドで描画されなレヽ水平ラインに相当する出現頂点 標と、 その水平ラインの次の水平ラ イン (表示 のフィールドで描画される水平ライン) に相当する出現頂点座標と、 を同一座 標として扱うので (マージソートノ ノレ 4 )、 デプス値に基づいて、 より奥に描画される方を描 画優 頃位が高いと判断する。 従って、 インタレース表示の場合でもデプス値の順での描画処 理カ S保証される。
以上のように、 マージソートノ^ "ル 2〜4により、 デプス値の順での描画処理力 S保証される ので、 半透明合成を適切に行うことができる。 何故ならば、 半透明のグラフィック要素の描画 色は、 当該グラフィック要素の奥にあるグラフィック要素の描画色に依存するため、 グラフィ ック要素を奥から順に描画する必要があるからである。
さて、 次に、 テクスチャの繰り返しマッピング、 及びテクスチャパターンデータのメモリ M EMへの格納方式 (フォーマット について説明する。 '
まず、 テクスチャの繰り返しマッピングについて説明する。 テクスチャアトリビュート構造 体のメンバ M及び Nのいずれ力一方または両方が 「1」 以上の値を示すとき、 テクスチャパタ ーンデータは、 UV空間において水平方向及び/又は垂直方向において繰り返されて配置され る。 従って、 XY空間において、 ポリゴン及びスプライトには、 当該テクスチャが、 繰り返し マッピングされる。
以下、 これらの点について、 具体例を挙げながら説明するが、 その前に、 ST座標系につい て説明しておく。 ST座標系は、 テクスチャを構成する各テクセルが、 メモリ MEMに格納さ れる態様で配置される二次元直 3¾1標系である。 後述のテクスチャパターンデータの分割格納 カ行われない は、 ,(S, T) = (後 るマスク済みの UX, 後 るマスク済みの VX) となる。 U座標 UX及ぴ V座標 VXは、 ピクセルステツパ 120が算出した値である。
一方、 UV座標系は上述の通り、 テクスチャを構成する各テクセルが、 ポリゴンあるいはス ブライトにマッピングされる態様で配置される二次元直 標系である。 つまり、 UV座標系 における座標は、 ピクセルステッパ 120が算出した U座標 UXおよび V座標 VXであって、 後述のマスク前の U座標 U Xおよび V座標 V Xによつて定められる。
なお、 UV空間及び ST空間ともに、 テクスチャ (テクセノレ) 力 S配置される点で、 テクセノレ 空間と言うことができる。
図 18 (a) は、 繰り返しマッピングが行われる ¾ ^において、 ST空間に配置された四角 形のテクスチャの例示図、 図 1'8 (b) は、 繰り返しマッピングが行われる場合において、 U V空間に配置された、 ポリゴンにマッピングされるテクスチャの例示図、 図 18 (c) は、 図 18 (b) のテクスチャが繰り返してマッピングされた、 XY空間におけるポリゴンの例示図 である。
図 18 (a) 〜図 18 (c) では、 メンバ M=4、 メンバ N= 5の場合を例に挙げている。 メンバ Mは、 U座標 UX (上位 8ビットが S¾部、 下位 3ビット力 S小数部) においてマスクさ れる上位ビットの数を 8ビットで表したものであり、 メンバ Nは、 V座標 V X (上位 8ビット 力 S皿部、 下位 3ビットが小数部) におレ、てマスクされる上位ビットの数を 8ビットで表した ものである。
図 18 (a) には、 ST空間におけるポリゴンのテクスチャパターンデータ (文字 R) が例 示される。 この図において、 1つの小矩形は、 1テクセルを示す。 そして、 テクセルの 4頂点 のうち、 左上角の ST座標が、 そのテクセルの位置を示す。
M= 4、 N=5の^、 U座標 U Xの上位 4ビットと V座標 V Xの上位 5ビットがマスクさ れて 「0」 となるため、 テクセゾ^ータがメモリ MEMに格納される際の ST空間は、 S = 0 〜15、 T=0〜7の範囲へと縮小される。つまり、 S = 0〜15、 T=0〜7の範囲のみに、 テクセノ 一タが格納される。
このように、 U座標 UXの上位 4ビットと V座標 VXの上位 5ビットがマスクされ、 S Τ空 間が図 18 (a) のように縮小されると、 UV空間においては、 図 18 (b) に示すように、 水平 16テクセル、 垂直 8テクセルから構成される四角形のテクスチャ力 S、 水平方向および垂 直方向に繰り返される。
図 18 (c) を参照して、 この例では、 テクスチャアトリビュート構造体のメンバ i d t h = 31、 メンバ He i g h t =19の^である。 水平 16テクセル、 垂直 8テクセルのテ クスチヤが、 ポリゴンに繰り返しマッピングされる»が a reきる。 この図において、 ιつ の小矩形は、 ピクセルの集合からなり、 図 18 (b) の 1テクセノレに対応する。 また、 1つの 小三角形は、 ピクセルの集合からなり、 図 18 (b) の 1テクセルに対応する。
なお、スプライトへ繰り返しマッピングする^^についても、ポリゴンの ^と同様であり、 説明を省略する。
次に、 テクスチャパターンデータのメモリ MEMへの 内^ (フォーマット勸 につい て説明する。まず、ポリゴンにマッピングされるテクスチャパターンデータについて説明する。 図 19 (a) は、 ポリゴン構造体のメンバ MAPが 「0」 の^において、 ST空間に配置 された、 ポリゴンにマッピングされるテクスチャの例示図、 図 19 (b) は、 ポリゴン構造体 のメンバ MAPが 「1」 の^において、 ST空間に配置された、 ポリゴンにマッピングされ るテクスチャの例示図である。 '
図 19 (a) 及び図 19 (b) を参照して、 小さレ、正方形は 1テクセルを表し、 横長の小さ い長方形は 1メモリワードに^されるテクセル列 (以下、 「テクセルブロック」 と呼ぶ。) を 表し、横長の大きな長方形 C¾の長方形)はテクスチャパターンデータの 1ブロックを表す。 また、 本実施の形態では、 1メモリワードを 64ビットとする。
これらの図において、 テクスチャ TXは、 直角三角形である。 テクスチャ TXは、 S軸 (U 軸) に ¥ ^な S により、 切片 s g f及び切片 s f bに分割される。 そして、 切片 s g f (図 中左側のハッチング部) は、 UV空間におけるそのままの状態で ST空間 (具体的には二次元 酉己列 A) に され、 切片 s gb (図中右側のハッチング部) は、 UV空間において 180度 回転及 »動して、 ST空間 (具体的には二次元配列 A) に欄される。 このような;^;で、 テクスチャパターンデータの 1ブロック tfc^) がメモリ MEMに格納される。 このような格 納方式を、 「テクスチャパターンデータの分割格納」 と呼ぶ。
ただし、 メンバ Ma pの値とメンバ He i gh tの値とが特定の組み合わせになった 、 及び、 上記した繰り返しマツビングが行われる場合には、 テクスチヤパターンデータの分割格 納は行われない。
ここで、 テクセルブロックを表す長方形の 口 内の ^は、 1ブロックのテクスチャパター ンデータを上記の二次元配列 Aとみなし、 各テクセルプロックを二次元配列 Aの要素とみなし た の、 配列 Aの添え字 (インデックス) を示す。 二次元配列 Aの添え字が小さい要素に格 納されたデータから順にメモリ MEMに格納される。
図中、 テクセルブロックの水平テクセル数は 「w」、 垂直テクセル数は 「h」 で示される。 水 平テクセル数 wおよび垂直テクセル数 hの値は、 メンバ Ma pの値とメンバ B i tの値により 定められる。 下記の (表 1) は、 メンバ Ma p = 0の におけるメンバ B 1 tと水平テクセ ル数 w及び垂直テクセル数 h (つまりテクセルブロックのサイズ) との関係を示している。
(表 1) '
Figure imgf000055_0001
(表 1) から明らかなように、 図 19 (a) は、 Ma p = 0、 B i t =4の のテクスチ ャパターンデータの分割格納の; (i^を表している。
下記の (表 2) は、 メンバ Ma p =lの^におけるメンバ B i tと水平テクセル数 w及び 垂直テクセル数 h (つまりテクセルブロックのサイズ) との関係を示している。 (表 2 )
Figure imgf000056_0001
(表 2 ) から明らかなように、 図 1 9 (b ) は、 M a p = l、 B i t = 4の場合のテクスチ ャパターンデータの分割格納の様子を表している。
以上のように、 テクスチャパターンデータの分割 力 S行われる^、 分割されたテクスチ ャ T Xの切片 s g b力 マッピングには不要な領域のテクセルに置き換えられてメモリ MEM に格納されるため、 必要なメモリ容量を抑 できる。
次に、 スプライトにマッピングされるテクスチャパターンデータの^ ^;について説明す る。
図 2 0は、 S T空間に配置された、 スプライトにマッピングされるテクスチャの例示図であ る。 図 2 0を参照して、 小さい正方形は 1テクセルを表し、 横長の小さレ、長方形はテクセルブ ロックを表し、 横長の大きな長方形 ( の長方形) はテクスチャパターンデータの 1ブロッ クを表す。 また、 本実施の形態では、 1メモリワードを 6 4ビットとする。
.この図において、 テクスチャ T Xは、 四角形 (ノヽツチング部) である。 テクスチャ T Xは、 UV空間におけるそのままの状態で S T空間 (具体的には二次元配列 B) に格納される。 この ような形態で、テクスチャパターンデータの 1ブロック (¾)がメモリ MEMに ¾ ^される。 なお、 スプライトにマッピング'されるテクスチャパターンデータについては、 分割格納は行わ れない。
ここで、 テクセルブロックを表す長方形の 口 内の数 は、 1ブロックのテクスチャパター ンデータを上記の二次元配列 Bとみなし、 各テクセルブロックを二次元配列 Bの要素とみなし た の、 配列 Bの添え字 (インデックス) を示す。 二次元配列 Bの添え字が小さい要素に格 納されたデータから順にメモリ MEMに格納される。
図中、 テクセルブロックの水平テクセル数は 「w」、 垂直テクセル数は 「h」 で示される。 水 平テクセル数 wおよび垂直テクセル数 hの値は、 メンバ B i tの値により定められる。 メンバ B i tと水平テクセル数 w及び垂直テクセル数 h (つまりテクセルブロックのサイズ:) との関 係は、 (表 1 ) と同じである。 次に、 テクセルブロックの詳細を説明する。
図 21 (a) は、 ポリゴン構造体のメンバ MAPが 「0」 の場合における S T空間上のテク セルブロックの説明図、 図 21 (b) は、 ポリゴン構造体のメンノく MAPが 「1」 の ¾ ^にお ける ST空間上のテクセルブロックの説明図、 図 21 (c) は、 1メモリワードへのテクセル ブロックの Wl状態の説明図である。 なお、 上述のように、 スプライトの ST空間上のテクセ ルブロックの構成は、 メンバ MAPが 「0」 の^のポリゴンのそれと同じである。
図 21 (a) は、 メンバ MAP = 0、 メンバ B i t=4の^であり、テクセノレブロックは、 左端のテクセル # 0を先頭とし、 順次右隣のテクセル # 1, #2, '·, #11力 S続けて配置さ れてなる。
図 21 (b) は、 メンノく MAP=1、 メンバ B i t =4の:^であり、 テクセノレブロックは、 左上角のテクセル # 0を先頭とし、 順次右隣のテクセル # 1, #2, #3が続けて配置され、 右端に ると、 一行下の左端のテクセル #4から順次右隣のテクセル #5, #6, #7が続 けて配置され、 再び右端に ると、 一行下の左端のテクセル #8カゝら順次右隣のテクセル # 9, # 10, # 11が続けて配置されてなる。'
図 21 (c) を参照して、 メンバ B i t=4の ¾ ^ (図 21 (a)及び図 21 (b) が該当)、 1テクセルのデータは 5ビットで構成されるので、 テクセル # 0は、 メモリヮードの第 0ビッ 卜から第 4ビットに され、 以下同様にして、 テクセル # 1からテクセル # 11までが隙間 なくさされる。 メモリワードの第 60ビットから第 63ビットは空白ビットであり、 テクセ ルのデ一タは^ Jされなレ、。
テクスチャの繰り返しマッピング、 及びテクスチャパターンデータのメモリ MEMへの ¾¾¾ (フォーマット を念願においた上で、 テクセルマツパ 1 4の詳細を説明する。 図 22は、 図 2のテクセルマツパ 124の内部構成を示すブロック図である。 図中、 信号名 に付した符号の後に付けられだ() 内の »は、 その信号のビット数を表している。 図 22を 参照して、 テクセルマツパ 124は、 テクセルアドレス算出部 40、 デプスフォーマット統一 部 42、 及び «生成部 44を含む。
テクセルマツパ 124は、 ピクセルステツパ 120から入力されるテクセル U座標 UX、 テ クセル V座標 VX、 スプライト構造体インスタンス Zポリゴン構造体インスタンス、 テクスチ ャァトリビュート構造体ィンスタンス、 及び描画 X座標 X rに基づいて、 描画ピクセノレにマツ ビングされるテクセルのメモリ MEM上の;)? ^ftf立置 (テクスチャパターンデータの先頭からの オフセット) を算出し、 テクスチャキャッシュブロック 126に出力する。 以下に各入力信号 について説明する。
入力データ有効ビット I DVは、 ピクセノレステツパ 120からの入力データが^ ¾)な値力 かを示す。 テクセル U座標 UX及びテクセル V座標 VXは、 描画ピクセルにマッピングされる テクセルの UV座標を示す。 テクセル U座標 UX及びテクセル V座標 VXは、 それぞれ、 8ビ ットの 部と 3ビットの小数部と力 成り、 ピクセルステツパ 120が算出したものである。 信号 Ma p及び L i g h tは、 それぞれ、 ポリゴン構造体のメンバ Ma p及び L i g h tの 値である。 信号 F i 1 t e r及び T s e gme n tは、 それぞれポリゴン構造体及びスプライ ト構造体のメンバ F l i t e r及び T s e gmen tの値である。 なお、 テクセルマツパ 12 4に送出されるポリゴン構造体インスタンスは、 全てテクスチャマツピンダモードのポリゴン の構造体インスタンスである。 信号 Wi d t h, He i gh t, M, N, B ι t及び P a 1 e t t eは、 それぞれ、 テクスチャァトリビュート構造体のメンパ i d t h, He i gh t, M, N, B l t及び P a l e t t eの値である。
信号 Sp r i t eは、 入力されるデータ力 ポリゴンについてのものか、 スプライトについ てのものかを示す信号であり、 ピクセルステツパ 120から出力される。 シザリングイネーブ ノ 言号 SENは、シザリング処理がイネ一プル Zディセーブルのいずれの状態であるかを示す。 この信号 SENの値は、 じ?115が! ?119内の制御レジスタ (図示せず) に設定する。 信号 D e p t hは、 ポリゴ «造体及びスプライト構造体のメンバ D e p t hの値である。 但し、 メンバ D e p t hのビット数は、 ポリゴ «造体では 12ビット、 シザリングディセーブル時 のスプライト構造体では 8ビット、 シザリングイネーブル時のスプライト構造体では 7ビット と、 それぞれ大きさが異なる。 従って、 12ビットに満たない値は、 MSB側に 「0」 が連接 された形式で入力される。
信号 X rは、 ピクセルステッパ 120が算出したピクセルの描画 X座標であり、 スクリーン 座標系 (2048X 1024ピクセノレ) の水平座標を符号無し整数で,示すものである。 以下に 各出力信号にっレ、て説明する。
出力データ有効ビット ODVは、 テクセルマツパ 124からの出力データが^ ¾な値力 か を示す。 メモリワードアドレス WADは、 テクセノ 一タが欄されているメモリ MEMのヮ 一ドアドレスを示す。 この WADは、 テクスチャパターンデータ先頭からのオフセットアド レスである。 ここでは、 64ビットを 1ヮードとする形式でァドレス WADが出力される。 ビットアドレス BADは、 テクセノ! ^'一タが格納されているメモリワード内における、 テク セノ! ^'一タの L SBのビット位置を示す。 バイリニアフィルタ用パラメータ BFPは、 テクセ ノ^ータの加重平均を算出する際の係数部に相当する。 終端フラグ EFは、 出力されるデータ の終端を示す。 ピクセルが二アレストネイバ一で描画される^^ (メンバ F 1 1 t e r =1の ^) には、 出力データは 1テクセル単位となり、 バイリニァフィルタリングで描画される場 合 (メンバ F 1 1 t e r=0の場合) には、 出力データが 4テクセル単位となるので、 それぞ れの場合で出力データの終端を示す。
信号 D e p t h_Ou tは、 12ビットの統一形式に変換されたデプス(奥行き)値である。 信号 F i 1 t e r— Ou t, B i t一 Ou t , Sp r i t e一 Ou t, L ι g h t_Ou t, T s e gme n t— O u t , P a 1 e t t e一 O u tおよび X— O u tは、 それぞれ、 入力信 号 F l i t e r, B i t, Sp r i t e, L i gh t, Ts e gmen t, Pa l e t t eお よび Xに相当し、 入力信号が出力信号としてそのまま後段に出力される。 但し、 他の出力信号 との同期を取るために遅延される。 - 後で詳細に述べるテクセルァドレス算出部 40は、 描画ピクセルにマッピングされるテクセ ルのメモリ MEM上の 立置を算出する。 テクセルアドレス算出部 40には、 入力データ有 効ビット I DV、テクセル U座標 UX、テクセル V座標 VX、信号 Ma p、信号 F l i t e r, 信号 Wi d t h、 信号 He i g h t、 信号 M、 信号 N、 及 言号 B i t力入力される。 また、 テクセルアドレス算出部 40は、 入力信号に基づいて、 出力データ有効ビット〇DV、 メモリ ワードアドレス WAD、 ビットアドレス BA'D、 バイリニアフィルタ用パラメータ BFP、 及 び終端フラグ EFを算出し、 テクスチャキャッシュブロック 126に出力する。
デプスフォーマツト統一部 42は、 ピクセルステツノ、°120から入力される構造体インスタ ンスが、 シザリングディセーブルのスプライト構造体インスタンスである:^、 シザリングイ ネーブノレのスプライト構造体インスタンスである場合、 ポリゴン構造体インスタンスである場 合のそれぞれにおいて、 異なる形式となる信号 De p t hの値を、 統一形式に変換し、 変換後 の値を信号 D e p t h_0 u tとして出力する。
艇^^部 44は、 入力された信号 F l i t e r, B i t, Sp r i t e, L i gh t, T s e gme n t, Pa 1 e t t eおよび Xをレジスタ (図示せず) で ϋ延'させ、 他の出力信号 ODV, WAD, BAD, BFP, E F及び D e p t h_O u tと同期させ、 それぞれ F i 1 t e r― O u t , B i t一 O u't , Sp r i t e― O u t , L i gh t― O u t , T s e g m e n t_Ou t, P a 1 e t t e_Ou tおよび X— Ou tとして出力する。
図 23は、図 22のテクセルァドレス算出部 40の内部構成を示すブロック図である。図中、 信^ こ付した符号の後に付けられた 0内の »は、 その信号のビット数を表している。 図
23を参照して、 テクセルアドレス算出部 40は、 テクセルカウンタ 72、 加重平均パラメ一 タ算出部 74、 バイリニアフィルタリング用 UV座標算出部 76、 マノ プレクサ 78、 上位 ビットマスク部 80, 82、水平垂直テクセル ^^出部 84、及びァドレス演算部 86を含む。 テクセノレカウンタ 72は、 入力データ^ ¾ビット I DVが 「1」 を示しているとき (すなわ ち棚なデータ力 S入力されたとき)、信号 F i 1 t e r = 0の齢 (すなわち入力されたピクセ ノレがバイリニアフィルタリングモードで描画される:^) には、順次「00」→「01」→「1 0」 → 「1 1」 をマルチプレクサ 7 8と力 0重平均パラメータ算出部 7 4とに送出して、 これら 力 ら 4テクセル分のデータが出力されるように制御する。
ここで、 図 1 7に示すように、 UV空間に写像されたピクセル座標の近傍 4テクセルをそれ ぞれ、 テクセノレ 0 0、 テクセル 0 1、 テクセル 1 0、 およびテクセル 1 1とする。 テクセル力 ゥンタ 7 2が出力する 「0 0」 はテクセル 0 0を示し、 テクセルカウンタ 7 2が出力する 「0 1」はテクセル 0 1を示し、テクセルカウンタ 7 2が出力する 「1 0」はテクセル 1 0を示し、 テクセルカウンタ 7 2が出力する 「1 1」 はテクセル 1 1を示す。 - 一方、 テクセルカウンタ 7 2は、 入力データ ビット I DVが 「1」 を示しているとき、 信号 F ΐ 1 t e r = lのiJ^ (すなわち入力されたピクセルが二アレストネイバ一モードで描 画される には、 「0 0」 をマノ ^プレクサ 7 8とカロ重平均パラメータ算出部 7 4とに送出 して、 これらから 1テクセル分のデータが出力されるように制御する。
また、 テクセルカウンタ 7 2は、 バイリニアフィルタリング用 UV座標算出部 7 6及びアド レス演算部 8 6のレジスタ (図示せず) が順次入力値を格納するように制御する。
さらに、 テクセルカウンタ 7 2は、 信号 F L i t e 1 = 0の¾^1こは、 4テクセル中の最終 テクセルに対応するデータが出力されるタイミングで、 終端フラグ E Fをアサートし、 信号 F l i t e r = 1 ¾^i;^i、 1テクセルに対応するデータが出力されるタイミングで、 終端フ ラグ E Fをアサートして、 1ピクセル分のデータ出力が完了したことを示す。 また、 テクセル カウンタ 7 2は、 有効なデータ出力が行われている間、 出力データ有効ビット ODVをアサ一 卜する。
バイリニァフィルタリング用 UV座標算出部 7 6について説明する。 テクセル U座標 UXの 難部を 「U」 (図では、 UX— Uと表記)、 テクセル V座標 VXの釋部を 「V」 (図では、 V X— Vと表記) とする。
バイリニァフィルタリング用 UV座標算出部 7 6は、 テクセル 0 0の U座標 部及ぴ V座 標赚部として、 座標 (U, V) を、 テクセル 0 1の U座標纖部及び V座標纖部として、 座標 (U+ 1 , V) を、 テクセル 1 0の U座標難部及び V座標難部として、 座標 (U, V 十 1 ) を、テクセル 1 1の U座標難部及び V座標難部として、座標(U+ l, V+ 1 ) を、 マルチプレクサ 7 8に出力する。 これは、 バイリニアフィルタリング時に必要とされる写像ピ クセルの近傍 4テクセルのデータを取得するための座標生成を意味する。
マルチプレクサ 7 8は、 テクセルカウンタ 7 2からの入力信号が 「0 0」 を示すときは、 テ クセル 0 0の U座標纖部及び V座標赚部 (U, V) を選択し、 入力信号が 「0 1」 を示す ときは、 テクセル 0 1の U座標纖部及び V座標赚部 (U+ 1 , V) を選択し、 入力信号が 「1 0」 を示すときは、 テクセル 1 0の U座標纖部及び V座標纖部 (U, V+ 1 ) を選択 し、 入力信号が 「11」 を示すときは、 テクセル 11の U座標鐘部及び V座標纖部 (U + 1, V+1) を選択し、 U座標 部及び V座標纖部 (U I, VI) として出力する。 ここで、 テクセル U座標 UXの小数部を 「u」 (図では、 UX— uと表記) とし、 テクセル V 座標 VXの小数部を 「v」 (図では、 VX一 Vと表記) とし、 (1— u) を 「nu」 とし、 (1一 V) を 「nv」 する。 また、 テクセル 00、 テクセル 01、 テクセノレ 10、 及びテクセル 11 の R (赤)成分をそれぞれ、 R0、 Rl、 R2、及び R 3とし、 テクセノレ 00、テクセル 01、 テクセノレ 10、 及びテクセル 11の G (緑) 成分をそれぞれ、 G0、 Gl、-G2、 及ぴ G 3と し、 テクセノレ 00、 テクセル 01、 テクセゾレ 10、 及びテクセル 11の B (青) 成分をそれぞ れ、 B 0、 B 1、 B 2、及び B 3とする。 また、 テクセノレ 00、 テクセノレ 01、テクセノレ 10、 及びテクセル 11の (1— α) 値をそれぞれ、 A0、 Al、 A 2、 及び A 3とする。
そうすると、 バイリニアフイノレタ 130は、 _Βίしたバイリニアフィルタリングの式に基づ いて、バイリニアフィルタリング後の描画ピクセルの赤成分 R、繊分 G、青成分 B、及び (1 -a) 値を求める。
バイリユアフィルタリングの式の各項の係数部 η ιι · ην、 u ' nv、 nu ' v、 及び u · vを、 それぞれテクセル 00係数部、 テクセル 01係数部、 テクセル 10係数部、 及びテクセ ル 11係数部とする。
加重平均パラメータ算出部 74は、 入力されたテクセル U座標 UXの小数部及びテクセル V 座標 VXの小数部 (u, V) に基づいて、 テクセノレ 00係数部、 テクセル 01係数部、 テクセ ノレ 10係数部、 及びテクセル 11係数部を算出する。 そして、 テクセルカウンタ力らの入力信 号が 「00」 のときは、 テクセノレ 00係数部を選択し、 入力信号が 「01」 のときは、 テクセ ル 01係数部を選択し、 入力信号が 「10」 のときは、 テクセル 10评、数部を選択し、 入力信 号が 「11」 のときは、 テクセノレ 11係数部を選択し、 バイリニアフィルタ用パラメータ BF Pとして出力する。 '
上位ビットマスク部 80は、 信号 Mの値に応じて、 U座標 Sfc部 UIの上位ビットを 「0」 にマスクして、 マスク済み U座標皿部 MU Iとして出力する。 例えば、 M=3であれば、 U 座標難部 U Iの上位 3ビットを 「000」 とする。 上位ビットマスク部 82は、 信号 Nの値 に応じて、 V座標 S¾部 V Iの上位ビットを 「0」 にマスクして、 マスク済み V座標 部 M V Iとして出力する。 例えば、 N= 3であれば、 V座標徹部 V Iの上位 3ビットを 「000」 とする。 なお、 上位ビットマスク部 80は、 M=0のときは、 マスクは "¾rfに、 U座標 部 U Iをそのままマスク済み U座標 S¾部 MU Iとして出力する。 また、 上位ビットマスク部 8 2は、 N=0のときは、 マスクはせずに、 V座標 部 V Iをそのままマスク済み V座標 S¾ 部 MV Iとして出力する。 水平垂直テクセル 出部 84は、 信号 Ma pと信号 B i tと力ら、 テクセルブロック (図 19及び図 20参照) の水平テクセル数 wと垂直テクセル数 hを算出する。 これらの算出は、 前述の (表 1) 及び (表 2) に基づいて行われる。
アドレス演算部 86は、 テクスチャの繰り返しマッピング (図 18参照) とテクスチャパタ ーンデータの分割格納 (図 19参照) が考慮された形で ST空間におけるテクセル座標を算出 し、 算出されたテクセル座標に基づいてメモリ MEM上の 立置を算出する。 詳細は次の通 りである。 - アドレス演算部 86は、 先ず、 テクスチャパターンデータの分割格納力 S行われている力 か を判別する。 以下の条件 1力ら条件 3のレヽずれか 1つでも満たされる 、 テクスチャパター ンデータの分割格納は行われてレ、なレ、。
(条件 1) 入力信号 Sp r 1 t e力 S 「1」 を示している^である。 すなわち、 入力データが スプライトに関する場合である。
(条件 2) 入力信号 M及び Nのいずれ力一方、 または両方が 「1」 以上の値を示している である。 すなわち、 テクスチャの繰り返しマッピングが行われる場合である。
(条件 3) 入力信号 H e i gh tの値がテクセルブロックの垂直テクセル数 hを超えない である。 すなわち、 テクスチャパターンデータをテクセルブロックに分割した際に、 垂直方向 のテクセルブロック数が 1の i である。
ここで、 マスク済み U座標皿部 MUIを 「U」、 マスク済み V座標 S¾部 MV Iを 「V」、 メモリ MEMに欄されている (ST空間における) テクセルの座標を (S, T) とする。 そ うすると、 アドレス演算部 86は、 テクスチャパターンデータの分割格納が行われている^ は、 ST空間におけるテクセルの座標 (S, T) を次式により算出する。 式において、 演算 記号 Γ/j は、 商の小数点以下を切り捨てて商を整数で求める除算を意味する。
[信号 Ma P =。の ]
V>He i g h t/2ならば、
S = (W l d t h/w+ 1 ) - w-U- 1
T = He l g h t— V
V≤He l g h t/2ならば、
S=U
T = V
[信号 Ma p = lの ]
V/h>He i g h hならば、
S= (W l d t h/w+ 1 ) - w-U- 1 T= (He i g h t/h+ 1) - h— V— 1
V/h≤He i g h t/2 hならば、
S=U
T = V
ここで、 「He i gh tZh」 は、 テクスチャの各テクセルのうちで最大の V座標を持つテク セルの V座標に基づいて定められた V座標閾値の一例である。 上記式においては、 ピクセルの V座標が V座標閾値以下の場合、 ピクセルの座標 (U, V) をそのまま ST座標系におけるピ クセルの座標 (S, T) とし、 ピクセルの V座標が V座標閾値を超える^、 ピクセルの座標 (U, V) を 180度回転及ひ移動して ST座標系におけるピクセルの座標 (S, T) に変換 している。 従って、 テクスチャパターンデータが分割 呐されている においても、 内先 のメモリ MEMから適切なテクセルデータを読み出すことができる。
一方、 アドレス演算部 86は、 テクスチャパターンデータの分割 力 S行われていなレ、 は、 ST空間におけるテクセルの座標 (S, T) を次式により算出する。
S=U '
T = V
アドレス演算部 86は、 テクセル座標 (S, T) 力、ら、 当該テクセノ^ータを含むメモリヮ ードのアドレス (メモリワードアドレス) WADと、 当該メモリワード内におけるビット位置 (ビットアドレス) BADを求める。 ここでアドレス演算部 86が求めるメモリワードァドレ ス WADは、 最終的なメモリアドレスではなく、 テクスチャパターンデータの先頭からのオフ セットアドレスであることに注意されたレ、。 最終的なメモリアドレスは、 後段のテクスチャキ ャッシュブロック 126にて、 メモリワードアドレス WADと信号 T,s e gmen tの値と力 ら求められる。
メモリワードアドレス WAD及びビットアドレス BADは、 以下の式から求められる。 この 式における演算記号 「/」 は、 商の小数点以下を切り捨てて商を «で求める^^を意味し、 演算記号 「%」 は、 商を «で求める除算における剰余を求めることを意味する。
WAD= (W 1 d t h/w+ 1) - (T/h) + (S/w)
BAD= ((V%h) · w+S%w) · (B i t + 1)
ここで、 ビットアドレス BADが示す値は、 テクセノ^ 'ータの L SBが格納されているメモ リヮード内のビット位置である。 例えば、 B i t = 6で B AD= 25の^、 ビット 25力 ら ビット 31までの 7ビットにテクセノ^ータが格納されていることを示す。
図 24は、 テクスチャパターンデータの分割 力 S行われた ^^のバイリニァフイノレタリン グの説明図である。 この図では、 メンバ F i 1 t e r=0、 メンバ Ma p = l、 メンバ B i t =2、 メンバV i d t h=21、 メンバ He ι g h t = 12のポリゴンのテクスチャパターン データの例が示される。 また、 テクセルブロックのサイズは、 w=7、 h = 3である。
この 、 テクスチャパターンデータは、 図示のように分割格納 (ノヽツチング部) される。 UV空間における 180度回^ ¾ひ移動なしで (つまり、 UV空間における配置で)、 ST空間 に欄されている部分については、 UV空間に写像されたピクセルの座標 (U, V) に対応す る ST空間の座標が (S, T) であるとき、 座標 (S, T)ゝ 座標 (S + l, T)、 座標 (S, T+l)、 及び座標 (S+l, T+1) に位置する 4つのテクセノげ 'ータが、.バイリニアフィル タリング処理で参照される。
一方、 分割格納により、 UV空間において 180度回転及ひ移動されて、 ST空間に 内さ れている部分については、 UV空間に写像されたピクセルの座標 (U, V) に対応する ST空 間の座標が (S, T) であるとき、 座標 (S, T)、 座標 (S-1, Τ)、 座標 (S, Τ一 1)、 及び座標 (S-1, Τ一 1) に位置する 4つのテクセルデータが参照される。
テタスチヤパターンデータの分割格納が行われている 、 2つに分割された三角形の間に 余白となるテクセノ^一タが するので、 つまり、 2つに分割された三角形の間にバイリニ ァフィルタリング用のテクセゾ^ータを配置できるので、 バイリニアフィルタリング処理が行 われる際に、 UV空間に写像されたピクセルの座標 (U, V) に対応する ST空間の座標(S, Τ) 近傍のテクセノ^ータが参照されても、 «なくピクセル描画処理を行うことができる。 さて、 以上のように、 本実施の形態では、 テクスチャは、 ポリゴンにマッピングされる態様 でメモリ MEMに (ST空間に配置) されるのではなく、 2つの切片に分割され、 かつ、 1つの切片が 180度回転及ひ 動されて、 メモリ MEMに (ST空間に配置) される。 このため、 例えば三角形等、 四角形以外のポリゴンにマッピングするテクスチャをメモリ ME Mに する においても、 テクスチャが: TOされない無駄な記憶領域を極力省くことがで き、 効率良く格納できるので、 テクスチャを格納するメモリ MEMの容量を小さくできる。 つまり、 テクスチャパターンデータを構成するテクセ /^'一タのうち、 テクスチャが酉己置さ れる領域のテクセノ^ータは実体的な内容 (カラーを直接的あるいは間接的に示す情報) を含 むものであるが、 テクスチャが配置されなレ、領域のテクセノ^ 'ータは、 実体的な内容を含まな い無駄なものである。 この無駄なテクセノ^ 'ータを極力省くことで、 必要なメモリ容量を抑制 できる。
ここで言うところのテクスチャパターンデータとは、 テクスチャが配置される領域 (図 19 のブロックのハッチング部に相当) のみのテクセノ^ータを意味するのではなく、 それ以外の 領域(図 19のブロックのハッチング部以外の部分に相当)のテクセノ1^ータを含む。つまり、 テクスチャパターンデータは、 三角形のテクスチャを含む四角形の領域のテクセゾ^'ータであ る (図 1 9のブロックに相当)。
特に三角形のポリゴンにマッピングする三角形のテクスチャをそのまま 2次元配列に格納す ると、 配列内のおよそ半分のテクセノ ータが無駄になるので、 ポリゴンが三角形の場合、 分 割格納はより好適である。
また、 本 の形態によれば、 テクスチャは直角三角形状であるため (図 1 9参照)、 直角を なす 2辺をそれぞれ、 UV空間の U軸及び V軸に一致させ、 つ、 直角の頂点を UV空間の原 点に設定することにより、 UV空間における三角形の頂点の座標の指定のために必要なデータ 量を少なくできる。
さらに、 本実施の形態では、 二次元空間に投影された三次元立体の各面の形状を表すポリゴ ンを、 スクリーンに正立する二次元のスプライトとして使用することもできる。 ただし、 あく までもポリゴンをスプライト的に使用するのであって、 ポリゴンであることに変わりない。 こ のようにスプライト的に使用するポリゴンを擬似スプライトと呼ぶ。
ポリゴンを劍以スプライトとして使用する は、 本来のスプライ卜と同様に、 ライン単位 でテクセノ ータを取得することにより、 テクセノ^ータを一時 するのに必要なメモリ容 量を削減することができる。
このような に、 メンバ M a p = 0 (第 1の 形態) とし (図 1 9 ( a ) 参照)、 メモリ MEMの 1ヮードに、 一次元に並んだテクセノ^'ータからなる 1テクセノレブ口ックを格納する ことで、 ライン単位でテクセノげ 'ータを取得する際のメモリ MEMへのアクセス回数を減らす ことができる。
一方、 ポリゴンを三次元立体を表すための本来の目的で使用する場合、 スクリーンの水平ラ ィン上のピクセルを UV空間に写像したとき、 必ずしも U V空間の水平ライン上に写像される とは限らなレ、。
このように、 ピクセルが UV空間の水平ライン上に写像されなレ、 ®^でも、 メンバ M a p = 1 (第 2の觸内形態) とし (図 1 9 ( b ) 参照)、 メモリ MEMの 1ワードに、 二次元に並んだ テクセノ^ータからなる 1テクセルブロックを ¾内することで、 ピクセルが写像された UV座 標に酉己置されたテクセゾ 一タカ 既にテクスチャキャッシュブロック 1 2 6に; ^されてい るテクセノ^ータの中に存在する可能性が高く (つまり、 キャッシュのヒット率が高い)、 テク セノ ータ取得のためのメモリ MEMへのアクセス回数を減らすことができる。
ここで、 ポリゴンを «スプライトとして使用すると、 次のようなメリットがある。 本来の スプライトでは、 1つの頂点座標だけをメンバ A y, A xで指定し、 そのサイズを、 メンバ H e i g h t , W i d t h , Z o o mY, Z o o mXで指定することにより (図 9参照)、 1つの スプライトを定義する。 このように、 スブライトでは、 そのサイズおよび頂点座標の指定に、 ある ¾g制限力 s加わってくる。 これに対して、 スプライトはポリゴンであるため、 メンバ
A y, A x , B y , B x , C y , C xで各頂点の座標を任意に指定でき (図 3参照)、 それ故サ ィズの指定も任意に行うことができる。
さらに、 本実施の形態では、 テクスチャの繰り返しマッピング力 S行われる: t は、 テクスチ ャパターンデータの分割 は行われなレ、。 従って、 矩形のテクスチャを水平方向及び/又は 垂直方向に繰り返しマッビングを行う際のテクスチャパターンデータのメモリ MEMへの格納 好適である。 し力も、 繰り返しマッピングなので、 同じテクスチャパターンデータを使用する ことができ、 メモリ容量の削減が可能となる。
さらに、 本実施の形態では、 バイリニアフィルタリングを行う際は、 ピクセルの S T空間に おける座標が、 1 8 0度回 ひ移動して S T空間に配置された切片に含まれる:^でも、 こ れを考慮して、 4テクセルを取得する (図 2 4参照)。 また、 分割して ^される切片同士の間 には、 ノ ィリニアフィルタリングで用いるテクセルが切片に «するように ¾ ήされる (図 2 4参照)。 これらのこと力 ら、 テクスチャパターンデータの分割 内を行う ¾ ^でも、 バイリニ ァフィノレタリング処理を問題なく実現できる。,
さらに、 本実施の形態では、 U座標難部 U Iの上 {iMビット及び/又は V座標纖部 V I の上位 Nビットをマスクする (「0」 にする) ことにより、 同じテクスチャパターンデータを使 用して、 異なる水平/垂直テクセノレ数でのテタスチヤの繰り返しマツビングを実現している。 同じテクスチャパターンデータを使用するため、 メモリ容量の削減が可能となる。
さて、 次に、 メモリマネージャ 1 4 0について詳細に説明していく。 テクスチャキャッシュ ブロック 1 2 6に描画対象のテクセルデータが格納されていない場合、 テクスチャキヤッシュ ブロック 1 2 6は、 メモリマネージャ 1 4 0にテクセノ^ータを要求する。
そして、 メモリマネージャ 1 4 0は、 要求されたテクスチャパターンデータをメイン RAM 2 5上のテクスチャバッファから読み出し、テクスチャキャッシュブロック 1 2 6に出力する。 テクスチャバッファは、 メイン RAM 2 5上に設定されるテクスチャパターンデータのテンポ ラリ格納領域である。
一方、 メモリマネージャ 1 4 0は、 マージソータ 1 0 6力ら要求されたテクスチャパターン データがメイン RAM 2 5上のテクスチャバッファに読み込まれていなレ、^、 DMACイン タフエース 1 4 2を介して DMAC 4に DMA¾¾を要求し、 外部メモリ 5 0に¾ ^されてい るテクスチャパターンデータを、 新たに取得したテクスチャバッファ領域に読み込む。
この^、 メモリマネージャ 1 4 0は、 マージソータ 1 0 6から出力されるメンバ 「T s e g m e n t」 の値とテクスチャパターンデータ全体のサイズ隋報とに従って、 後述の図 3 0及 び図 3 1に示すテクスチヤバッファ領域取 ^理を^ Tる。 本雄の形態では、 テクスチャ バッファ領域取得処理の機能をハードワイヤードロジックで達成している。
メモリマネージャ 140の MCBィニシャライザ 141は、 後 ¾Μ "る MCB (Memo r y Con t r o l B l o c k) 構造体配列の内容を初期化するためのハードウエアである。 メ モリマネージャ 140が管理するテクスチャバッファは、 領域の取得と解放と力 S繰り返される 内に断片化 (フラグメンテーション) を起こし、 大きな領域の確保が難しくなつてくる。 この フラグメンテーションの発生を回避するため、 MCBィニシャライザ 141は、 MCB構造体 配列の内容を初期化し、 テクスチャバッファを初期状態に再設定する。 -
MCB構造体は、 テクスチャバッファの管理に用いられる構造体であり、 常に 128個のィ ンスタンスを持つ MCB構造体配列を形成する。 MCB構造体配列は、 メイン RAM 25上に 配置され、 MCB構造 列の先頭アドレスは、 後述の RPU制御レジスタ 「MCB Ar r ay Ba s e Add r e s s」 で指し示される。 MCB構造体配列は、 8個のボス MCB 構造体インスタンスと、 120個の一般 MCB構造体インスタンスと、 カゝら構成される。 どち らの構造体インスタンスも、 64ビット (=8バイ ト) で構成される。 以下では、 ボス MCB 構造体ィンスタンスと一般 MC B構造体ィンスタンスとを区別して説明する必要がなレ、ときは、 単に 「MCB構造体インスタンス」 と呼ぶ。
図 25 (a) は、 ボス MCB構造体の構成を示す図、 図 25 (b) は、 一般 MCB構造体の 構成を示す図である。 図 25 (a) を参照して、 ボス MCB構造体は、 メンバ 「Bwd」, 「F wdj, 「En t r y」及び「T a p」 を含む。 図 25 (b) を参照して、一般 MCB構造体は、 メンバ 「Bwd」, 「Fwd」, 「U s e r」, 「S ι z e」, 「Ad d r e s s」 及ぴ 「Ta g」 を 含む。
まず、 双方に共通するメンバから説明する。 メンバ 「: Bwd」 は、 ボス MCB構造体インス タンスのチェーン (後述の図 33参照) における、 後ろ方向のリンクを示す。 メンバ 「Bwd」 には、 MCB構造体インスタンスを指し示すインデックス (7ビット) が 内される。 メンバ 「Fwd」 は、 ボス MCB構造体インスタンスのチェーンにおける、 前方向のリンクを示す。 メンバ 「Fwd」 には、 MCB構造体インスタンスを指し示すインデックス (7ビット) が格 納される。
次に、 ボス MCB構造体に固有のメンバについて説明する。 メンバ 「En t r y」 は、 当該 ボス MC B構造体ィンスタンスのチェーンに含まれる一般 MC B構造体ィンスタンスの数を示 す。 メンバ 「Ta p」 には、 当該ボス MCB構造体インスタンスのチェーンに含まれる、 最も 新しく解放された一般 MCB構造体インスタンスを指し示すインデックス (7ビット) 力 される。
次に、 一般 MCB構造体に固有のメンバについて説明する。 メンバ 「Us e r」 は、 当該一 般 MC B構造体ィンスタンスが管理するテクスチャバッファ領域を共有しているポリゴン構造 体インスタンス/スプライト構造体インスタンスの数を示す。 但し、 複数のスプライト構造体 インスタンスがテクスチャバッファ領域を共有することはないため、 スプライト構造体インス タンスのテクスチャバッファ領域を管理している^、 この値の最大値は 「1」 となる。 メンバ 「S 1 z ej は、 当該一般 MCB構造体インスタンスが管理するテクスチャバッファ 領域のサイズを示す。 テクスチャバッファ領域は、 8バイト単位で管理され、 実際の領域の大 きさ (バイト数) は、 メンバ 「S i z e」 が示す数値に 「8」 を掛けたィ直となる。 メンバ 「A dd r e s s」 は、 当該一般 MCB構造体インスタンスが管理するテクスチャバッファ領域の 先頭アドレスを示す。 但し、 このメンバに格納されるのは、 メイン RAM 25の物理アドレス の第 3ビットから第 15ビット (A [15 · 3] の 13ビット) である。 メンバ 「T a g」 は、 当該一般 MC B構造体ィンスタンスが管理するテクスチヤバッファ領域に鶴内されているテク スチヤパターンデータを指定するメンバ 「T s e gmen ts の値が欄される。 メンバ 「T s e gme n t」 は、 テクスチャマッピングモードのポリゴン構造体、 およびスプライト構造 体のメンバである (図, 3及び図 6参照)。 ,
図 26は、 ボス MCB構造体インスタンスが管理するテクスチャバッファ領域のサイズの説 明図である。 図 26に示すように、 8個のボス MCB構造体インスタンス [0] 〜 [7] は、 それぞれ異なるサイズのテクスチャバッファ領域を管理する。 この図によって、 どのサイズの テクスチャバッファ領域が、 どのボス MCB構造体インスタンスの管理下となるかが でき る。
図 27は、 ボス MCB構造体インスタンス [0] 〜 [7] の初期値を示す図である。 □ 内の 数字は、 ボス MCB構造体インスタンスのインデックスである。 図 2,8は、 一般 MCB構造体 インスタンス [8] 〜 [127] の初期値を示す図である。 なお、 口 内の数字は、 一般 MCB 構造体ィンスタンスのインデッ'クスである。
図 2の MCBィ -シャライザ 141は、 MCB構造体配列の內容を、 図 27および図 28に 記載されている値に初期化する。 初期値は、 それぞれの MCB構造体インスタンスによって異 なる。
図 27 (a) は、 ボス MCB構造体インスタンス [0] 〜 [6] の初期値を表している。 こ れらのボス MCB構造体インスタンスは、 初期状態においては、 管理下のテクスチャバッファ 領域が全く無く、 チェーンを形成する他の一般 MCB構造体インスタンスの個数が 「0」 であ るため、 メンバ 「Bwd」, 「Fwd」, 及ぴ 「Ta p」 は、 いずれも自分自身を指し示すインデ ックスを格納し、 メンバ 「En t r y」 の値は 「0」 を示す。
図 27 (b) は、 ボス MCB構造体インスタンス [7] の初期値を表す。 ボス MCB構造体 インスタンス [7] は、 初期状態においては、 テクスチャバッファとして割り当てられた^ 1 域を管理する。 実際には、 域を一括して管理する一般 MCB構造体インスタンス [8] と チェーンを形成している。 従って、 メンバ 「: Bwd」, 「Fwd」 及び 「Ta p」 の値は、 いず れも 「8」 を示し、 メンバ 「En t r y」 の値は、 「1」 を示す。
図 28 (a) は、 一般 MCB構造体インスタンス [8] の初期値を表す。 一般 MCB構造体 インスタンス [8] は、 初期状態においては、 テクスチャバッファの^ S域を管理している。 したがって、 メンバ 「S 1 z e」 は、 RPU制御レジスタ 「Te x t ur e - Bu f f e r S i z e」 に設定されているテクスチャバッファの全体サイズを示し、 メンバ 「Ad d r e s s」 は、 R PU制御レジスタ 「Tex t u r e Bu f f e r Ba s e Add r e s s」 に設 定されているテクスチャバッファの先頭ァドレスを示す。
但し、 テクスチャバッファのサイズは 8バイト単位で設定されるため、 メンバ 「S 1 z e」 の値に 「8」 を掛けた値が実際のテクスチャバッファの全体サイズを表す。 また、 メンバ 「A d d r e s s」 の値は、 メイン RAM25の物理ァドレスの第 3ビットから第 15ビット (A [15 : 3]) の計 13ビットのみを表している。
一般 MCB構造体インスタンス [8] は、 初期状態においては、 ボス MCB構造体インスタ ンス [7]のチェーンに含まれる唯一の一般 MCB構造体インスタンスであるため、 メンバ 「B wd」 及び 「Fwd」 の値は、 ともに 「7」 を示す。 また、 初期状態では、 一般 MCB構造体 インスタンス [8] を共有するポリゴン /スプライトは存在しないため、 メンバ 「Us e r」 及び 「Ta g」 の値は、 「0」 を示す。
図 28 (b) は、 一般 MCB構造体インスタンス [9]〜 [126] の初期値を表す。 一般 MCB構造体インスタンス [9] 以降の全ての一般 MCB構造体インスタンスは、 初期状態に おいては、 フリーの一! ¾MCB構造体インスタンスとして設定され、 ボス MCB構造体インス タンスのチェーンには組み込まれていなレ、。 フリーの一般 MCB構造体インスタンスのチェ一 ンは、 メンバ 「Fwd」 が次の一般 MCB構造体インスタンスを指し示す形でリンクされてお り、 ボス MCB構造体インスタンスのチェーンのようにリング状の閉じたリンクにはなってい なレヽ。 したがって、一 ^MCB構造体インスタンス [9] 〜 [126] のメンバ 「Fwd」 に は、 「自身のインデックス +1」 を示す値が設定され、 他のメンバ 「Bwd」, 「Us e r」, 「S i z e」, 「Ad d r e s s」 および 「T a g」 には全て 「0」 が設定される。
図 28 (c) は、一^ MCB構造体インスタンス [127] の初期値を表す。 一般 MCB構 造体インスタンス [127] は、 初期状態においては、 フリーの一般 MCB構造体インスタン スのチェーンの終端として設定され、 ボス MCB構造体インスタンスのチェーンに ¾且み込ま れていない。 したがって、一^ MCB構造体インスタンス [127]のメンバ「Fwd」 には、 「0」 力 S設定され、 フリーの一般 MCB構造体インスタンスのチェーンの終端であることを示 す。 他のメンバ 「Bwd」, 「U s e r」, 「S 1 z e」, 「Ad d r e s s」 およぴ 「T a g」 に も全て 「0」 力 S設定される。
図 29は、 図 2のメモリマネージャ 140に関する RPU制御レジスタの一覧図である。 図 29に示す全ての RPU制御レジスタは、 RPU9内に設けられる。
図 29 (a) に示す RPU制御レジスタ 「MCB Ar r ay Ba s e Add r e s sJ は、 メモリマネージャ 140が使用する MCB構造体配列のベースァドレスをメイン RAM2 5の物理ァドレスで指定する。 このレジスタへの設定については、 全 16ビットの設定が可能 であるが、 MCB構造俩己列のベースアドレスは、 ワードァライン (4バイトァライン) に従 つて設定される必要がある。 なお、 例えば、 このレジスタは、 I/Oバスアドレス 「0xFF FFE624」 に配置される。
図 29 (b) に示す RPU制御レジスタ 「MCB Re s ou r c e」 は、 初期設定時にお ける、 フリ一の一般 MC B構造体ィンスタンスのチェーンの先頭 MC B構造体ィンスタンスを 指し示すィンデックスを設定する。 なお、 例えば、 このレジスタは、 I /Oバスアドレス 「0 xFFFFE 626」 に配置される。
図 29 (c) に示す RPU制御レジスタ 「MCB I n i t i a l i z e r I n t e r v a 1」 は、 MCBィニシャライザ 141が行う MCB構造体配列の初期化処理の周期を設定す る。 この初期化周期は、 クロックサイクル単位で設定される。 例えば、 4クロックサイクルご とに初期化を行うように設定する。 なお、 例えば、 このレジスタは、 IZOバスアドレス 「0 XFFFFE62D」 に配置される。
図 29 (d) に示す RPU制御レジスタ 「MCB I n i t i a l i z e r Ena b l eJ は、 MCBィニシャライザ 141の有効/無効を制御する。 このレジスタに 「1」 力 S設定され ると、 MCBィニシャライザ 141は 化され、 「0」 で無劍匕される。 なお、 例えば、 この レジスタは、 I/Oバスアドレス 「0xFFFFE62C」 に配置される。
図 29 (e) に示す RPU制御レジスタ 「T e x t u r e Bu f f e r S i z e」 は、 テクスチャバッファの全体サイズを設定する。 なお、 例えば、 このレジスタは、 I/Oバスァ ドレス 「0xFFFFE62A」 に酉己置される。
図 29 (f ) に示す RPU制御レジスタ 「Te X t u r e Bu f f e r Ba s e Ad d r e s sj は、 テクスチャバッファの先頭アドレスを設定する。 なお、 例えば、 このレジス タは、 I/Oバスァドレス 「0xFFFFE628」 に配置される。
図 30及び図 31は、テクスチャバッファ領域取得処理の流れを示すフローチャートである。 図 30を参照して、メモリマネージャ 140は、マージソータ 106から出力されるメンバ「T s e gme n t」 の値を入力引数 「t a gj とし、 テクスチャパターンデータ全体のサイズ情 報を入力引数 「s i z e」 として、 以下の処理を実行する。
まず、 ステップ S 1にて、 メモリマネージャ 140は、 引数 「s 1 z e」 に対応するボス M C B構造体ィンスタンスを特定し (図 26参照)、 特定したボス M C B構造体ィンスタンスのィ ンデッタスを変数 「b o s s」 に格納する。 ステップ S 2にて、 メモリマネージャ 140は、 変数 「b o s s」 が指し示すボス MCB構造体インスタンスのチェーンに、 メンバ 「Ta g」 の値が引数 「t a g」 に一致する一般 MCB構造体インスタンス (ステップ S 4〜S 6におい て 「検出 MCB構造体インスタンス」 と呼ぶ。) が ΐ½する力 かをチェックする。 そして、 存 在する^は、 図 31のステップ S 4に進み、 しない^^は、 ステップ S 7に進む (ステ ップ S3)。
ステップ S3で、 「Ye s」 が判断された後、 図 31のステップ S 4では、 メモリマネージャ 140は、 ステップ S 1で特定したボス MCB構造体インスタンスのチェーンから、 検出 MC B構造体インスタンスを削除する。 ステップ1 S 5にて、 メモリマネージャ 140は、 検出 MC B構造体インスタンスのメンバ 「S i z e」 に対応するボス MCB構造体インスタンスと (図 26参照)、 当該ボス MCB構造体インスタンスのメンバ 「Fwd」 が 指し示す一^ MCB 構造体ィンスタンスと、の間に検出 MCB構造体インスタンスを挿入する。ステップ S 6にて、 メモリマネージャ 140は、 検出 MCB構造体インスタンスのメンバ 「Us e r」 の値をイン クリメントする。 以上により、 テクスチャバッファ領域の取得が成功した (正常終了)。 この場 合、 メモリマネージャ 140は、 検出 MCB構造体インスタンスを指し示すインデックスを返 り値 「mc b」 とし、 テクスチャキャッシュブロック 126に出力するとともに、 既にテクス チヤバッファ領域を取得済みであることを示す 「1」 を設定した返り値 「f 1 a g」 をテクス チヤキャッシュブロック 126に出力する。
一方、 図 30のステップ S3で、 「No」 が判断された後、 ステップ S 7では、 メモリマネー ジャ 140は、 変数 「b o s s」 が指し示すボス MCB構造体インスタンスのチェーンに、 メ ンバ 「S 1 z e」 の値が引数「s i z e」 以上であり、 力、つ、 メンバ 「U s e r」 の値が 「0」 である一般 MC B構造体ィンスタンス (以降の処理にぉレ、て「検出 MC B構造体ィンスタンス」 と呼ぶ。)が する力 かをチェックする。そして、 する は、ステップ S 11に進み、 存在しなレヽ ^は、 ステップ S 9に進む (ステップ S 8)。
ステップ S 8で、 「Νο」 力 S判断された後、 ステップ S 9では、 メモリマネージャ 140は、 変数 「b o s s」 をインクリメントする。 ステップ S 10にて、 メモリマネージャ 140は、 変数 「b o s s」 =8力 かを判断し、 「Ye s」 の ^&はステップ S 7に戻る。 一方、 「NoJ の は、 テクスチャバッファ領域の取得に失敗したことになり (エラー終了)、 メモリマネー ジャ 140は、 その旨を示す値を設定した返り値 「mc b」 をテクスチャキャッシュブロック 126に返す。
一方、 ステップ S 8で、 「Ye s」 が判断された後、 ステップ S 11では、 メモリマネージャ 140は、 検出 MCB構造体インスタンスのメンバ 「S 1 z e」 が引数 「s i z e」 と等しい 力 かを判断する。 そして、 「No」 の場合はステップ S 12に進み、 「Ye s」 の場合はステ ップ S 18に進む。
ステップ S 11で 「No」 が判断された後、 ステップ S 12にて、 メモリマネージャ 140 は、 R P U制御レジスタ 「MC B R e s o u r c e」 が指し示す一般 MC B構造体ィンスタ ンスのメンバ 「Fwd」 をチェックする。 メンバ 「Fwd」 =0の^はステップ S 17に進 み、 メンバ 「Fwd」 力 S 「0」 以外の;^はステップ S 14に進む (ステップ S 13)。 ステップ S 13で 「No」 が判断された後、 ステップ S 14にて、 メモリマネージャ 140 は、 RPU制御レジスタ 「MCB Re s ou r c e」 が指し示す一般 MC B構造体インスタ ンス (つまり、 フリーの一般 MCB構造体インスタンス) を取得し、 フリーの当該一般 MCB 構造体インスタンスのメンバ 「Fwd」 の値を、 RPU制御レジスタ 「MCB Re s our c e」 に設定する。 つまり、 ステップ S 14では、 引数 「s i z e」 と一 ¾"Tるメンバ 「S i z e」 を持つ検出 MCB構造体インスタンスが検出されなカゝつた^^、 すなわち、 引数 「s i z e」 より大きな値のメンバ 「S 1 z e」 を持つ検出 MC B構造体インスタンスが検出された フリ一の一般 MC B構造体ィンスタンスのチェーンから先頭の一^MC B構造体ィンス タンスを取得する。
ステップ S 15にて、 メモリマネージャ 140は、 検出 MCB構造体インスタンスのメンバ 「Ad d r e s s」 に引数 「s ι z e」 を加算した値を、 フリ一の当該一般 MC B構造体イン スタンスのメンバ 「Add r e s s」 に設定し、 検出 MC B構造体インスタンスのメンバ 「S i z e」 から引数 「s i z e」 'を した値を、 フリーの当該一般 MCB構造体インスタンス のメンバ 「S 1 z e」 に設定する。 つまり、 ステップ S 15では、 検出 MCB構造体インスタ ンスが管理している領域のうち、 引数 「s 1 Z e」 が示す分の領域を差し引いた領域を分割し て、 取得したフリ一の一般 M C B構造体ィンスタンスに割り当てる。
ステップ S 16にて、 メモリマネージャ 140は、 フリーの当該一般 MCB構造体インスタ ンスのメンバ 「S i z e」 に対応するボス MCB構造体インスタンスを特定し (図 26参照)、 特定したボス MCB構造体インスタンスと、 当該ボス MCB構造体インスタンスのメンバ 「B wd」 が現在指し示す一般 MCB構造体インスタンスと、 の間にフリーの当該一般 MCB構造 体インスタンスを挿入し、 特定したボス MCB構造体インスタンスのメンバ 「En t r y」 の 値をインクリメントする。 つまり、 ステップ S 16では、 フリーの一般 MCB構造体インスタ ンスは、 ステップ S I 5で割り当てられた領域のサイズに対応するボス MC B構造体インスタ ンスのチェーンに、 最後尾の一般 MC B構造体インスタンスとして新たに組み込まれる。 ステップ S 1 6の後、 あるいは、 ステップ S 1 3で 「Y e s」 が判断された後、 ステップ S 1 7にて、 メモリマネージャ 1 4 0は、 メンバ 「S i z e」 〉引数 「s i z e」 である検出 M C B構造体インスタンスのメンバ 「S i z e」 に引数 「s i z e」 を代入する。 つまり、 ステ ップ S 1 7では、 検出 MC B構造体インスタンスのメンバ 「S 1 z e」 は、 引数 「s 1 z e」 の値に書き換えられる。 - ステップ S 1 7の後、 あるいは、 ステップ S 1 1で 「Y e s」 と判断された後、 ステップ S 1 8にて、 メモリマネージャ 1 4 0は、 検出 MC B構造体ィンスタンスのボス MC B構造体ィ ンスタンスのメンバ 「E n t r y」 をデクリメントする。 ステップ S 1 9にて、 メモリマネー ジャ 1 4 0は、 検出 MC B構造体インスタンスのメンバ 「T a g」 に引数 「t a g」 を代入す る。 ステップ S 2 0にて、 メモリマネージャ 1 4 0は、 検出 MC B構造体インスタンスをチェ ーンから削!^る。 '
ステップ S 2 1にて、 メモリマネージャ 1 4 0は、 検出 MC B構造体インスタンスのメンバ 「 S 1 z e」 に対応するボス MC B構造体ィンスタンスを特定し (図 2 6参照)、 特定したボス MC B構造体インスタンスと、 当該ボス MC B構造体インスタンスのメンバ 「F w d」 が現在 指し示す一般 MC B構造体ィンスタンスと、 の間に検出 MC B構造体ィンスタンスを挿入する。 ステップ S 2 2にて、 メモリマネージャ 1 4 0は、検出 MC B構造体インスタンスのメンバ「U s e r」 の値をィンクリメントする。
つまり、 ステップ S 1 8〜S 2 2では、 検出 MC B構造体インスタンスは、 現在リンクされ ているボス MC B構造体インスタンスのチェーンから削除され、 新たなメンバ 「S i z e」 に 対応するボス MC B構造体ィンスタンスのチェーンに、 最前の一般 MC B構造体ィンスタンス として新たに組み込まれる。 '
以上により、 テクスチャバッファ領域の取得が成功した (正常終了)。 この場合、 メモリマネ ージャ 1 4 0は、 検出 MC B構造体ィンスタンスを指し示すィンデックスを返り値 「m c b」 とし、 テクスチャキャッシュブロック 1 2 6に出力するとともに、 新規にテクスチャバッファ 領域を取得したことを示す 「0」 を設定した返り値 「f 1 a g」 をテクスチャキャッシュブロ ック 1 2 6に出力する。 また、 この場合、 メモリマネージャは、 DMACインタフェース 1 4 2を介して DMAC 4に DMA を要求し、 新たに確保されたテクスチャバッファ領域に、 外部メモリ 5 0からテクスチャパターンデータを一括して する。 但し、 これはポリゴンの であり、 スプライトの は、 確保された領域に描画の進行に応じて順次テクスチャバタ —ンデータを する。 ここで、 ステップ S 2の補足説明を行う。 ステップ S 2の処理は、 ポリゴン用のテクスチャ バッファ領域を確保する際にのみ行われ、 スプライト用には行われなレヽ。 従って、 スプライト 用にテクスチャバッファ領域を確保する際には、 ステップ S 2及び S 3はスキップされ、 必ず ステップ S 7に進むことになる。
なぜなら、 ポリゴン用には、 テクスチャパターンデータ全体を格納可能なサイズを確保する ため、 複数のポリゴンが 1つのテクスチャバッファ領域を共有することが可能であるが、 スプ ライト用には、 テクスチャパターンデータの 4水平ライン分のみ TO可能なサイズを確保する ため、 複数のスプライ卜が 1つのテクスチャバッファ領域を共有することができないためであ る。
ステップ S 3で 「Y e s」 が判断された後の処理の終端では (図 3 1参照)、 返り値 「f 1 a g」 の値が 「1」 を示している。 これは、 複数のポリゴンが 1つのテクスチャバッファ領域を 共有している (つまり、 既にテクスチャパターンデータがテクスチャバッファ領域に読み込ま れている) ため、 新たに DMA^¾を要求してテクスチャパターンデータを読み込む必要がな いことを示している。 ,
次に、ステップ S 7〜S 1 0の補足説明を行う。ボス MC B構造体インスタンス [ 0 ]〜 [ 7 ] は、 テクスチャバッファ領域の大きさごとに分かれており (図 2 6参照)、 ボス MC B構造体ィ ンスタンスのィンデッタスが大きくなるにつれ、 より大きなサイズのテクスチャバッファ領域 を管理している。 したがって、 ステップ S 7 ~ S 1 0を経てステップ S 7へのループは、 必要 なテクスチャバッファ領域のサイズに対応するボス MC B構造体ィンスタンスのチェーンに適 当な一般 MC B構造体インスタンスが存在しない場合に、 よりインデックスの大きなボス MC B構造体インスタンスのチェーンを順次検索することを表している。 ,但し、 最終のボス MC B 構造体インスタンスであるボス MC B構造体インスタンス [ 7 ] のチェーンまで検索しても適 当な一般 MC B構造体ィンスタンスを検出できなレヽ場合、 テクスチャバッファ領域の取得が失 敗したとしてエラー終了する。 この^、 このテクスチャバッファ領域を要求したポリゴン/ スプライトには、 描画処理において不当なテクスチャパターンデータがマッピングされてしま ラ。
さて、 メモリマネージャ 1 4 0は、 確保されたテクスチャバッファ領域を删するポリゴン スプライトの描画が完了すると、 確保していたテクスチャバッファ領域を解放し、 他のテク スチヤパターンデータの格納のために再利用できるようする。 このようなテクスチャバッファ 領域解放処理について説明する。
図 3 2は、 テクスチャバッファ領 ^理の流れを示すフローチャートである。 テクスチ ャバッファ領域解 理にあたって、 テクスチャキャッシュブロック 1 2 6から、 描画完了ポ リゴン/描画完了スプライトカ S使用していたテクスチャバッファ領域を管理していた一般 MC B構造体インスタンスのインデックスがメモリマネージャ 140に出力される。 メモリマネー ジャ 140は、 このインデックスを入力引数 「mc bj として、 テクスチャバッファ領 军放 処理を実行する。
ステップ S31にて、 メモリマネージャ 140は、 引数 「mc b」 が指し示す一般 MCB構 造体インスタンス (以降の処理において、 「解放 MCB構造体インスタンス」 と呼ぶ。) のメン ノ 「Us e r」 をデクリメントする。 ステップ S32にて、 メモリマネージャ 140は、 デク リメント後のメンバ 「Us e r」 の値が 「0」 力 かを判断し、 「Ye s」 の^ステップ S 3 3に進み、 「No」 の テクスチャバッファ解放処理を終了する。
つまり、 テクスチャバッファ領域が 2以上のポリゴンに されていた^、 ¾½Κ:Β構 造体インスタンスのメンバ 「Us e r」 の値が 1つ減らされるだけで、 実際の解放処理は行わ れない。 1つのポリゴン Zスプライトに用いられていたテクスチャバッファ領域 (デクリメン ト前のメンバ 「Us e r」 =1) が解放されたとき、 実際の解放処理が行われる。
ステップ S32で 「Ye s」 が判断された後、 ステップ S33にて、 メモリマネージャ 14 0は、 解放 MCB構造体インスタンスを、 解放 MCB構造体インスタンスを含むチェーンから 削除する。 ステップ S34にて、 メモリマネージャ 140は、 解放 MCB構造体インスタンス のメンバ 「S i z e」 に対応するボス MCB構造体インスタンスを特定し (図 26参照)、 特定 したボス MC B構造体ィンスタンスのメンバ 「T a p」 が現在指し示す一般 MC B構造体ィン スタンス (以降の処理において、 「タツ: ^MCB構造体インスタンス」 と呼ぶ。) と、 タツ:^ M CB構造体インスタンスのメンバ 「Bwd」 が指し示す MCB構造体インスタンスと、 の間に M M B構造体ィンスタンスを挿入する。
ステップ S35にて、 メモリマネージャ 140は、 解放 MCB構造体インスタンスのメンバ 「S i z e」 に対応するボス MCB構造体インスタンスのメンバ 「Ta p」 に引数 「mc b」 を挿入し、 かつ、 メンバ 「En t r y」 をインクリメントし、 テクスチャバッファ解放処理を 終了する。
図 33は、 ボス MCB構造体インスタンスのチェーンの構造と、 ボス MCB構造体インスタ ンスのチェーンに一般 MC B構造体ィンスタンス力 S新たに挿入される ^の ¾L念と、 を示す図 である。 図 33 (a) 及び図 33 (b) には、 ボス MCB構造体インスタンス B S→—般 MC B構造体ィンスタンス林 A→—般 MC B構造体ィンスタンス # 8→ボス1^じ B構造体ィンスタ ンス BSというように、 閉じたリング状にリンクされているボス MCB構造体インスタンス B Sのチェーンに、 最前の一般 MC B構造体ィンスタンスとして新たに一般 MC B構造体ィンス タンス#〇を挿入する例が示されている。 図 33 (a) は挿入前、 図 33 (b) は挿入後を示 す。
この例では、 メモリマネージャ 140は、 一般 MCB構造体インスタンス # Aを指し示して いたボス MCB構造体インスタンス BSのメンバ 「Fwd」 を、 一般 MCB構造体インスタン ス # Cを指し示すように書き換え、 ボス MC B構造体ィンスタンス B Sを指し示してレヽた一般 MCB構造体インスタンス # Aのメンバ 「Bwd」 を、 一般 MCB構造体インスタンス #Cを 指し示すように書き換える。 また、 メモリマネージャ 140は、 新たにチェーンに挿入される 一般 MCB構造体インスタンス #Cのメンバ 「Fwd」 を、 一般 MCB構造体インスタンス # Aを指し示すように、 メンバ 「Bwd」 を、 ボス MCB構造体インスタンス BSを指し示すよ うに書き換える。
逆に、 図 33 (b) に示すボス MCB構造体インスタンス BSのチェーンから、 一般 MCB 構造体ィンスタンス # Cを削除する場合は、 挿入する場合とは逆の処理が行われる。
さて、 以上のように、 本実施の形態によれば、 テクスチャデータを毎回外部メモリ 50から 読み出すのではなく、 読み出したテクスチャデータをメイン RAM25上のテクスチャバッフ ァに一時的に保持しておくことにより、 テクスチャデータが再利用される に、 無駄な外部 メモリ 50へのアクセスを避けることができる。 また、 メイン RAM25上のテクスチャバッ ファを必要とされるサイズに領域分割し、 領域の確保と解放とを動的に行うことで、 テクスチ ャバッファの使用効率が高まり、 テクスチャバッファのためのハードウェアリソースが過剰に 大きくなることを防ぐことができる。
また、 本実施の形態では、 グラフィック要素 (ポリゴン及びスプライト) の描画力 S水平ライ ン単位で順次的に行われるので、 スプライトにマッピングされるテクスチャデータは描画処理 の進行に応じてテクスチャデータの水平ライン単位で外部メモリ 50カゝら読み出せばよいため、 テクスチャバッファに確保する領域のサイズを抑えることができる。 一方、 ポリゴンにマツピ ングされるテクスチャデータはく テクスチャデータ上のどの部分のデータが必要になるかを事 前に予測することは難しレ、ため、 テクスチヤデータ全体を Wl可能なサイズの領域をテクスチ ヤノ ッファに確保する。
さらに、 本実施の形態では、 MCB構造体インスタンスを用いてテクスチャバッファの各領 域を管理することで、 領域の確保 ·解放のための処理が簡便になる。
さらに、 本実施の形態では、 複数のボス MCB構造体インスタンスは、 管理する領域のサイ ズに応じて複数のグループに分けられ、 グノ^プ内の MC B構造体ィンスタンスは、 リング状 に互いがリンクされている (図 26及ぴ図 33参照)。 このため、 MCB構造体インスタンス、 ひいてはテクスチャバッファの各領域の検索を容易に行うことができる。
さらに、 本実施の形態では、 MCBィニシャライザ 141力 全ての MCB構造体インスタ ンスを初期値に設定することにより、 テクスチャバッファの領域のフラグメンテーションを解 消できる。 フラグメンテーションを解消する手段としては、 一般的なガーベージコレクシヨン より小さい回路規模で達成できるだけでなく、 処理時間も短い。 また、 グラフィック要素 (ポ リゴン及びスプライト) の描画のための処理であるため、 1ビデオフレームまたは 1フィール ドの描画が完了する毎にテクスチヤバッファの全体を初期化するようにすれば、 描画処理上全 く問題がない。
さらに、 本実施の形態では、 MC Bィ -シャライザ 1 4 1が MC B構造体インスタンスを初 期値に設定するために MC B構造体ィンスタンスにアクセスする間隔を設定する R P U制御レ ジスタ 「MC B I n i t i a l i z e r I n t e r v a 1」 を備えている。 C P U 5がこ の R P U制御レジスタにアクセスして、 MC Bィニシャライザ 1 4 1が MC B構造体インスタ ンスにアクセスする間隔を自由に設定することで、 システム全体のパフォーマンスの低下を引 き起こすことなく、 初期化処理を紫亍できる。 なお、 MC B構造俩己列を のメイン RAM 2 5上に設ける ^には、 MC Bィニシャライザ 1 4 1からのアクセスが時間的に集中して行 われると、他の機能ュニットからのメイン RAM 2 5へのアクセスのレイテンシが大きくなり、 システム全体のパフォーマンスを低下させる恐れがある。
さらに、 本実施の形態では、 テクスチャバッファは、 R P U 9や他の機能ュニットが共有す るメイン RAM 2 5上に、 任意の位 g¾びサイズで構成可能である。 このように、 テクスチャ ノ ッファを、 *^のメィン尺八]^12 5上に位 g¾びサイズとも自由に設定可能とすることで、 必要とされるテクスチャバッファ領域が少なレヽ: ^には、 ^IJの領域を他の機能ュニットが用 いることが可能になる。
なお、 本発明は、 上記の実施の形態に限られるものではなく、 その要旨を«しなレヽ範囲で 種々の態様にぉレ、て実施することが可能であり、 例えば、 以下のような変形も可能である。
( 1 ) 上記では、 力ラーブレンダ 1 3 2による半透明合成を行っているため、 各ラインにお レ、て、 グラフィック要素 (ポリゴン、 スプライト) は、 デプス値が大きいものから先に描画し た。 しカゝし、 半透明合成を行わない は、 デプス値が小さいものから描画することが好まし レ、。 なぜなら、 デプス値が小さい、 より手前に表示されるべきグラフィック要素から先に描画 することにより、 描画能力や 1ラインに描画するグラフィック要素の数が多すぎる等の理由に より、 仮に、 1ラインに描画すべき全てのグラフィック要素の描画が、 表示までに間に合わな 力つた でも、 デプス値が大きい、 より奥に表示されるべきグラフィック要素から先に描画 する^と比較して、 表示後の見た目の印象が良くなるからである。 また、 デプス値が小さい グラフィック要素から描画することにより、 より奥に表示されるべきグラフィック要素にっレヽ ては、 既に描画されたグラフィック要素と重なる部分については、 描画が不要であるため、 処 理の高速ィ匕を図ることができるからである。
(2) 上記では、 描画のため、 スクリーンの 1ライン分のデータを^内可能なラインバッフ ァ LB1, LB 2を RPU9内に設けた。 ただし、 1ライン分より少ないピクセル数分のデー タを格納する 2つのピクセルバッファを RPU9内に設けることもできる。 また、 K (Kは 2 以上の整数) ライン分のデータを格納可能な 2つのバッファを RPU 9内に設けることもでき る。
( 3 ) 上記では、 R P U 9におレ、て、 ダブルバッファ; ^を採用したが、 -シングルバッファ 方式を採用することもできるし、 3以上のバッファを使用する; ^を採用することもできる。
(4) 上記では、 YSU19は、 1つのポリゴンインスタンスのソートが確定するたびに、 ノヽレス P PLを出力したが、 所定数のポリゴンインスタンスのソートが確定するたびに、 パル ス P PLを出力することもできる。 ノ、。ルス S PLについても同様である。
(5) 上記では、 表示色の指定に、 カラーパレットを用いる間接指定方式を採用したが、 直 接指定方式を採用することもできる。 '
(6) 上記では、 スライサ 118は、 ポリゴン/スプライト共通データ C Iのフラグフィー ノレドで、 入力されたデータがポリゴンを描画するためのもの力ゝスプライトを描画するためのも のかを判別する力 ポリゴン/スプライト共通データ C Iと同時に入力される構造体インスタ ンスの特定ビット (第 79ビット) で、 この判別を行うこともできる。
(7) 上記では、 ポリゴンを三角形としたが、 形状はこれに限定されない。 また、 スプライ トを四角形としたが、 形状はこれに限定されない。 さらに、 テクスチャの形状を三角形又は四 角形としたが、 テクスチャの形状もこれに限定されない。
(8)上記では、テクスチャを 2分割して したが、分割数はこれに限定されなレヽ。 また、 ポリゴンにマッピングするテクスチャを直角三角形としたが、 テクスチャの形状はこれに限定 されず任意の形状とすることができる。
( 9 ) 上記では、 メモリマネージャ 140によるテクスチャバッファ領域取得処理をハード ワイヤードロジックにより達成した。 しかし、 CPU 5によるソフトウェア処理でも達成は可 能であり、 その 、 上記ロジックが不要、 処理に柔軟性を持たせられるという利点がある。 ただし、 新時間が遅くなる、 CPU 5が高速な応答をしなければならないので、 プログラミ ング上の制限が多くなるとレ、つた欠点力 S発生する。 ハードワイヤードロジックで誠する は、 この欠点は発生しなレ、。
以上、 本発明を実施例により詳細に説明したが、 当餘にとっては、 本発明が; Φ®中に説明 した実施例に限定されるものではなレヽということは明らかである。 本発明は、 特許請求の範囲 の記載により定まる本発明の趣旨及び範囲を i«することなく修正及び変更態様として実施す ることができる。

Claims

請求の範囲
1 . 複数のグラフィック要素からなる、 i!Eスクリーンに表示される画像を生成する画像 生成装置であって、
ΐίίΙΞ複数のグラフィックス要素は、 二次元空間に投影された三次元立体の各面の形状を表す ための多角形状のグラフィック要素およひ 己スクリーンの枠に平行な矩形状のグラフィック 要素の任意の組み合わせからなり、 - 婦己多角形状のダラフィック要素を «するための第 1の表示情報を、 所定形式のデータに 変換する第 1のデータ変換手段と、
ilE矩形状のグラフィック要素を生成するための第 2の表示情報を、 廳己所定形式のデータ に変換する第 2のデータ変換手段と、
嫌己第 1のデータ変換手段および廳己第 2のデータ変換手段から受け取った tfJlB所定形式の データに基づいて、 ΐΕスクリーンに表示される f己画像を生成する画 i ^ ^手段と、 を備え る画像生成装置。
2. 第 1の二次元直 ¾ 標系は、 tiff己グラフィック要素の ffrfEスクリーンへの表示に用い られる二次元座標系であり、
第 2の二次元直 ¾]¾標系は、 tfjf己グラフィック要素にマッビングされる画像データが配置さ れる二次元座標系であり、
ΙίίΙΕ所定形式のデータは、 複数の頂点ブイールドを含み、
嫌己頂点フィールドはそれぞれ、 第 1フィーノレドと第 2フィールドとを含み、
廳第 1のデータ変換手段は、 tin己第 1の二次元直交座標系におけ,る編己多角形状のダラフ イツク要素の頂点の座標を嫌己第 1フィーノレドに»し、 かつ、 描画モードに応じた形式で前 記多角形状のダラフィック要素の頂点のパラメータを tin己第 2フィーノレドに格納し、 歸己第 2のデータ変鮮段は、 膽己第 1の二次元直 標系における編己矩形状のダラフィ ック要素の頂点の座標を鎌己第 1フィーノレドに欄し、 かつ、 嫌己第 1の二次元直 ¾¾標系に おける l己矩形状のダラフィック要素の頂点の座標を tilt己第 2の二次元直交座標系へ写像した 座標を firt己第 2フィーノレドに格納する、 請求項 1記載の画像生成装置。
3. 歸己第 2のデータ変換手段は、 嫌己第 2の表示情報に含まれる、 廳己第 1の二次元直 ¾^標系における 己矩形状のダラフィック要素の 1つの頂点の座標、 及ひ グラフィック 要素のサイズ情報に基づレ、て、 前記第 1の二次元直交座標系における他の 3つの頂点の一部ま たは全部の座標を算出し、 予め Ι ΙΞ第 2の表示情報に含まれる頂点の座標と算出された頂点の 座標とを廳己第 1フィールドに欄し、 力 、 予め^ IB第 2の表示情報に含まれる頂点の座標 と算出された頂点の座標とを藤己第 2の二次元直 ¾¾標系へ写像した座標を^^し、 生成され た嫌己第 2の二次元直 ¾H標系の座標を嫌己第 2フィーノレドに格 Ml "る、 請求項 2記載の画像 生成装置。
4. 爾己第 2のデータ変換手段は、 編己第 2の表示情報に含まれる、 嫌己第 1の二次元直 交座標系における前記矩形状のグラフィック要素の 1つの頂点の座標、 前記グラフィック要素 の錯率、 及ひ蕭己グラフィック要素のサイズ情報に基づレヽて、 編己第 1の二次元直魏標系 における他の 3つの頂点の一部または全部の座標を算出し、 予め前記第 2の表示情報に含まれ る頂点の座標と算出された頂点の座標とを fillS第 1フィーノレドに¾¾¾し、 カゝつ、 予め ΙίίΐΞ第 2 の表示情報に含まれる頂点の座標と算出された頂点の座標とを fit己第 2の二次元直 ¾¾標系へ 写像した座標を し、 生成された編己第 2の二次元直 ¾¾標系の座標を 第 2フィーノレド に格納する、 請求項 2記載の画像生成装齓
5. 編己第 1のデータ変換手段は、 肅己第 1の表示情報に含まれる、 編己多角形状のダラ フィック要素の頂点の肅己第 1の二次元直 標系における座標を取得して前記第 1フィーノレ ドに格納し、 ,
嫌己描画モードがテクスチャマツビングでの描画を示している 、 藤己第 1のデータ変換 手段は、 廳己第 1の表示情報に含まれる、 ΙίΐΐΞ多角形状のグラフィック要素の頂点の廳第 2 の二次元直交座標系における座標を算出するための情報と遠近補正用パラメータとを取得し、 漏己第 2の二次元直 ¾標系における頂点の座標を算出して、 遠近補正を施し、 遠近補正後の 頂点の座標と ffrlE遠近補正用パラメータとを |ίϊ|Ξ第 2フィールドに格納し、
前記描画モードがグーローシエーディングでの描画を示している場合、 前記第 1のデータ変 換手段は、 fflt己第 1の表示情報に含まれる、 編己多角形状のグラフィック要素の頂点のカラー データを取得し、 取得したカラーデータを廳己第 2フィーノレドに鶴内する、 請求項 2記載の画 像生成装置。 '
6. l己所定形式のデータは、 当該データが tilt己多角形状のグラフィックス要素であるか ffJlE矩形状のグラフィックス要素であるかを示すフラダフィールドをさらに含み、
fiJlB第 1のデータ変換手段は、 tiHEフラグフィールドに当該データが鎌己多角形状のグラフ ィックス要素であることを示す情報を格納し、
ΙίίΐΞ第 2のデータ変換手段は、 前記フラグフィールドに当該データが Ι5矩形状のグラフィ ックス要素であることを示す情報を格納する、 請求項 2力 ら 5記載の画像生成装 Mo
7. tfjf己画^:成手段は、 fflt己スクリーンを構成するライン単位で、 所定のライン順序に 従って描画処理を行い、
廳己第 1のデータ変換手段は、 複数の編己第 1フィーノレドに含まれる頂点の座標の順が、 前 記所定のライン II醉におレヽて頂点が出現する順に一 ¾τΤるように、 ΙίίΙΕ頂点フィールドの内容 を入浦え、
爾己第 2のデータ変換手段は、 膨矩形状のグラフィック要素の頂点の座標の順が、 m 定のライン順序にぉレヽて頂点が出現する順に一 るように、 ΙίίΙΕ各頂点フィ一ノレドにデータ を格納する、 請求項 2から 6記載の画像生成装 go
8. 纏画像生成手段は、
HUB所定形式のデータを受け取って、 ffit己第 1フィーノレドに格納された頂点の座標に基づレヽ て、 tfilEスクリーンの描画 のラインと ffif己グラフィック要素の辺との 2つの交点の座標を 算出し、 その を算出して第 1のデータとし、 かつ、 第 2フィーノレドに ¾内された頂点 のパラメータに基づいて、 tilt己 2つの交点におけるパラメータを算出し、 その^を算出して 第 2のデータとし、 力 、 tiff己第 2のデータを flit己第 1のデータで除して fi!lH第 1の二次元座 標系における単 ^標当りの当該パラメータの変化量を求める交点算出手段を含む請求項 2記 載の画像生成装置。
9. 編己画像生成手段は、
mm, 1フィーノレドに格納された頂点の座標に基づレ、て、 編己スクリーンの描画 ^のライ ンと it己グラフィック要素の辺との 2つの交点の座標を算出し、 その^^を算出して第 1のデ →とする交点算出手段を含み、
受け取った ffjf己所定形式のデータに含まれる前記フラグフィールドが、 鎌己多角形状のダラ フィック要素であることを示 1~ ^、 廳己交点算出手段は、 藤己描画モードに応じて fillE第 2 ブイ一ノレドに格 された頂点のパラメータに基づいて、 ΙΞ 2つの交点におけるパラメータを 算出し、 その差分を算出して第 2のデータとし、
受け取った tin己所定形式のデータに含まれる廳己フラダフィ—ルドが、 tins矩形状のダラフ イツク要素であることを示 ΙίίΐΞ交点算出手段は、 廳己第 2フィールドに含まれる嫌己 第 2の二次元直 ¾!1標系における頂点の座標に基づレヽて、 ιίίΐΕ 2つの交点におけるパラメータ としての、 前記 2つの交点の前記第 2の二次元直交座標系における座標を算出し、 その差分を 算出して第 2のデータとし、
ffllE交点算出手段は、 前記第 2のデータを ΙΞ第 1のデータで除して前記第 1の二次元座標 系における単 fi 標当りの当該パラメータの変化量を求める、
Figure imgf000082_0001
1 0. 受け取つた 所定形式のデータに含まれる ffl!Bフラダフィールドが鎌己多角形状 グラフィック要素であることを示し、 かつ、 描画モードがテクスチャマッピングでの描画 であることを示して ヽる^ \ 編己交点算出手段は、 ΙίίΙ己第 2フィールドに欄されている遠 近補正後の頂点の座標と遠近補正用パラメータとに基づレ、て、 2つの交点の遠近補正後の 頂点の座標と遠近補正用パラメータとを算出し、 その 、を算出して tiff己第 2のデータとし、 受け取った Ι ΐΞ所定形式のデータに含まれる ffilEフラダフィ一ノレドが ffifS多角形状グラフィ ック要素であることを示し、 かつ、 flit己描画モードがグーローシエーディングでの描画である ことを示している 、 tiHB交点算出手段は、 嫌己第 2フィールドに格納されているカラーデ ータに基づいて、 lift己 2つの交点のカラーデータを算出し、 そのカラーデータの ^^を算出し て藤己第 2のデータとする、 請求項 9記載の画像生成装置。
1 1 . fB画像生成手段は、 - lift己交点算出手段により算出された、 前記第 1の二次元直交座標系の単位座標当たりの当該 パラメータの変化量を、 肅己 2つの交点のレヽずれか一方の嫌己パラメータに順 口えていき、 前記 2つの交点間の l己第 1の二次元直交座標系の各座標におけるパラメータを算出する加算 手段をさらに含む請求項 8記載の画像生成装置。
1 2 . 嫌己画像生成手段は、
嫌己矩形状のグラフィック要素に対して、 tfflB交点算出手段により算出された、 IB第 1の 二次元直 ¾¾標系の単ィ继標値当たりの嫌己第 2の二次元直魏標系の座標の変化量を、 編己 2つの交点のいずれ力—方の肅己第 2の二次元直 標系における座標に順 ¾WWえていき、 前 記 2つの交点間の前記第 1の二次元直交座標系の各座標における前記第 2の二次元直交座標系 の座標を算出する加算手段をさらに含み、
ΜΙΕ¾]算手段は、 ΙίίΐΞ描画モードがテクスチヤマツビングでの描画を示している漏己多角形 状のダラフィック要素に対して、 t lt己第 1の二次元直交座標系の単位座標値当たりの前記第 2 の二次元直 ¾¾標系における遠近補正後の頂点の座標と遠近補正用パラメータの変化量を、 前 記 2つの交点のレ、ずれ力一方の 己第 2の二次元直 ¾J¾標系における遠近補正後の頂点の座標 と遠近補正用パラメータに順 ¾fc¾えていき、 tiltS 2つの交点間の遠近補正後の頂点の座標と遠 近補正用パラメータを算出し、 '
^!¾)[]算手段は、 ΙίίΙΞ描画モードがグーローシエーディングでの描画を示している] ΙίίΙ己多角 形状のグラフィック要素に対して、 膽己交点算出手段により算出された、 it己第 1の二次元直
¾¾標系の単ィ 標当たりのカラーデータの変化量を、 tufS 2つの交点のいずれ力一方の力ラ 一データに順 ¾¾)Πえてレ、き、 ΙίίΙΒ 2つの交点間の IS第 1の二次元直 ¾¾標系の各座標におけ るカラーデータを算出する、 請求項 1 0記載の画像生成装置。
1 3 . 所定纖 IJに従って、 描画処理における廳己多角形状のグラフィック要素およひ ίίΐΞ 矩形状のダラフィック要素の描画優先順位を決定するマージソート手段をさらに備え、
tins第 1の表示情報は、 嫌己描画優先順位が高い順に予め第 1の配列に格納され、
llE第 2の表示情報は、 漏己描画優先順位が高レ、順に予め第 2の配列に格納され、 tilt己マージソート手段は、 tfrt己第 1の表示情報と tiiia第 2の表示情報との in己描画優先 ji面位 を比較し、
tiff己第 1の表示情報の 己描画優先順位が tfllB第 2の表示情報の tilt己描画優先順位より高レヽ ΙίίΙΕマージソート手段は、 tilt己第 1の配列から肅己第 1の表示情報を読み出し、 tins第 2の表示情報の tine描画優先順位が編己第 1の表示情報の ffif己描画優先順位より高レヽ ^, 嫌己マージソート手段は、 ttllB第 2の配列から漏己第 2の表示情報を読み出し、 脑マージソート手段は、 第 1の表示情報を読み出した は、 当該第 1の表示情報を 単一のデータ列として出力し、 tiff己第 2の表示情報を読み出した場合は、 当該第 2の表示情報 を廳己単一のデータ列として出力する、 請求項 1から 1 2記載の画像生成装
1 4. 所定のライン順序に従って行う描画処理にぉレ、て、 tinsグラフィック要素の複数の 頂点の前記第 1の二次元直交座標系における座標のうち、 前記所定のライン順序にぉレヽて最も 早く出現する頂点の座標を出現頂点座標としたときに、 嫌己所定顯 IJは、 鎌己出現頂点座標が tiff己所定のライン順序において早く出現する' tin己グラフィック要素の ffrlE描画優先順位が高く なるように定められる、 請求項 1 3記載の画像生成装 go
1 5 . lilf己マージソート手段は、 前記出現頂点座標が同じ値を示している場合、 前記第 1 の表示情報に含まれる表示深度情報と SilfE第 2の表示情報に含まれる表示深度情報と、 を比較 し、 より奥に描画される方の嫌己グラフィック要素の tiff己描画優feJ頃位が高いと判 ¾H "る、 請 求項 1 4記載の画像生成装置。
1 6 . fillEマージソート手段は、 腿己出現頂,確標が、 最初に描画するラインょり前に位 置する は、 当該出現頂点座標を最初に描画するラインに相当する座標に置き換えて、 l己 描画優先順位を決定する、 請求項 1 5記載の画像生成装置。 ,
1 7. tfif己マージソート手段は、ィンタレース表示力 S行われる^、 t f!E出現頂点座標が、 奇数フィールドぉよび癒フィールドのうちの表示 のフィールドで描画されなレ、ラインに 相当する^、そのラインの次のラインに相当する座標に当該出現頂点 標を置き換えて扱う、 請求項 1 6記載の画像生成装置。
1 8 . 多角形状のグラフィック要素にテクスチャをマッピングするテクスチャマッピング 装置であって、
嫌己テクスチャは複数の切片に分割され、 ΙΞテクスチャが グラフィックス要素にマツ ビングされる態様で配置される第 1の二次元テクセル空間において少なくとも 1つの嫌己切片 が回 動されて、 fin己切片の全てが、 isテクスチャがメモリに■される態様で配置 される第 2の二次元テクセル空間に配置され、
fif己第 2の二次元空間に配置される嫌己切片の全てが格納されている二次元配列から tiff己複 数の切片を読み出す読出手段と、
読み出された編己複数の切片を結合する結合手段と、
ffit己複数の切片を結合して得られた廳己テクスチャを肅己多角形状のダラフィック要素にマ ッビングするマツビング手段と、 を備えるテクスチャマツビング装置。
1 9. 前記多角形状のグラフィック要素は、 三角形状のグラフィック要素であり、 前記テクスチャは、 三角形状のテクスチャである、 請求項 1 8記載のテクスチャマッピング 装置。 -
2 0. 鎌己テクスチャは、 2つの MIS切片に分割され、 そのうちの 1つの tins切片が回転 及ひ 動されて、 鎌己 2つの切片が鎌己二次元配列に欄されている、 請求項 1 9記載のテク スチヤマッピング装置。
2 1 . tfjf己三角形状のテクスチヤは、 ti!E第 2の二次元テクセル空間の第 1座標軸に な辺と肅己第 1座標軸に直交する第 2座標軸に TOな辺とを有する直角三角形状のテクスチャ であり、 1
ΙίϊΙ己直角三角形状のテクスチャは、 前記第 1座標軸あるいは前記第 2座標軸のいずれかに平 行な S によって、 廳己 2つの切片に分割されており、
tiff己 1つの切片が 1 8 0度回 ひ移動されて、 tufS 2つの切片が廳己二次元配列に格納さ れている、 請求項 2 0記載のテクスチャマッピング装置。
2 2. 廳己テクスチャの嫌己二次元配列への ¾¾¾形態として、 第 1 形態及び第 2 TO 形態が用意されており、
廳己テクスチャは、 複数のテクセルからなり、
肅己第 1格納形態では、 編己第 2の二次元テクセル空間の第 1座標軸あるいは編己第 1座標 軸に直交する第 2座標軸のレ、ずれかに、 φίϊカっ一次元に並んだ第 1の所定数のテクセルを 1 単位とし、 その 1単位のテクセルがメモリの 1ヮードに^されるように、 tit己全ての切片が ΙίίΐΞ二次元配列に格納され、
前記第 2格納形態では、 前記第 2の二次元テクセル空間に二次元に並んだ第 2の所定数のテ クセノレを 1単位とし、 その 1単位のテクセルが tillEメモリの 1ワードに ¾¾¾されるように、 前 記全ての切片が tif 二次元配列に格納される、 請求項 1 8力ら 2 1記載のテタスチヤマツピン グ装置。
2 3. 前記テタスチヤの繰り替えしマツビングが行われる場合は、 前記分割並びに前記回 ^¾ひ 動なしに、 廳己テクスチャは謙己二次元配列に欄されており、 漏己読出手段は、 前 記二次元配列から藤己テクスチャを読出し、 結合手段は、 結合処理を行わず、 ΙίΠΞマツピ ング手段は、 前記読出手段が読み出した編己テタスチヤを tilt己多角形状のダラフィック要素に マッビングする、 請求項 1 8から 2 1記載のテクスチャマツビング装置。
2 4 . バイリニアフィルタリングを実行する画像処¾¾置であって、
テクスチャが複数の切片に分割され、 tilt己テクスチャが多角形状のグラフィック要素にマツ ビングされる態様で配置される第 1の二次元テクセル空間において少なくとも 1つの嫌己切片 が 1 8 0度回^ひ 動されて、 ΐΙίΐΞ切片の全てが、 tiff己テクスチャがメモリに格納される態 様で配置される第 2の二次元テクセル空間に配置されており、 カゝつ、 ΙίίΐΕ第 2の二次元テクセ ル空間においてバイリ -ァフイノレタリングで用いるテクセルが l己切片に |«して配置される ように、 爾己切片の全てが二次元配列に格納され、
嫌己ダラフィック要素に含まれるピクセルが写像される ΙίίΐΕ第 1の二次元テクセル空間の座 標に対応する前記第 2の二次元テクセル空間における座標 (S, T) を算出する座標算出手段 と、
写像された編己ピクセルに対応する 標 (S , T) 、 1 8 0度回転及ひ移動なしに前 記二次元配列に された嫌己切片に含まれる齢、嫌己第 2の二次元テクセル空間の座標 (S , T)ゝ 座標 (S + l, T)ヽ 座標 (S, T+ 1 )、 及び座標 (S + l , T+ 1 ) に位 Ml "る 4つの テクセルを読み出し、 写像された肅己ピクセルに対応する 標 (S , T) 力 1 8 0度回 転及ひ 動して爾己二次元配列に欄された編己切片に含まれる 、 編己第 2の二次元テク セノレ空間の座標 (S, T)、 座標 (S - 1 , Τ)、 座標 (S, T— 1 )、 及び座標 (S— 1, T— 1 ) に位置する 4つのテクセルを読み出す読出手段と、
肅己読出手段が読み出した嫌己 4つのテクセルを用いて、 写像された廳己ピクセルのバイリ ユアフィルタリングを "るバイリユアフィルタリング紫亍手段と、 を備える画
2 5 . ffff己多角形状のグラフィック要素は、 三角形状のグラフィック要素であり、 tilt己テクスチャは、 三角形状のテクスチャである、 請求項 2 4記載の画像処¾¾置。
2 6 . tilt己テクスチャは、 2つの前記切片に分割され、 そのうちの 1つの前記切片が 1 8 0度回転及ひ移動されて、 廳己 2つの切片が iflH二次元配列に欄されている、 請求項 2 5記 載の画像処職
2 7. ttJt己三角形状のテクスチヤは、 嫌己第 2の二次元テクセノレ空間の第 1座標軸に5 亍 な辺と fflf己第 1座標軸に直交する第 2座標軸に 亍な辺とを有する直角三角形状のテクスチャ であり、
ΙίίΙΞ直角三角形状のテクスチャは、 ffllE第 1座標軸あるいは tUlS第 2座標軸のレ、ずれかに平 行な S によって、 ΙΐίΐΒ 2つの切片に分割されている、 請求項 2 6記載の画像処¾¾
2 8 . 嫌己テクスチャの廳己二次元配列の欄形態として、 第 1格納形態及び第 2 形 態が用意されており、 廳己テクスチャは、 複数のテクセルからなり、
己第 1格納形態では、 前記第 2の二次元テクセル空間の第 1座標軸あるいは前記第 1座標 軸に直交する第2座標軸のレ、ずれかに、 平行かつ一次元に並んだ第 1の所定数のテクセルを 1 単位とし、 その 1単位のテクセルがメモリの 1ワードに格納されるように、 ΐ ΐΕ全ての切片が ΙίίΐΞ二次元配列に格納され、
ffJt己第 2格納形態では、 前記第 2の二次元テクセル空間に二次元に並んだ第 2の所定数のテ クセルを 1単位とし、 その 1単位のテクセルが鎌己メモリの 1ヮードに搬 されるように、 前 記全ての切片が ΙίίΙΒ二次元配列に格納される、 請求項 2 4から 2 6記載の画像処3¾置。
2 9 . 廳己テタスチヤの繰り替えしマッビング; ^行われる:^は、 l己分割並びに tiff己回 転及ひ移動なしに、 嫌己テクスチャは ΙίίΐΞ二次元配列に格納されており、 藤読出手段は、 前 記第 2の二次元テクセル空間の座標 (S , T)、 座標 (S + l , Τ)、 座標 (S , Τ十 1 )、 及び 座標 ( S + 1, T+ 1 ) に位置する 4つのテクセルを読み出す、 請求項 2 4から 2 8記載の画 像処職置。
3 0 . 三角形状のグラフィック要素にテクスチャをマッピングし、 嫌己グラフィックス要 素を構成する各ピクセルの描画処理を行う画像処 置であって、
ピクセルの描画が行われる二次元直 ¾¾標系を第 1の座標系とし、 ffit己第 1の座標系におけ る座標を (X, Y) で表し、
fiJlEテクスチャを構成する各テクセルが前記ダラフィックス要素にマッビングされる態様で 配置される二次元直 ¾1標系を第 2の座標系とし、 漏己第 2の座標系における座標を (U, V) で表し、
廳己各テクセルがメモリに格納される で配置される二次元直 3¾1標系を第 3の座標系と し、 前記第 3の座標系における座標を (S, T) で表し、
編己各テクセルのうちで最大の V座標を持つテクセルの V座標に基づいて V座標閾値が定め られ、
嫌己第 1の座標系におけるピクセルの座標 (X, Y) を ΙΞ第 2の座標系に写像し、 Ιίίΐ己ピ クセルの座標 (U, V) を求める座標算出手段と、
Hfrf己ピクセルの V座標が爾己 V座標閾値以下の 、 謙己ピクセルの座標 (u, V) を漏己 第 3の座標系における fillEピクセルの座標 (S, T) とし、 fi!f己ピクセルの V座標が IfJlEV座 標閾値を超える^ \ ΙίίΙΒ各ピクセルの座標 (U, V) を 1 8 0度回転及び移動して嫌己第 3 の座標系における ΜΙΒピクセルの座標 (S , Τ) に変換する座標変換手段と、
illE各ピクセルの座標 ( S , T) に基づいてテクセノ ータを fillEメモリカゝら取得する読出 手段と、 を備える画像処 aggo
31. ΙίΓίΞ 標変換手段は、 テクスチャの繰り返しマッピングが行われる 、 ffflEピク セルの V座標が fijf己 V座標閾値以下力 かにかかわらず、 U座標の上 fiMビット (Mは 1以上 の δ¾) を 「0」 に置き換えた値を it己ピクセルの S座標とし、 V座標の上位 Nビット (Nは 1以上の皿) を 「0」 に置き換えた値を fflf己ピクセルの T座標として、 媚己第 2の座標系に おける廳己各ピクセルの座標 (U, V)を ffilB第 3の座標系における HE各ピクセルの座標(S, T) に変換する、 請求項 30記載の画像処¾¾置。
32. 嫌己ピクセルの V座標が ΜΙΞ V座標閾値以下の齢、 tiflE読出手段は、 編己第 3の 座標系における座標 (S, T)、 座標 (S+1, Τ)、 座標 (S, T+l)、 及び座標 (S+1, Τ + 1 ) に位置する 4つのテクセルを読み出し、
iffsピクセルの V座標が肅己 V座標閾値を超える 、 廳己読出手段は、 編己第 3の座標系 における座標 (S, T)、座標 (S— 1, Τ)、座標 (S, Τ— 1)、 及び座標 (S— 1, T-1) に位置する 4つのテクセルを読み出し、
漏己画像処蝶置は、 1
tiif己読出手段が読み出した ΙΞ 4つのテクセルを用いて、 tiltfijS標 (S, T) に写像される tiilEピクセルのバイリニアフィノレタリングを薪汁るバイリニアフィルタリング菊亍手段をさ らに備える請求項 30又は 31記載の画像処3¾置。
33. 多角形状のグラフィック要素にマッピングされるテクスチャを複数の切片に分割す るステップと、
ΙίίΙ己テクスチャが ffrf己グラフィック要素にマツビングされる態様で配置される第 1の二次元 テクセル空間において少なくとも 1つの tiff己切片を回転及び移動して、 ffrf己テクスチャがメモ リに 内される態様で配置される第 2の二次元テクセル空間に配置された全ての l己切片を、
Ifjf己テクスチャを分割 に二次元配列に TOした に要する記憶容量より少なレヽ記憶 量 の記憶領域に格納される二次元配列に格納するステップと、 を含むテクスチャ格納方法。
34. tirt己テクスチャの廳己二次元配列の欄形態として、 第 1 形態及び第 形 態が用意され、
ΙΞテクスチャは、 複数のテクセルからなり、
編己第 1¾ ^形態では、 格納する ftif己ステップは、 己第 2の二次元テクセル空間の第 1座 標軸あるいは ΙΐίΐΕ第 1座標軸に直交する第 2座標軸の 、ずれかに、 ψ ^かつ一次元に並んだ第 1の所定数のテクセルを 1単位とし、 その 1単位のテクセルが記憶装置の 1ヮードに格納され るように、 前記全ての切片を前記二次元配列に格納し、
ΙίίΐΞ第 2格納形態では、 欄する編己ステップは、 ilB第 2の二次元テクセル空間に二次元 に並んだ第 2の所定数のテクセノレを 1単位とし、 その 1単位のテクセルが ¾ilt己記憶装置の 1ヮ ードに格納されるように、 鎌己全ての切片を嫌己二次元配列に する、 請求項 3 3記載のテ クスチヤ格納方法。
3 5 . 棚する嫌己ステップは、 m 2の二次元テクセル空間にぉレヽて近傍に配置され る前記切片同士の間が空き領域になるように、 前記全ての切片を前記二次元配列に格納し、 前記テクスチャ格納方法は、
嫌己空き領域に、 所定の画像処理に利用する画像データが配置されるように、 IE画像デー タを ΙίίΐΕ二次元配列に格納するステップをさらに含む請求項 3 3又は 3 4記載のテクスチャ格 納方法。
3 6 . 前記多角形状のグラフィック要素は、 三角形状のグラフィック要素であり、 前記テクスチャは、 三角形状のテクスチャである、 請求項 3 3から 3 5記載のテクスチャ格 納方法。
3 7 . 分割する前記ステップは、 前記テクスチャを、 2つの前記切片に分割し、 格納する前記ステップは、 前記 2つの切片のうちの 1つの前記切片を回転及び移動して、 前 記 2つの切片を tiff己二次元配列に格納する、 請求項 3 6記載のテクスチャ格納方法。
3 8 . 前記三角形状のテタスチヤは、 前記第 2の二次元テクセノレ空間の第 1座標軸に平行 な辺と l己第 1座標軸に直交する第 2座標軸に 亍な辺とを有する直角三角形状のテクスチャ であり、
分割する ffilSステップは、 嫌己直角三角形状のテクスチャを、 編己第 1座標軸あるいは嫌己 第 2座標軸のレ、ずれかに TOな,によって、 ffft己 2つの切片に分割し、
欄する廳己ステップは、 E 1つの切片を 1 8 0度回 ひ移動して、 嫌己 2つの切片を 肅己二次元配列に格納する、 請求項 3 7記載のテクスチャ格納方法。 '
3 9 . lift己テクスチャの繰り替えしマッビングが行われる は、 分割する ステップ は されず、
格納する肅己ステップは、 鎌己回転及ひ移動なしに、 ΙίίΙΕテクスチャを漏己二次元配列に格 納する、 請求項 3 3から 3 8記載のテクスチャ格納方法。
4 0 . 複数のグラフィック要素からなる、 スクリーンに表示される画像を生成する画像生 成装置であって、
tilt己ダラフィック要素にマッビングするためのテクスチャデータを外部のメモリから読み出 すための要求を行うデータ要求手段と、
IEメモリ力、ら読み出されたテクスチャデータを一時的に保管するテクスチャバッファ手段 と、
廳己テクスチャバッファ手段の領域を分割し、 新たに描画を開始する鎌己グラフィック要素 にマッピングされるテクスチャデータを 内するために当該テクスチャデータのサイズに応じ た領域の割り当てと、 描画が完了した tilt己グラフィック要素にマッピングされているテクスチ ャデータを格納していた領域の解放と、 を行うテクスチャバッファ管理手段と、 を備える画像 生成装置。
4 1 . tflt己複数のグラフィックス要素は、 二次元空間に投影された三次元立体の各面の形 状を表すための多角形状のグラフィック要素および l己スクリーンの枠に TOな矩形状のダラ フィック要素の任意の組み合わせからなり、 - 嫌己テクスチャバッファ管理手段は、 Ι ΐΞ矩形状のグラフィック要素にマッピングされるテ タスチヤデータの格納領域として、 当該テクスチャデータの一部分のみ力 S搬内可能なサイズを 割り当て、 fillB多角形状のグラフィック要素にマッピングされるテクスチャデータの格納領域 として、 当該テクスチャデータの全体が格納可能なサイズを割り当てる、 請求項 4 0記載の画 像生成装 Mo
4 2. tfllEデータ要求手段は、 ffilE矩形状のグラフィック要素にマッピングされるテクス チヤデータを要求する際には、 描画が進むに従ってマッピングするテクスチャデータを部分単 位で要求し、 廳己多角形状のグラフィック要素にマッピングされるテクスチャデータを要求す る際には、 マッピングするテクスチャデータの全体を一括して要求する、 請求項 4 1記載の画 像 装齓
4 3. 編己テクスチャバッファ管理手段は、 嫌己テクスチャバッファ手段の各領域を管理 する複数の構造体インスタンスを用いて前記テクスチャバッファ手段を管理する、 請求項 4 0 から 4 2に記載の画像生成装
4 4. 廳己複数の構造体ィンスタンスは、 管理する領域のサイズに応じて複数のグノ! ^プ に分けられ、 ΐίΐΞクン! ^プ内の ttri¾f造体インスタンスは、 リング状に互いがリンクされてい る、 請求項 4 3に記載の画像生成装置。
4 5. 全ての ttlt¾ 造体ィンスタンスを初期値に設定する構造体ネ刀期化手段をさらに備え る、 請求項 4 3又は 4 4に記載の画像生成装置。
4 6. 謙 造体初期化手段が、 tijtat造体ィンスタンスを初期値に設定するために I5 構造体ィンスタンスにアクセスする間隔を設定する制御レジスタをさらに備え、
編己制御レジスタには、 外部からアクセス可能である、 請求項 4 5に記載の画^^齓 4 7. 嫌己テクスチャバッファ手段は、 嫌己画胜成装置および外部の機能ユニットが共 有する メモリ上に、 任意の位置及び/又はサイズで構成可能である、 請求項 4 0から 4 6 に記載の画像生成装置。
PCT/JP2006/318681 2005-10-03 2006-09-14 画像生成装置、テクスチャマッピング装置、画像処理装置、及びテクスチャ格納方法 WO2007043293A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2007539843A JP5061273B2 (ja) 2005-10-03 2006-09-14 画像生成装置、テクスチャマッピング装置、画像処理装置、及びテクスチャ格納方法
US12/088,935 US20090278845A1 (en) 2005-10-03 2006-09-14 Image generating device, texture mapping device, image processing device, and texture storing method

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
JP2005290090 2005-10-03
JP2005-290090 2005-10-03
JP2005298238 2005-10-12
JP2005-298238 2005-10-12
JP2005318087 2005-11-01
JP2005-318087 2005-11-01

Publications (1)

Publication Number Publication Date
WO2007043293A1 true WO2007043293A1 (ja) 2007-04-19

Family

ID=37942545

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2006/318681 WO2007043293A1 (ja) 2005-10-03 2006-09-14 画像生成装置、テクスチャマッピング装置、画像処理装置、及びテクスチャ格納方法

Country Status (3)

Country Link
US (1) US20090278845A1 (ja)
JP (2) JP5061273B2 (ja)
WO (1) WO2007043293A1 (ja)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4795264B2 (ja) * 2007-02-06 2011-10-19 キヤノン株式会社 走査変換装置及び走査変換方法
US7876329B2 (en) * 2007-09-10 2011-01-25 Via Technologies, Inc. Systems and methods for managing texture data in a computer
US8155479B2 (en) 2008-03-28 2012-04-10 Intuitive Surgical Operations Inc. Automated panning and digital zooming for robotic surgical systems
JP2012203889A (ja) * 2011-03-28 2012-10-22 Fujitsu Ltd 画面共有方法、画面共有装置、及びプログラム
GB2556262B (en) * 2012-12-21 2018-11-21 Displaylink Uk Ltd Management of memory for storing display data
US9600909B2 (en) 2015-07-20 2017-03-21 Apple Inc. Processed texel cache
US9875578B2 (en) * 2015-10-13 2018-01-23 Biosense Webster (Israel) Ltd. Voxelization of a mesh
JP7312040B2 (ja) 2019-06-28 2023-07-20 Biprogy株式会社 テクスチャマッピング装置およびテクスチャマッピング用プログラム
CN112802172B (zh) * 2021-02-24 2024-03-01 网易(杭州)网络有限公司 三维模型的纹理映射方法、装置、存储介质及计算机设备
CN113139399B (zh) * 2021-05-13 2024-04-12 阳光电源股份有限公司 一种图像线框识别方法及服务器
CN113721969B (zh) * 2021-09-08 2024-02-06 广州城市规划技术开发服务部有限公司 一种基于多尺度空间矢量数据级联更新方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08161525A (ja) * 1994-12-02 1996-06-21 Sony Corp 画像情報生成方法及び画像情報処理装置、並びに記録媒体
JPH08212377A (ja) * 1994-12-02 1996-08-20 Sony Computer Entateinmento:Kk 画像情報生成装置及び方法、画像情報処理装置及び方法、並びに記録媒体
JPH1011611A (ja) * 1996-06-25 1998-01-16 Sony Computer Entertainment:Kk 描画装置および描画方法

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5757376A (en) * 1994-12-02 1998-05-26 Sony Corporation Method of producing image data and associated recording medium
JPH08315178A (ja) * 1995-05-22 1996-11-29 Hudson Soft Co Ltd 画像合成装置
US5864342A (en) * 1995-08-04 1999-01-26 Microsoft Corporation Method and system for rendering graphical objects to image chunks
US6281903B1 (en) * 1998-12-04 2001-08-28 International Business Machines Corporation Methods and apparatus for embedding 2D image content into 3D models
US7119819B1 (en) * 1999-04-06 2006-10-10 Microsoft Corporation Method and apparatus for supporting two-dimensional windows in a three-dimensional environment
US6549201B1 (en) * 1999-11-23 2003-04-15 Center For Advanced Science And Technology Incubation, Ltd. Method for constructing a 3D polygonal surface from a 2D silhouette by using computer, apparatus thereof and storage medium
CA2317336A1 (en) * 2000-09-06 2002-03-06 David Cowperthwaite Occlusion resolution operators for three-dimensional detail-in-context
US8035635B2 (en) * 2001-05-22 2011-10-11 Yoav Shefi Method and system for displaying visual content in a virtual three-dimensional space
EP1745440B1 (en) * 2004-05-03 2008-04-23 Nxp B.V. Graphics pipeline for rendering graphics
KR100727034B1 (ko) * 2005-12-09 2007-06-12 한국전자통신연구원 3차원 공간상에서 2차원 인간형 캐릭터의 표현 및애니메이션 방법

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08161525A (ja) * 1994-12-02 1996-06-21 Sony Corp 画像情報生成方法及び画像情報処理装置、並びに記録媒体
JPH08212377A (ja) * 1994-12-02 1996-08-20 Sony Computer Entateinmento:Kk 画像情報生成装置及び方法、画像情報処理装置及び方法、並びに記録媒体
JPH1011611A (ja) * 1996-06-25 1998-01-16 Sony Computer Entertainment:Kk 描画装置および描画方法

Also Published As

Publication number Publication date
US20090278845A1 (en) 2009-11-12
JP5061273B2 (ja) 2012-10-31
JP2012079338A (ja) 2012-04-19
JPWO2007043293A1 (ja) 2009-04-16

Similar Documents

Publication Publication Date Title
WO2007043293A1 (ja) 画像生成装置、テクスチャマッピング装置、画像処理装置、及びテクスチャ格納方法
US20080273030A1 (en) Drawing apparatus and drawing method
US7400331B2 (en) Apparatus and methods for texture mapping
JP3028379B2 (ja) 三次元コンピュータ図形記号発生器
TWI287757B (en) Image synthesis apparatus, electrical apparatus, image synthesis method, and computer-readable recording medium for recording control program
TW200403595A (en) Scalable high performance 3D graphics
WO1994004990A1 (en) Image synthesizer
JP2005044346A (ja) 画素のランのための合成計算の最適化
JP3715222B2 (ja) 描画方法、描画装置、描画処理プログラム、描画処理プログラムを記録した記録媒体、および描画処理プログラム実行装置
KR910009102B1 (ko) 화상합성 장치
US6927778B2 (en) System for alpha blending and method thereof
JPH07146931A (ja) 画像創成方法
US6812931B2 (en) Rendering process
JP4109740B2 (ja) 畳み込み走査ラインレンダリング
WO2007052420A1 (ja) 画像生成装置
JP3068590B1 (ja) 2次元画像処理装置
JP2005235205A (ja) 形状チャネルを用いないクリップ・トゥ・セルフ(clip−to−self)機能を有する合成
WO1998050890A1 (fr) Procede d&#39;obtention de fonction projecteur et processeur d&#39;images utilisant ce procede
GB2157121A (en) Image composition system
JPH11306366A (ja) グラフィック演算装置およびその方法
JP2000155851A (ja) テクスチャ・マッピング装置及びこれを具備したレンダリング装置、並びに情報処理装置
US20040004620A1 (en) Image processing apparatus and method of same
JPH02132572A (ja) 画像表示装置
JPH0350686A (ja) 図形処理方式
JPH11306381A (ja) グラフィック演算装置およびその方法

Legal Events

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

Ref document number: 2007539843

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 06798174

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 12088935

Country of ref document: US