CN107464274B - Quick rasterization hardware implementation method based on quadrilateral texture unit - Google Patents
Quick rasterization hardware implementation method based on quadrilateral texture unit Download PDFInfo
- Publication number
- CN107464274B CN107464274B CN201710668042.6A CN201710668042A CN107464274B CN 107464274 B CN107464274 B CN 107464274B CN 201710668042 A CN201710668042 A CN 201710668042A CN 107464274 B CN107464274 B CN 107464274B
- Authority
- CN
- China
- Prior art keywords
- block
- blocks
- rasterization
- pixel points
- square area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/40—Filling a planar surface by adding surface attributes, e.g. colour or texture
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
Abstract
The invention discloses a rapid rasterization hardware implementation method based on a quadrilateral texture unit, which takes a quadrilateral as a texture basic unit, divides a screen into a plurality of square areas of 32x32, codes pixel points in the square area of 32x32 in a 'block' mode, performs block scanning, outputs 2x 2 blocks of overlapped textures and the square area of 32x32, and then outputs overlapped pixel points by pixel scanning to complete a rasterization process; by adopting the quadrangle as the texture basic unit, compared with the traditional method which adopts the triangle as the texture basic unit, only one-time rasterization calculation is needed, and the speed is greatly improved; by adopting the block as a unit to calculate, once a certain block is not in line with the requirement, all pixel points in the block are eliminated, and the operation time is greatly reduced.
Description
Technical Field
The invention belongs to the technical field of computer graphics, relates to a rasterization method, and particularly relates to a rapid rasterization hardware implementation method based on quadrilateral texture units.
Background
With the rapid development of hardware technologies such as an FPGA, an ASIC, and the like, more and more graphics rendering methods start to use a hardware acceleration technology, so that the graphics rendering speed is greatly increased, and the computational burden of a CPU is reduced.
Rasterization is used as the beginning and the base of graphics rendering, consumed computing resources occupy a considerable proportion of the whole graphics rendering resources, and meanwhile, the computing speed of rasterization is the most core part influencing the whole graphics rendering speed. Therefore, optimizing the rasterization algorithm has important practical significance for accelerating the graphic rendering and reducing the consumption of computing resources.
Disclosure of Invention
The invention aims to provide a rapid rasterization hardware implementation method based on a quadrilateral texture unit, which takes a quadrilateral as a basic texture unit, optimizes a rasterization algorithm, improves rasterization speed and reduces rasterization calculation resource consumption.
The purpose of the invention can be realized by the following technical scheme:
a quick rasterization hardware realization method based on quadrilateral texture units comprises the following steps:
step S1, parameter input: caching the input parameters;
step S2, parameter establishment: pre-calculating parameters required in the whole scanning conversion process;
step S3, scan conversion: and outputting the pixel points meeting the requirements, and finishing the rasterization process.
Further, the parameter establishment in step S2 specifically includes the following steps:
step S21, adopting quadrangle as texture basic unit, and dividing the screen into several square areas of 32x32 by graphics rendering;
and step S22, coding the pixel points in the 32x32 square area in a 'block' mode, firstly dividing the 32x32 square area into 4 16 x 16 blocks, coding, further dividing each 16 x 16 block into 4 8 x 8 blocks, coding, and repeating the steps until the coding of all the pixel points in the 32x32 square area is completed.
Further, the scan conversion in step S3 specifically includes the following steps:
step S31, block scan: performing block scanning, and outputting overlapped 2x 2 blocks;
step S32, pixel scanning: and outputting the pixel points in the overlapped 2x 2 blocks to finish the rasterization process.
Further, the block scanning in step S31 specifically includes the following steps:
step S311, first, 16 8 × 8 blocks included in a square area of 32 × 32 are sent to a block scanning unit;
step S312, after the block scanning unit calculates, 8 × 8 blocks of codes meeting the requirements are stored in an 8 × 8 block storage unit;
step 313, sequentially sending the information in the 8 × 8 block storage units to the block scanning unit for calculation, and storing the codes of 4 × 4 blocks meeting the requirements in the block scanning unit to the 4 × 4 block storage units;
and step S314, sequentially sending the information in the 4 × 4 block storage units to the block scanning unit for calculation, and outputting the codes of the 2 × 2 blocks meeting the requirement until all the 2 × 2 blocks meeting the requirement in the square area of 32 × 32 are output.
The invention has the beneficial effects that: the fast rasterization hardware implementation method provided by the invention takes a quadrangle as a texture basic unit, divides a screen into a plurality of square areas of 32x32, codes pixel points in the square area of 32x32 in a 'block' mode, performs block scanning, outputs 2x 2 blocks of overlapped textures and the square area of 32x32, and outputs overlapped pixel points by pixel scanning to complete the rasterization process; by adopting the quadrangle as the texture basic unit, compared with the traditional method which adopts the triangle as the texture basic unit, only one-time rasterization calculation is needed, and the speed is greatly improved; by adopting the block as a unit to calculate, once a certain block is not in line with the requirement, all pixel points in the block are eliminated, and the operation time is greatly reduced.
Drawings
The invention is described in further detail below with reference to the figures and specific embodiments.
FIG. 1 is a flow chart of the rasterization process of the present invention.
FIG. 2 is a schematic diagram of the quadrilateral texture of the present invention.
Fig. 3 is a schematic diagram of the encoding method of the present invention.
Fig. 4 is a flow chart of scan conversion of the present invention.
FIG. 5 is a flow chart of the block scan of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, the present invention provides a method for implementing fast rasterization hardware based on quadrilateral texture units, which includes the following steps:
step S1, parameter input: and carrying out caching processing on the input parameters.
Step S2, parameter establishment: the parameters required in the whole scanning conversion process are calculated in advance.
The parameter establishment in step S2 specifically includes the following steps:
step S21, adopting quadrangle as texture basic unit, and dividing the screen into several square areas of 32x32 by graphics rendering; as shown in fig. 2, in the conventional method, triangles are used as basic units of texture, and to calculate an example in a graph, rasterization calculation needs to be performed twice, each of the triangle 1 and the triangle 2 is performed once, and if a quadrangle is used, rasterization calculation needs to be performed once only by taking two connected triangles as a whole, which only needs to pay a cost of calculating one more edge, and in contrast, the speed is greatly improved.
Step S22, as shown in fig. 3, encoding the pixels in the 32x32 square area in a "block" manner, first dividing the 32x32 square area into 4 16 × 16 blocks, and encoding, where the 4 16 × 16 blocks are sequentially 00, 01, 10, and 11, and further dividing each 16 × 16 block into 4 8 × 8 blocks, and encoding, where the 4 8 × 8 blocks in the first 16 × 16 block are sequentially 0000, 0001, 0010, and 0011, and so on, and the encoding coordinates of the marked pixels in the drawing are 0010101010.
Step S3, scan conversion: and outputting the pixel points meeting the requirements, and finishing the rasterization process.
As shown in fig. 4, the scan conversion in step S3 specifically includes the following steps:
step S31, block scan: block scanning is carried out, overlapped 2x 2 blocks are output, calculation is carried out by taking the block as a unit, once a certain block does not meet the requirement, all pixel points in the block are eliminated, and the calculation time is greatly reduced; wherein a "block" that does not contain 2x 2 blocks that overlap is an unsatisfactory "block".
As shown in fig. 5, the block scanning in step S31 specifically includes the following steps:
in step S311, 16 8 × 8 blocks contained in a square area of 32 × 32 are sent to the block scan unit.
In step S312, after the block scan unit calculates, 8 × 8 blocks of codes meeting the requirement are stored in the 8 × 8 block storage unit.
And step 313, sequentially sending the information in the 8 × 8 block storage units to the block scanning unit for calculation, and storing the codes of 4 × 4 blocks meeting the requirements in the 4 × 4 block storage units.
And step S314, sequentially sending the information in the 4 × 4 block storage units to the block scanning unit for calculation, and outputting the codes of the 2 × 2 blocks meeting the requirement until all the 2 × 2 blocks meeting the requirement in the square area of 32 × 32 are output.
Step S32, pixel scanning: and outputting the pixel points in the overlapped 2x 2 blocks to finish the rasterization process.
The fast rasterization hardware implementation method provided by the invention takes a quadrangle as a texture basic unit, divides a screen into a plurality of square areas of 32x32, codes pixel points in the square area of 32x32 in a 'block' mode, performs block scanning, outputs 2x 2 blocks of overlapped textures and the square area of 32x32, and outputs overlapped pixel points by pixel scanning to complete the rasterization process; by adopting the quadrangle as the texture basic unit, compared with the traditional method which adopts the triangle as the texture basic unit, only one-time rasterization calculation is needed, and the speed is greatly improved; by adopting the block as a unit to calculate, once a certain block is not in line with the requirement, all pixel points in the block are eliminated, and the operation time is greatly reduced.
In the description herein, references to the description of "one embodiment," "an example," "a specific example" or the like are intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing is merely exemplary and illustrative of the present invention and various modifications, additions and substitutions may be made by those skilled in the art to the specific embodiments described without departing from the scope of the invention as defined in the following claims.
Claims (3)
1. A quick rasterization hardware realization method based on quadrilateral texture units is characterized by comprising the following steps:
step S1, parameter input: caching the input parameters;
step S2, parameter establishment: pre-calculating parameters required in the whole scanning conversion process;
step S3, scan conversion: outputting the pixel points meeting the requirements, and finishing the rasterization process;
the parameter establishment in step S2 specifically includes the following steps:
step S21, adopting quadrangle as texture basic unit, and dividing the screen into several square areas of 32x32 by graphics rendering;
and step S22, coding the pixel points in the 32x32 square area in a 'block' mode, firstly dividing the 32x32 square area into 4 16 x 16 blocks, coding, further dividing each 16 x 16 block into 4 8 x 8 blocks, coding, and repeating the steps until the coding of all the pixel points in the 32x32 square area is completed.
2. The method as claimed in claim 1, wherein the scan conversion in step S3 specifically includes the following steps:
step S31, block scan: performing block scanning, and outputting overlapped 2x 2 blocks;
step S32, pixel scanning: and outputting the pixel points in the overlapped 2x 2 blocks to finish the rasterization process.
3. The method according to claim 2, wherein the block scanning in step S31 specifically includes the following steps:
step S311, first, 16 8 × 8 blocks included in a square area of 32 × 32 are sent to a block scanning unit;
step S312, after the block scanning unit calculates, 8 × 8 blocks of codes meeting the requirements are stored in an 8 × 8 block storage unit;
step 313, sequentially sending the information in the 8 × 8 block storage units to the block scanning unit for calculation, and storing the codes of 4 × 4 blocks meeting the requirements in the block scanning unit to the 4 × 4 block storage units;
and step S314, sequentially sending the information in the 4 × 4 block storage units to the block scanning unit for calculation, and outputting the codes of the 2 × 2 blocks meeting the requirement until all the 2 × 2 blocks meeting the requirement in the square area of 32 × 32 are output.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710668042.6A CN107464274B (en) | 2017-08-07 | 2017-08-07 | Quick rasterization hardware implementation method based on quadrilateral texture unit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710668042.6A CN107464274B (en) | 2017-08-07 | 2017-08-07 | Quick rasterization hardware implementation method based on quadrilateral texture unit |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107464274A CN107464274A (en) | 2017-12-12 |
CN107464274B true CN107464274B (en) | 2020-07-07 |
Family
ID=60548512
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710668042.6A Active CN107464274B (en) | 2017-08-07 | 2017-08-07 | Quick rasterization hardware implementation method based on quadrilateral texture unit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107464274B (en) |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2005106798A1 (en) * | 2004-05-03 | 2005-11-10 | Koninklijke Philips Electronics N.V. | Graphics pipeline for rendering graphics |
US8928676B2 (en) * | 2006-06-23 | 2015-01-06 | Nvidia Corporation | Method for parallel fine rasterization in a raster stage of a graphics pipeline |
CN100545831C (en) * | 2006-09-27 | 2009-09-30 | 北京大学 | A kind of grating processing method of transparent page and device |
EP2107528B1 (en) * | 2008-04-01 | 2012-12-26 | Telefonaktiebolaget L M Ericsson (PUBL) | Method of and arrangement for rendering a path |
CN101789133B (en) * | 2010-01-27 | 2011-09-14 | 深圳市五巨科技有限公司 | Continuous animation effect realization method and device for mobile terminal |
CN106201268B (en) * | 2016-07-11 | 2019-06-07 | 合肥速显微电子科技有限公司 | A kind of human-computer interaction interface method for rendering graph and system based on transformation matrix |
-
2017
- 2017-08-07 CN CN201710668042.6A patent/CN107464274B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN107464274A (en) | 2017-12-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CA2743039C (en) | Bezier curve drawing device, bezier curve drawing method, and recording medium | |
US20110310102A1 (en) | Systems and methods for subdividing and storing vertex data | |
US20130120380A1 (en) | Tessellation in tile-based rendering | |
US9305397B2 (en) | Vertex order in a tessellation unit | |
CN112529995B (en) | Image rendering calculation method and device, storage medium and terminal | |
WO2010078153A2 (en) | A tessellator whose tessellation time grows linearly with the amount of tessellation | |
US9449419B2 (en) | Post tessellation edge cache | |
CN102201108A (en) | Edge processing techniques | |
WO2009121722A1 (en) | Method of and arrangement for rendering a path | |
US9922442B2 (en) | Graphics processing unit and method for performing tessellation operations | |
CN107742317B (en) | Rendering method, device and system combining light sensation and convolution network and storage medium | |
KR20160051155A (en) | Apparatus and method for rendering | |
CN110917617A (en) | Method, device and equipment for generating water ripple image and storage medium | |
CN110910308B (en) | Image processing method, device, equipment and medium | |
CN112419511A (en) | Three-dimensional model file processing method and device, storage medium and server | |
CN107464274B (en) | Quick rasterization hardware implementation method based on quadrilateral texture unit | |
CN109925715B (en) | Virtual water area generation method and device and terminal | |
WO2019088865A1 (en) | Method and system for removing hidden surfaces from a three-dimensional scene | |
CN100476880C (en) | Method and system for producing volume shade | |
KR20210123243A (en) | Method for processing 3-d data | |
US10339704B2 (en) | Image data processing method in image processor and computer readable medium storing program therefor for rendering a texture based on a triangulation pattern | |
CN106447753B (en) | method and system for simplifying rendering of object model | |
Concheiro et al. | Synthesis of Bézier surfaces on the GPU | |
US20140192051A1 (en) | Offloading Tessellation from a Graphics Processor to a Central Processing Unit | |
CN115118989B (en) | Image compression method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |