JPH08110957A - Device and method for shading picture pattern - Google Patents

Device and method for shading picture pattern

Info

Publication number
JPH08110957A
JPH08110957A JP24584594A JP24584594A JPH08110957A JP H08110957 A JPH08110957 A JP H08110957A JP 24584594 A JP24584594 A JP 24584594A JP 24584594 A JP24584594 A JP 24584594A JP H08110957 A JPH08110957 A JP H08110957A
Authority
JP
Japan
Prior art keywords
correction value
original data
circuit
value
image pattern
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.)
Withdrawn
Application number
JP24584594A
Other languages
Japanese (ja)
Inventor
Shuji Hori
修司 堀
Tatsuya Namatame
辰也 生天目
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sega Corp
Original Assignee
Sega Enterprises Ltd
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 Sega Enterprises Ltd filed Critical Sega Enterprises Ltd
Priority to JP24584594A priority Critical patent/JPH08110957A/en
Priority to TW083110104A priority patent/TW345652B/en
Publication of JPH08110957A publication Critical patent/JPH08110957A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE: To provide a shading device capable of easily determining a correction value and executing quick shading processing for a picture pattern. CONSTITUTION: A pattern memory 1 storing original data is connected to a reading circuit 2. The circuit 2 is connected to a frame memory 5 through a saturation processing circuit 4. A correction value generating circuit 3 divided into R-component, G-component and B-component generating parts 3a to 3c is connected to the circuit 2. The circuit 3 is connected to the circuit 4 through a a correction value calculating circuit (DDA) 6. Each of R-component, G- component and B-component saturation processing circuits 4a to 4c constituting the saturation processing circuit 4 is provided with an adder 8, an overflow/ underflow signal generating circuit 9, an overflow processing circuit 10, and an underflow processing circuit 11. The frame memory 5 is connected to a display.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、例えば、ゲームのキャ
ラクター表示にもちいられるスプライト等の画像パター
ンに対して、シェーディング処理を施すための画像パタ
ーンのシェーディング装置及び方法に関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image pattern shading apparatus and method for performing a shading process on an image pattern such as a sprite used for displaying characters in a game.

【0002】[0002]

【従来の技術】アーケードゲームや家庭用のテレビゲー
ムは、ディスプレイの画面上に表示される特定のキャラ
クターを、ジョイスティックや押しボタンスイッチ等に
よって操作することを楽しむものである。したがって、
優れた表示技術によってキャラクターを多数登場させ、
多様に変化させることができれば、ゲームの興味も増す
ことになる。このようなゲームのキャラクターは、通
常、スプライトによって表示される。スプライトとは、
画面表示において反復して用いられる図形を、あらかじ
め矩形等に区切って元データとして登録しておき、その
元データを他の画像に重ね合わせて表示させる画像パタ
ーンである。スプライトは、背景画面(スクロール画
面)上を高速に移動させたり、描き替えることができる
ので、いくつかのスプライトを用意して、指定した座標
を移動させながら描き替えることによって、ゲームキャ
ラクタが動き回るといったアニメーション効果を作り出
すことができる。
2. Description of the Related Art Arcade games and home-use video games enjoy the operation of a specific character displayed on the screen of a display with a joystick or push button switches. Therefore,
Introducing many characters with excellent display technology,
If you can make various changes, the interest in the game will increase. Characters in such games are typically displayed by sprites. What is a sprite?
This is an image pattern in which a figure repeatedly used in screen display is divided into rectangles or the like in advance and registered as original data, and the original data is displayed by being superimposed on another image. Since sprites can be moved or redrawn at high speed on the background screen (scroll screen), some sprites are prepared, and the game character moves around by redrawing while moving the specified coordinates. You can create animation effects.

【0003】このようなスプライトは、所定の数のビッ
ト列で表現される無数の画素データ(ピクセルデータ)
によって構成されていて、陰影のある立体を表現する場
合にはあらかじめ陰影のある(ディスプレイ表示の際の
輝度が決定された)元データをメモリに記憶させておく
必要があった。しかし、このような元データは輝度が固
定されているため、光源の移動や変化、スプライトの移
動や変化による光の反射表現等に柔軟性がなく、複雑に
変化する陰影を表現する場合にはそれ応じて数多くの元
データを記憶させておかなければならず、メモリの負担
となっていた。
Such a sprite has an infinite number of pixel data (pixel data) represented by a predetermined number of bit strings.
In the case of expressing a solid body having a shadow, it is necessary to store in advance the original data having a shadow (the brightness at the time of displaying on the display is determined) in the memory. However, since the brightness of such original data is fixed, there is no flexibility in the expression of light reflection due to the movement or change of the light source, the movement or change of the sprite, etc. Accordingly, a lot of original data must be stored, which is a burden on the memory.

【0004】これに対処するため、元データにおける画
素データに補正値を加えることによって、各画素ごとの
輝度を変化させるシェーディング装置が開発されてい
る。このシェーディング装置は、パターンメモリ、読み
出し回路、補正値発生回路、加算回路、フレームメモリ
等を有し、以下のようにシェーディング作業を行う。す
なわち、まず読み出し回路によって、パターンメモリか
ら元データを読み出す。この元データにおける画素デー
タはR成分(赤)、G成分(緑)、B成分(青)によっ
て構成されるRGBデータである。補正値発生回路は、
これらRGB成分ごとに対応した補正値を生成する。こ
の補正値は前記画素データと同じビット数で表現され
る。そして、加算回路によって元データのRGBデータ
に補正値を加算し、このデータをフレームメモリに書き
込む。さらに、フレームメモリに書き込まれたデータが
ディスプレイ上に表示される。
To cope with this, a shading device has been developed which changes the luminance of each pixel by adding a correction value to the pixel data in the original data. This shading device has a pattern memory, a read circuit, a correction value generation circuit, an addition circuit, a frame memory, etc., and performs shading work as follows. That is, first, the read circuit reads the original data from the pattern memory. The pixel data in this original data is RGB data composed of an R component (red), a G component (green), and a B component (blue). The correction value generation circuit
A correction value corresponding to each of these RGB components is generated. This correction value is represented by the same number of bits as the pixel data. Then, the correction value is added to the RGB data of the original data by the adder circuit, and this data is written in the frame memory. Further, the data written in the frame memory is displayed on the display.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、上記の
ような従来のスプライトに対するシェーディング装置に
は、以下のような問題点があった。すなわち、元データ
の全ての画素に補正値を加える必要があるため、多数の
画素ごとに補正値を決定していく作業に大変手間がかか
り、シェーデング処理に時間がかかる。
However, the conventional shading device for sprites as described above has the following problems. That is, since it is necessary to add the correction value to all the pixels of the original data, the work of determining the correction value for each of a large number of pixels is very troublesome and the shading processing takes time.

【0006】また、表示可能なデータのビット数には限
界があるので、元データに補正値を加算したときに、前
記ビット列で表現可能な値よりも小さい値になった場合
(アンダーフローと呼ぶ)や、大きな値になった場合
(オーバーフローと呼ぶ)にはディスプレイ表示が困難
になる。
Further, since the number of bits of displayable data is limited, when the correction value is added to the original data, the value becomes smaller than the value expressible by the bit string (called underflow). ) Or a large value (called overflow) makes it difficult to display on the display.

【0007】本発明は、上記のような問題点を解決する
ために提案されたもので、その目的は、元データに対す
る補正値の決定を容易に行うことができる画像パターン
に対するシェーディング装置を提供することである。
The present invention has been proposed in order to solve the above problems, and an object thereof is to provide a shading device for an image pattern, which can easily determine a correction value for original data. That is.

【0008】第2の目的は、元データに対する補正値の
決定を迅速に行うことができる画像パターンに対するシ
ェーディング装置を提供することである。
A second object is to provide a shading device for an image pattern, which can quickly determine a correction value for original data.

【0009】第3の目的は、アンダーフローやオーバー
フローが発生した場合であっても、ディスプレイ表示可
能な画像データを生成できる画像パターンに対するシェ
ーディング装置を提供することである。
A third object is to provide a shading device for an image pattern that can generate image data that can be displayed on a display even when an underflow or an overflow occurs.

【0010】第4の目的は、アンダーフロー処理やオー
バーフロー処理を迅速に行うことができる画像パターン
に対するシェーディング装置を提供することである。
A fourth object of the present invention is to provide a shading device for an image pattern which can rapidly perform underflow processing and overflow processing.

【0011】第5の目的は、元データに対する補正値の
決定を容易に行うことができる画像パターンに対するシ
ェーディング方法を提供することである。
A fifth object of the present invention is to provide a shading method for an image pattern in which a correction value for original data can be easily determined.

【0012】第6の目的は、アンダーフローやオーバー
フローが発生した場合であっても、ディスプレイ表示可
能な画像データを生成できる画像パターンに対するシェ
ーディング方法を提供することである。
A sixth object is to provide a shading method for an image pattern capable of generating image data which can be displayed on a display even when an underflow or an overflow occurs.

【0013】[0013]

【課題を解決するための手段】上記の目的を達成するた
めに、請求項1記載の発明は、画像パターンをディスプ
レイ装置の画面に表示するための元データを格納したパ
ターンメモリと、前記元データにおける輝度を画素ごと
に変化させる補正値を生成する補正値発生手段と、前記
元データに前記補正値を加算する加算手段とを有する画
像パターンに対するシェーディング装置において、前記
元データの任意の2点の画素に対する補正値に基づい
て、当該2点を結ぶ直線上の画素に対する補正値を決定
する補正値算出手段を備えたことを特徴とする。
In order to achieve the above object, the invention according to claim 1 is a pattern memory storing original data for displaying an image pattern on a screen of a display device, and the original data. In a shading device for an image pattern, which has a correction value generating means for generating a correction value for changing the luminance in each pixel and an adding means for adding the correction value to the original data, It is characterized in that a correction value calculating means for determining a correction value for a pixel on a straight line connecting the two points based on the correction value for the pixel is provided.

【0014】請求項2記載の発明は、請求項1記載の画
像パターンに対するシェーディング装置において、前記
補正値算出手段は、ディジタル回路によって構成された
ディジタル微分解析機であることを特徴とする。
According to a second aspect of the present invention, in the shading apparatus for the image pattern according to the first aspect, the correction value calculating means is a digital differential analyzer constituted by a digital circuit.

【0015】請求項3記載の発明は、画像パターンをデ
ィスプレイ装置の画面に表示するための元データを所定
の数のビット列の表現形式で格納したパターンメモリ
と、前記元データにおける輝度を画素ごとに変化させる
補正値を前記ビット列の表現形式で生成する補正値発生
手段と、前記元データに前記補正値を加算する加算手段
とを有する画像パターンに対するシェーディング装置に
おいて、前記加算回路による前記元データと前記補正値
との加算結果が、前記ビット列で表現可能な最小値より
も小さい場合には当該最小値を出力し、前記ビット列で
表現可能な最大値よりも大きい場合には当該最大値を出
力する飽和処理手段を備えたことを特徴とする。
According to a third aspect of the present invention, a pattern memory in which original data for displaying an image pattern on a screen of a display device is stored in a representation format of a predetermined number of bit strings, and a luminance in the original data for each pixel. A shading device for an image pattern, comprising: a correction value generating means for generating a correction value to be changed in the expression format of the bit string; and an adding means for adding the correction value to the original data. When the addition result with the correction value is smaller than the minimum value that can be expressed by the bit string, the minimum value is output, and when it is larger than the maximum value that can be expressed by the bit string, the maximum value is output. A processing means is provided.

【0016】請求項4記載の発明は、請求項3記載の画
像パターンに対するシェーディング装置において、前記
飽和処理手段は、前記加算回路による加算結果が前記ビ
ット列で表現可能な最小値よりも小さい場合にはアンダ
ーフロー信号を生成し、前記ビット列で表現可能な最大
値よりも大きい場合にはオーバーフロー信号を生成する
オーバーフロー・アンダーフロー信号発生回路と、前記
オーバーフロー信号が入力された場合にはビット列にお
ける全てのビットを1として出力し、前記オーバーフロ
ー信号が入力されない場合には加算結果のビット列をそ
のまま出力するオーバーフロー処理回路と、前記アンダ
ーフロー信号が入力された場合にはビット列における全
てのビットを0として出力し、前記アンダーフロー信号
が入力されない場合には加算結果のビット列をそのまま
出力するアンダーフロー処理回路とを備えたことを特徴
とする。
According to a fourth aspect of the present invention, in the shading apparatus for the image pattern according to the third aspect, the saturation processing means, when the addition result of the addition circuit is smaller than the minimum value that can be represented by the bit string. An overflow / underflow signal generation circuit that generates an underflow signal and generates an overflow signal when it is larger than the maximum value that can be expressed by the bit string, and all bits in the bit string when the overflow signal is input. Is output as 1, and an overflow processing circuit that outputs the bit string of the addition result as it is when the overflow signal is not input, and outputs all bits in the bit string as 0 when the underflow signal is input, If the underflow signal is not input Characterized by comprising a underflow processing circuit directly outputs a bit string of the addition result to.

【0017】請求項5記載の発明は、画像パターンをデ
ィスプレイ装置の画面に表示するための元データにおけ
る輝度を、画素ごとに変化させる補正値を生成し、前記
元データに前記補正値を加算する画像パターンに対する
シェーディング方法において、前記元データの任意の2
点の画素に対する補正値に基づいて、当該2点を結ぶ直
線上の画素に対する補正値を決定することを特徴とす
る。
According to a fifth aspect of the present invention, a correction value for changing the brightness of the original data for displaying the image pattern on the screen of the display device for each pixel is generated, and the correction value is added to the original data. In the shading method for the image pattern, any 2 of the original data is used.
It is characterized in that the correction value for the pixel on the straight line connecting the two points is determined based on the correction value for the pixel at the point.

【0018】請求項6記載の発明は、画像パターンをデ
ィスプレイ装置の画面に表示するための元データを所定
の数のビット列で表現し、前記元データにおける輝度を
画素ごとに変化させる補正値を前記ビット列の表現形式
で生成し、前記元データに前記補正値を加算する画像パ
ターンに対するシェーディング方法において、前記元デ
ータと前記補正値との加算結果が、前記ビット列で表現
可能な最小値よりも小さい場合には当該最小値を生成
し、前記ビット列で表現可能な最大値よりも大きい場合
には当該最大値を生成することを特徴とする。
According to a sixth aspect of the present invention, the original data for displaying the image pattern on the screen of the display device is represented by a predetermined number of bit strings, and the correction value for changing the luminance of the original data for each pixel is set. In a shading method for an image pattern that is generated in a bit string representation format and that adds the correction value to the original data, if the addition result of the original data and the correction value is smaller than the minimum value that can be expressed by the bit string. Is generated, and the maximum value is generated when it is larger than the maximum value that can be represented by the bit string.

【0019】[0019]

【作用】上記のような構成を有する本発明の作用は以下
の通りである。すなわち、請求項1記載の発明では、パ
ターンメモリに格納された元データにおける任意の2点
の画素に対する補正値をユーザが決定する。補正値算出
手段は、当該2点の補正値に基づいて、当該2点を結ぶ
直線上の画素に対する補正値の値を決定する。以上のよ
うに決定された補正値は、加算手段によって元データに
加算され、シェーディング処理が施される。
The operation of the present invention having the above construction is as follows. That is, according to the first aspect of the present invention, the user determines the correction value for any two points of pixels in the original data stored in the pattern memory. The correction value calculation means determines the value of the correction value for the pixel on the straight line connecting the two points, based on the correction values of the two points. The correction value determined as described above is added to the original data by the adding means, and the shading processing is performed.

【0020】請求項2記載の発明では、上記のように任
意の2点間の補正値を決定する際に、当該2点の補正値
をディジタル微分解析機である補正値算出手段に入力す
る。そして、2点の補正値を所定の関数に代入すること
により、2点を結ぶ直線上の画素に対する補正値が算出
される。
According to the second aspect of the invention, when the correction value between any two points is determined as described above, the correction values of the two points are input to the correction value calculating means which is a digital differential analyzer. Then, the correction values for the pixels on the straight line connecting the two points are calculated by substituting the correction values for the two points into the predetermined function.

【0021】請求項3記載の発明では、加算回路による
元データと補正値との加算結果が、所定の数のビット列
で表現可能な最小値よりも小さい場合には、飽和処理回
路によって前記最小値を出力する。そして、加算回路に
よる元データと補正値との加算結果が、所定の数のビッ
ト列で表現可能な最大値よりも大きい場合には、飽和処
理回路によって前記最大値を出力する。したがって、加
算結果がどのような値であっても、表示可能な最大値及
び最小値の限度内でシェーディングされたスプライトデ
ータが生成される。
According to another aspect of the present invention, when the addition result of the original data and the correction value by the addition circuit is smaller than the minimum value that can be expressed by a predetermined number of bit strings, the saturation processing circuit performs the minimum value. Is output. Then, when the addition result of the original data and the correction value by the addition circuit is larger than the maximum value that can be expressed by a predetermined number of bit strings, the saturation processing circuit outputs the maximum value. Therefore, regardless of the value of the addition result, the sprite data shaded within the limit of the maximum and minimum values that can be displayed is generated.

【0022】請求項4記載の発明では、加算回路による
加算結果が所定の数のビット列で表現可能な最小値より
も小さい場合には、オーバーフロー・アンダーフロー処
理回路からアンダーフロー信号が出力される。加算結果
が所定の数のビット列で表現可能な最大値よりも大きい
場合には、オーバーフロー・アンダーフロー処理回路か
らオーバーフロー信号が出力される。
According to the fourth aspect of the invention, when the addition result of the adder circuit is smaller than the minimum value that can be expressed by a predetermined number of bit strings, the overflow / underflow processing circuit outputs an underflow signal. When the addition result is larger than the maximum value that can be represented by a predetermined number of bit strings, the overflow / underflow processing circuit outputs an overflow signal.

【0023】オーバーフロー処理回路にオーバーフロー
信号が入力された場合には、ビット列における全てのビ
ットを1として出力し、オーバーフロー信号が入力され
ない場合には加算結果のビット列がそのまま出力され
る。アンダーフロー処理回路にアンダーフロー信号が入
力された場合にはビット列における全ビットを0として
出力し、アンダーフロー信号が入力されない場合には、
加算結果のビット列がそのまま出力される。したがっ
て、加算結果がビット列の表現限界を越える場合であっ
ても、ビット列によって表現可能な値に修正された補正
値が生成される。
When the overflow signal is input to the overflow processing circuit, all bits in the bit string are output as 1, and when the overflow signal is not input, the bit string of the addition result is output as it is. When an underflow signal is input to the underflow processing circuit, all bits in the bit string are output as 0, and when an underflow signal is not input,
The bit string of the addition result is output as it is. Therefore, even if the addition result exceeds the expression limit of the bit string, a correction value corrected to a value that can be expressed by the bit string is generated.

【0024】請求項5記載の発明では、元データにおけ
る任意の2点の画素に対する補正値がユーザにより決定
される。次に、当該2点の補正値に基づいて、当該2点
を結ぶ直線上の画素に対する補正値の値が決定される。
以上のように決定された補正値を元データに加算し、シ
ェーディング処理が行われる。
According to the invention of claim 5, the correction values for pixels at arbitrary two points in the original data are determined by the user. Next, the value of the correction value for the pixel on the straight line connecting the two points is determined based on the correction values of the two points.
The correction value determined as described above is added to the original data, and shading processing is performed.

【0025】請求項6記載の発明では、元データと補正
値との加算結果が、所定の数のビット列で表現可能な最
小値よりも小さい場合には、前記最小値が生成される。
そして、元データと補正値との加算結果が、所定の数の
ビット列で表現可能な最大値よりも大きい場合には、前
記最大値が生成される。したがって、加算結果がどのよ
うな値であっても、所定の数のビット列で表現可能な最
大値及び最小値の限度内でシェーディングされたスプラ
イトデータが生成される。
According to the sixth aspect of the invention, when the addition result of the original data and the correction value is smaller than the minimum value that can be represented by a predetermined number of bit strings, the minimum value is generated.
Then, when the addition result of the original data and the correction value is larger than the maximum value that can be represented by a predetermined number of bit strings, the maximum value is generated. Therefore, no matter what value the addition result is, sprite data shaded within the limits of the maximum value and the minimum value that can be represented by a predetermined number of bit strings is generated.

【0026】[0026]

【実施例】請求項1〜請求項6記載の本発明に対応する
一実施例を、図面にしたがって以下に説明する。なお、
請求項に記載された各手段は、全て所定のICチップ上
に実現された回路である。また、以下に示す数値表現の
うち、末尾にHが付されたものは、16進数であること
を示す。そして、スプライトデータは符号無しの5ビッ
トで表現されるRGB信号によって構成され、RGBは
それぞれ00H〜1FHまでの値をとり得るので、20
H以上の値は表現不可能で表示できないものとする。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment corresponding to the present invention described in claims 1 to 6 will be described below with reference to the drawings. In addition,
Each means described in the claims is a circuit realized on a predetermined IC chip. Further, among the numerical expressions shown below, the ones with H added at the end indicate that they are hexadecimal numbers. The sprite data is composed of RGB signals represented by 5 bits without a sign, and RGB can take values from 00H to 1FH, respectively.
Values above H are not expressible and cannot be displayed.

【0027】(1)実施例の構成 まず、本実施例の構成を以下に説明する。すなわち、本
実施例は、図1に示すように、パターンメモリ1、読み
出し回路2、補正値発生回路3、飽和処理回路4、フレ
ームメモリ5、補正値算出回路6および描画コマンド発
生回路7を備えている。パターンメモリ1はスプライト
の元データを格納したものであり、読み出し回路2に接
続されている。読み出し回路2は飽和処理回路3を介し
てフレームメモリ5に接続されている。読み出し回路2
は、パターンメモリ5から元データを読み出して、1ド
ット分づつ飽和処理回路4へデータを転送するものであ
る。
(1) Structure of the Embodiment First, the structure of this embodiment will be described below. That is, this embodiment includes a pattern memory 1, a read circuit 2, a correction value generation circuit 3, a saturation processing circuit 4, a frame memory 5, a correction value calculation circuit 6 and a drawing command generation circuit 7, as shown in FIG. ing. The pattern memory 1 stores original data of sprite and is connected to the reading circuit 2. The reading circuit 2 is connected to the frame memory 5 via the saturation processing circuit 3. Readout circuit 2
Is to read original data from the pattern memory 5 and transfer the data to the saturation processing circuit 4 for each dot.

【0028】補正値発生回路3は、R成分発生部3a、
G成分発生部3b、B成分発生部3cに分かれ、読み出
し回路2に接続されている。R成分発生部3a、G成分
発生部3b、B成分発生部3cは、それぞれR成分
(赤)、G成分(緑)、B成分(青)の補正値を発生す
るものであり、補正値算出回路6を介して飽和処理回路
4に接続されている。R成分発生部3a、G成分発生部
3b、B成分発生部3cは、それぞれR成分(赤)、G
成分(緑)、B成分(青)の補正値を発生するものであ
る。発生するデータは符号付きの5ビットで−10H〜
+0FHまでの範囲の値をとり得る。なお、ここでは5
ビットのデータで正、負の数を統一的に扱うために、負
の数を表すのに補数表現を用いている。したがって、補
正値における5ビットの最上位ビットが1の場合には負
の値となり、5ビットの最上位ビットが0の場合には0
または正の値となる。
The correction value generating circuit 3 includes an R component generating section 3a,
It is divided into a G component generating section 3b and a B component generating section 3c, which are connected to the reading circuit 2. The R component generation unit 3a, the G component generation unit 3b, and the B component generation unit 3c generate correction values for the R component (red), G component (green), and B component (blue), respectively, and calculate the correction value. It is connected to the saturation processing circuit 4 via the circuit 6. The R component generation unit 3a, the G component generation unit 3b, and the B component generation unit 3c respectively include an R component (red) and a G component.
The correction values of the component (green) and the B component (blue) are generated. The generated data is 5 bits with a sign of -10H ~
Values in the range up to + 0FH are possible. Here, 5
In order to handle positive and negative numbers uniformly in bit data, complement expression is used to represent negative numbers. Therefore, when the 5 most significant bits in the correction value are 1, it becomes a negative value, and when the 5 most significant bits are 0, it becomes 0.
Or a positive value.

【0029】補正値算出回路6は、ディジタル回路によ
ってディジタル微分解析機(DDA:Digital
Differential Analyzer)を実現
したものであり、スプライトの各頂点の輝度に基づい
て、2つの頂点間の輝度の変化量を算出するものであ
る。たとえば、矩形のスプライトの各頂点をa,b,
c,dとすると、a−b間、b−c間、c−d間、d−
a間の画素データの輝度の変化量を求める機能を有す
る。
The correction value calculation circuit 6 is a digital differential analyzer (DDA: Digital) using a digital circuit.
Differentiation Analyzer) is realized, and the amount of change in luminance between two vertices is calculated based on the luminance of each vertex of the sprite. For example, let each vertex of a rectangular sprite be a, b,
c and d, ab, bc, cd, d-
It has a function of obtaining the amount of change in the luminance of the pixel data between a.

【0030】飽和処理回路4はR成分飽和処理回路4
a、G成分飽和処理回路4b、B成分飽和処理回路4c
に分かれ、それぞれ補正値発生回路3のR成分発生部3
a、G成分発生部3b、B成分発生部3cに対応してい
る。各飽和処理回路4a,4b,4cには、加算回路
8、オーバーフロー・アンダーフロー信号発生回路9、
オーバーフロー処理回路10、アンダーフロー処理回路
11が構成されている。加算回路8は、図2に示すよう
に、元データの各成分に、これに対応する補正値を加算
して和(S)を算出するとともに、キャリー信号(C
R)を出力する機能を有する。補正値は符号付き5ビッ
トであるが、この加算では符号無し5ビットとして演算
する。CRの値は、上記のSが20H以上の値の時に1
となり、それ以外の値の時は0となるように設定されて
いる。
The saturation processing circuit 4 is an R component saturation processing circuit 4.
a, G component saturation processing circuit 4b, B component saturation processing circuit 4c
R component generator 3 of correction value generator 3
It corresponds to the a, G component generator 3b and B component generator 3c. Each saturation processing circuit 4a, 4b, 4c includes an adding circuit 8, an overflow / underflow signal generating circuit 9,
An overflow processing circuit 10 and an underflow processing circuit 11 are configured. As shown in FIG. 2, the adder circuit 8 adds a correction value corresponding to each component of the original data to calculate a sum (S), and also a carry signal (C
R) is output. The correction value is 5 bits with a sign, but in this addition, it is calculated as 5 bits without a sign. The CR value is 1 when the above S is 20H or more.
And is set to 0 for other values.

【0031】オーバーフロー・アンダーフロー信号発生
回路9は、図3に示すように、二つのNOT回路、一つ
のAND回路および一つのNAND回路によって構成さ
れた論理回路であり、以下のような機能を持つ。すなわ
ち、図4の組み合わせ表に示すように、CRが1で補正
値の最上位ビットが0つまり補正値が正の値の時、オー
バーフローとなるので、オーバーフロー信号として1の
値を出力する。また、CRが0で補正値の最上位ビット
が1つまり補正値が負の値の時、アンダーフローとなる
ので、アンダーフロー信号として0の値を出力する。上
記以外の場合には、オーバーフロー信号は0、アンダー
フロー信号は1が出力される。したがって、オーバーフ
ロー・アンダーフロー信号発生回路9からの出力は、オ
ーバーフロー信号が1かつアンダーフロー信号が0とな
ることはない。
As shown in FIG. 3, the overflow / underflow signal generating circuit 9 is a logic circuit composed of two NOT circuits, one AND circuit and one NAND circuit, and has the following functions. . That is, as shown in the combination table of FIG. 4, when CR is 1 and the most significant bit of the correction value is 0, that is, when the correction value is a positive value, an overflow occurs, so a value of 1 is output as the overflow signal. Further, when CR is 0 and the most significant bit of the correction value is 1, that is, when the correction value is a negative value, underflow occurs, so a value of 0 is output as the underflow signal. In cases other than the above, 0 is output as the overflow signal and 1 is output as the underflow signal. Therefore, in the output from the overflow / underflow signal generation circuit 9, the overflow signal is never 1 and the underflow signal is never 0.

【0032】オーバーフロー処理回路10は、図5に示
すように、5ビットデータの各ビットごとに対応した五
つのOR回路によって構成されている。したがって、オ
ーバーフロー処理回路10は、オーバーフロー信号の値
が0の時、加算結果のSの値をそのままR0〜R4に出
力し、オーバーフロー信号が1の時、R0〜R4の全ビ
ットを強制的に1にセットする。
As shown in FIG. 5, the overflow processing circuit 10 is composed of five OR circuits corresponding to each bit of 5-bit data. Therefore, when the overflow signal value is 0, the overflow processing circuit 10 outputs the S value of the addition result as it is to R0 to R4, and when the overflow signal is 1, all bits of R0 to R4 are forced to 1 Set to.

【0033】アンダーフロー処理回路11は、5ビット
データの各ビットごとに対応した五つのAND回路によ
って構成されている。したがって、アンダーフロー信号
が0の時、R0〜R4の全ビットを強制的に0にセット
し、アンダーフロー信号が1の時、加算結果のSの値で
あるR0〜R4をそのままフレームメモリ5へのライト
データW0〜W4として出力する。以上のように、W0
〜W4の値は、オーバーフローがあった場合には全ビッ
ト1となり、アンダーフローがあった場合には全ビット
0となり、それ以外の場合には、加算結果Sと同じ値と
なる。このような演算結果の一例を図6に示す。
The underflow processing circuit 11 is composed of five AND circuits corresponding to each bit of 5-bit data. Therefore, when the underflow signal is 0, all bits of R0 to R4 are forcibly set to 0, and when the underflow signal is 1, R0 to R4, which is the S value of the addition result, is directly stored in the frame memory 5. Of the write data W0 to W4. As described above, W0
The values of to W4 are all 1s when there is an overflow, all 0s when there is an underflow, and otherwise have the same value as the addition result S. An example of such a calculation result is shown in FIG.

【0034】さらに、フレームメモリ5は、飽和処理回
路4とディスプレイ(図示せず)との間に介在するメモ
リであり、所定の領域に飽和処理回路4からのライトデ
ータが書き込まれ、書き込まれたデータをディスプレイ
に出力するものである。書き込み領域は、描画コマンド
発生回路7によって指定される。
Further, the frame memory 5 is a memory interposed between the saturation processing circuit 4 and a display (not shown), and the write data from the saturation processing circuit 4 is written and written in a predetermined area. It outputs data to the display. The writing area is designated by the drawing command generating circuit 7.

【0035】(2)実施例の作用 以上のような構成を有する本実施例の作用を以下に説明
する。なお、説明の簡略化のために、元データとフレー
ムメモリ5に描画されるライトデータを以下のような単
純な図形とする。すなわち、図7(A),(B)に示す
ように、元データおよびライトデータは横Hドット、縦
Vドットの矩形とし、三色で構成されているものとす
る。また、元データはフレームメモリに拡大や縮小なく
等倍にコピーされるものとする。元データの頂点はa,
b,c,dとし、フレームメモリに描画されるライトデ
ータの頂点はa´,b´,c´,d´とする。ライトデ
ータの描画は頂点aから頂点bに向かって元データを読
み出し、フレームメモリのa´からb´の方向に1ドッ
トずつ描画する。この操作をライン描画と呼ぶ。ライン
描画は、ラインの端点である辺a−dから辺b−cま
で、そして辺a´−d´から辺b´−c´まで、1ドッ
トづつ図の下方向に移動させ、繰り返される。以上のよ
うな操作を頂点d,cおよび頂点d´,c´で終了させ
れば、スプライト1個分の描画が終りとなる。
(2) Operation of the Embodiment The operation of this embodiment having the above-mentioned structure will be described below. In order to simplify the description, the original data and the write data drawn in the frame memory 5 are simple figures as follows. That is, as shown in FIGS. 7A and 7B, it is assumed that the original data and the write data are rectangular with horizontal H dots and vertical V dots, and are composed of three colors. Also, the original data shall be copied to the frame memory at the same size without enlargement or reduction. The apex of the original data is a,
b, c, d, and the vertices of the write data drawn in the frame memory are a ', b', c ', d'. To draw the write data, the original data is read from the vertex a to the vertex b, and one dot is drawn in the direction from a'to b'of the frame memory. This operation is called line drawing. The line drawing is repeated by moving one dot downward in the figure from the side a-d to the side bc, which is the end point of the line, and from the side a'-d 'to the side b'-c'. If the above operation is completed at the vertices d and c and the vertices d ′ and c ′, the drawing for one sprite is completed.

【0036】元データもライトデータもRGBデータ
で、RGB各成分の値は、上記のように00H〜1FH
の値をとる。補正値は上記のように−10H〜+0FH
の値をとり、負の値は元データを描画する際、輝度を下
げるというデータ加工をし、正の値は輝度を上げるとい
う役割をする。元データも補正値もR,G,B各成分が
同じ値であるグレイコードとする。
Both the original data and the write data are RGB data, and the values of the RGB components are 00H to 1FH as described above.
Takes the value of. The correction value is -10H to + 0FH as described above.
Takes a value, and a negative value plays a role of reducing the brightness when drawing the original data, and a positive value plays a role of increasing the brightness. Both the original data and the correction value are gray codes in which the R, G, and B components have the same value.

【0037】以上の設定を前提として、本実施例の作用
を処理手順を示す図8のフローチャートにしたがって以
下に説明する。まず、パターンメモリ1から読み出し回
路2によって元データが読み出される(ステップ70
1)。図9に示すように、ユーザは元データの頂点a,
b,c,dの4点のそれぞれのR,G,B各成分別の補
正値を決定し、補正値発生回路3から出力する(ステッ
プ702)。
Given the above settings, the operation of this embodiment will be described below with reference to the flowchart of FIG. 8 showing the processing procedure. First, the original data is read from the pattern memory 1 by the read circuit 2 (step 70).
1). As shown in FIG. 9, the user selects the vertex a of the original data,
The correction values for the respective R, G, B components of the four points b, c, d are determined and output from the correction value generation circuit 3 (step 702).

【0038】次に、補正値算出回路6(DDA)によっ
て、a−d間およびb−c間の各RGBデータに対し
て、RGBそれぞれの補正値を求める。これは、補正値
をy座標、ディスプレイ画面上の位置をx座標とするグ
ラフに基づいて行われる。たとえば、図10に示すよう
に、グラフ上にa,bの2点の補正値および位置に基づ
いて、座標上にP,Qの2点またはV,Dの2点を与え
ることができる。すると、前記2点を結ぶ直線グラフ
(比例関数)におけるyの値によって、a−b間の各R
GBデータの補正値が求められる。以上と同様に、図1
1に示すように、b−c間についても補正値を求める
(ステップ703)。さらに、図12に示すように、補
正値算出回路6によって、上記と同様にH方向の任意の
横1ラインの端部(e−fとする)の補正値を、V方向
に順に求める(ステップ704)。
Next, the correction value calculation circuit 6 (DDA) obtains RGB correction values for each of the RGB data between a and d and between b and c. This is performed based on a graph in which the correction value is the y coordinate and the position on the display screen is the x coordinate. For example, as shown in FIG. 10, two points P and Q or two points V and D can be given on the coordinate based on the correction values and the positions of the two points a and b on the graph. Then, according to the value of y in the straight line graph (proportional function) connecting the two points, each R between a and b is
A correction value for GB data is obtained. Similar to the above, FIG.
As shown in FIG. 1, a correction value is also obtained between bc (step 703). Further, as shown in FIG. 12, the correction value calculating circuit 6 similarly obtains the correction value of the end portion (e-f) of an arbitrary horizontal line in the H direction in the V direction in the same manner as described above (step 704).

【0039】以上のように元データの全てのドットに対
する補正値が算出される(図13に示す)と、加算回路
において元データに補正値が加算される(ステップ70
5)。同時に、加算回路8において、加算結果Sが20
H以上か否かが判断され、20H以上の場合には、キャ
リー信号CRとして1を出力し、それ以外の場合には0
を出力する(ステップ706)。オーバーフロー・アン
ダーフロー信号発生回路10では、CRが1の時、補正
値の最上位ビットが0つまり補正値が正の値であるか否
かが判断され(ステップ707)、正の時にはオーバー
フロー信号として1を出力する(ステップ708)。ま
た、CRが0の時、補正値の最上位ビットが1つまり補
正値が負の値であるか否かが判断され(ステップ70
9)、負の場合にはアンダーフロー信号として0を出力
する(ステップ710)。
When the correction values for all the dots of the original data are calculated as shown above (shown in FIG. 13), the correction values are added to the original data in the adder circuit (step 70).
5). At the same time, in the adder circuit 8, the addition result S is 20
It is determined whether or not it is H or more. If it is 20H or more, 1 is output as the carry signal CR, and 0 otherwise.
Is output (step 706). In the overflow / underflow signal generation circuit 10, when CR is 1, it is determined whether the most significant bit of the correction value is 0, that is, the correction value is a positive value (step 707). 1 is output (step 708). When CR is 0, it is determined whether the most significant bit of the correction value is 1, that is, the correction value is a negative value (step 70).
9) If it is negative, 0 is output as an underflow signal (step 710).

【0040】オーバーフロー処理回路10においては、
オーバーフロー信号が0のとき、加算結果Sがそのまま
R0〜R4に出力される(ステップ711)。オーバー
フロー信号が1のとき、Sは強制的に全ビットが1にセ
ットされる(ステップ712)。アンダーフロー処理回
路11においては、アンダーフロー信号が0のとき、R
0〜R4は強制的に全ビットが0にセットされる(ステ
ップ713)。アンダーフロー信号が1のとき、R0〜
R4がそのままライトデータとして出力される(ステッ
プ711)。
In the overflow processing circuit 10,
When the overflow signal is 0, the addition result S is directly output to R0 to R4 (step 711). When the overflow signal is 1, all bits of S are forced to 1 (step 712). In the underflow processing circuit 11, when the underflow signal is 0, R
All bits of 0 to R4 are forcibly set to 0 (step 713). When the underflow signal is 1, R0-
R4 is directly output as write data (step 711).

【0041】以上のような作業を繰り返すことによって
作成されたライトデータは、図14に示すように、フレ
ームメモリ5における描画コマンド発生回路7によって
指定された領域に書き込まれる(ステップ714)。こ
のライトデータが、フレームメモリ5からスプライトデ
ータとしてディスプレイに出力されることによって、図
14に示すように、スムースシェーディングが施された
スプライト画面がディスプレイに表示される(ステップ
715)。
The write data created by repeating the above work is written in the area designated by the drawing command generating circuit 7 in the frame memory 5, as shown in FIG. 14 (step 714). By outputting this write data from the frame memory 5 to the display as sprite data, a sprite screen with smooth shading is displayed on the display as shown in FIG. 14 (step 715).

【0042】(3)実施例の効果 以上のような本発明の効果は、以下の通りである。すな
わち、補正値を決定する際に、補正値算出回路6を用い
ることによって、スプライトの元データの頂点における
RGBデータの補正値を設定するだけで、他の全ての点
におけるRGBデータの補正値を決定できる。したがっ
て、補正値の決定が容易となる。また、補正値算出回路
6としてディジタル微分解析機を用いているので、所定
の関数によって、任意の頂点間の補正値を迅速に決定す
ることができる。
(3) Effects of Embodiments The effects of the present invention as described above are as follows. That is, when the correction value is determined, the correction value calculation circuit 6 is used to set the correction values of the RGB data at the vertices of the original data of the sprite, and the correction values of the RGB data at all other points are set. I can decide. Therefore, the correction value can be easily determined. Further, since the digital differential analyzer is used as the correction value calculation circuit 6, the correction value between arbitrary vertices can be quickly determined by a predetermined function.

【0043】そして、元データに補正値を加算したとき
に、オーバーフローやアンダーフローが発生しても、飽
和処理回路4によって飽和処理が施されて表示可能な値
に修正されるので、ディスプレイ表示に支障をきたすこ
とはない。さらに、オーバーフローまたはアンダーフロ
ーが発生した場合には、その程度にかかわらず、オーバ
ーフロー・アンダーフロー信号発生回路9、オーバーフ
ロー処理回路10およびアンダーフロー処理回路11に
よって強制的に全ビットが1または全ビットが0になる
ので、迅速な飽和処理を実現できる。
Even if overflow or underflow occurs when the correction value is added to the original data, the saturation processing circuit 4 performs saturation processing to correct the value so that it can be displayed. It will not cause any problems. Further, when overflow or underflow occurs, all bits are forcibly set to 1 or all bits by the overflow / underflow signal generation circuit 9, the overflow processing circuit 10, and the underflow processing circuit 11 regardless of the degree of the overflow or underflow. Since it becomes 0, rapid saturation processing can be realized.

【0044】(4)その他の実施例 本発明は、以上のような実施例に限定されるものではな
く、各部のデータ処理の内容は適宜変更可能である。す
なわち、上記実施例においては、各画素におけるRGB
の値が等しい値として処理を行っていたが、個々のピク
セルのRGBの値を別の値にしてそれぞれ輝度を変化さ
せれば、色相を変えることも可能となる。また、上記実
施例においては画素データを5ビットによって表現して
いたが、このビット数は5に限定されるものではなく、
明るさや色相の変化をより複雑にしたい場合には5以上
であってもよく、より単順にしたい場合には5以下であ
ってもよい。さらに、上記実施例においてはフレームデ
ータは元データの等倍でコピーされたが、縮小、拡大ま
たは変形されてコピーされる場合であっても、本発明を
適用できる。
(4) Other Embodiments The present invention is not limited to the above embodiments, and the contents of data processing of each part can be changed as appropriate. That is, in the above embodiment, RGB in each pixel is
However, if the luminance of each pixel is changed to a different value, the hue can be changed. In addition, although the pixel data is represented by 5 bits in the above embodiment, the number of bits is not limited to 5,
It may be 5 or more if it is desired to make the change in brightness or hue more complicated, and may be 5 or less if it is desired to make it more singular. Furthermore, although the frame data is copied at the same size as the original data in the above embodiment, the present invention can be applied even when the frame data is copied after being reduced, enlarged or modified.

【0045】また、上記実施例においては補正値算出回
路において2頂点間の補正値を求める際に、直線よって
結ばれる比例関数のグラフを用いたが、他の関数のグラ
フを用いれば2頂点間に多様な変化を与えることがで
き、微妙な表現が可能となる。
In the above embodiment, when the correction value calculation circuit calculates the correction value between two vertices, the graph of the proportional function connected by the straight line is used. A variety of changes can be given to, and subtle expressions are possible.

【0046】さらに、本実施例においてはスプライトに
対してのスムースシェーディングの例を示したが、本発
明は、例えば、2点間を結ぶ直線であるライン、ライン
を4本接続した四角形のポリライン、元絵の無い四角形
であるポリゴンに対しても、シェーディングを施すこと
ができる。
Further, although an example of smooth shading for a sprite is shown in the present embodiment, the present invention, for example, is a line which is a straight line connecting two points, a quadrilateral polyline in which four lines are connected, Shading can be applied to a polygon that is a quadrangle without an original picture.

【0047】[0047]

【発明の効果】以上のような本発明の効果は以下の通り
である。すなわち、補正値算出手段を備えたことによっ
て、元データに対する補正値の決定を容易に行うことが
可能な画像パターンに対するシェーディング装置を提供
することができる。
The effects of the present invention as described above are as follows. That is, by providing the correction value calculation means, it is possible to provide a shading device for an image pattern that can easily determine a correction value for original data.

【0048】補正値算出回路としてディジタル微分解析
機を用いたことによって、元データに対する補正値の決
定を迅速に行うことが可能な画像パターンに対するシェ
ーディング装置を提供することができる。
By using a digital differential analyzer as the correction value calculation circuit, it is possible to provide a shading device for an image pattern which can quickly determine a correction value for original data.

【0049】飽和処理手段を備えたことによって、アン
ダーフローやオーバーフローが発生した場合であって
も、ディスプレイ表示可能な画像データを生成可能な画
像パターンに対するシェーディング装置を提供すること
ができる。
By providing the saturation processing means, it is possible to provide a shading device for an image pattern capable of generating image data that can be displayed on a display even when an underflow or an overflow occurs.

【0050】飽和処理手段にオーバーフロー・アンダー
フロー信号発生回路、オーバーフロー処理回路およびア
ンダーフロー処理回路を備えたことによって、アンダー
フロー処理やオーバーフロー処理を迅速に行うことが可
能な画像パターンに対するシェーディング装置を提供す
ることができる。
By providing the saturation processing means with an overflow / underflow signal generating circuit, an overflow processing circuit and an underflow processing circuit, a shading device for an image pattern capable of rapidly performing underflow processing and overflow processing is provided. can do.

【0051】ユーザにより決定され2点の補正値に基づ
いて、当該2点を結ぶ直線上の画素に対する補正値の値
を決定するので、元データに対する補正値の決定を容易
に行うことが可能な画像パターンに対するシェーディン
グ方法を提供することができる。
Since the value of the correction value for the pixel on the straight line connecting the two points is determined based on the correction value of the two points determined by the user, it is possible to easily determine the correction value for the original data. A shading method for an image pattern can be provided.

【0052】アンダーフローの場合にはディスプレイ表
示可能な最小値、オーバーフローが発生した場合にはデ
ィスプレイ表示可能な最大値が生成されるので、元デー
タと補正値との加算結果がどの様な値であっても、ディ
スプレイ表示可能な画像データを生成できる画像パター
ンに対するすシェーディング方法を提供することができ
る。
In the case of underflow, the minimum value that can be displayed on the display is generated, and when the overflow occurs, the maximum value that can be displayed on the display is generated, so what value is the addition result of the original data and the correction value? Even so, it is possible to provide a so-called shading method for an image pattern that can generate image data that can be displayed on a display.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の画像パターンに対するシェーディング
装置の一実施例を示す回路ブロック図である。
FIG. 1 is a circuit block diagram showing an embodiment of a shading device for an image pattern of the present invention.

【図2】図1の実施例における加算回路を示す回路ブロ
ック図である。
FIG. 2 is a circuit block diagram showing an adder circuit in the embodiment of FIG.

【図3】図1の実施例におけるオーバーフロー・アンダ
ーフロー信号発生回路を示す回路ブロック図である。
FIG. 3 is a circuit block diagram showing an overflow / underflow signal generation circuit in the embodiment of FIG.

【図4】図1の実施例におけるCRとオーバーフロー信
号およびアンダーフロー信号との組み合わせを示す表で
ある。
FIG. 4 is a table showing combinations of CR and overflow signals and underflow signals in the embodiment of FIG.

【図5】図1の実施例におけるオーバーフロー処理回路
およびアンダーフロー処理回路を示す回路ブロック図で
ある。
5 is a circuit block diagram showing an overflow processing circuit and an underflow processing circuit in the embodiment of FIG.

【図6】図1の実施例において、元データに補正値を加
え飽和処理を施したデータ値の例を示す図である。
FIG. 6 is a diagram showing an example of a data value obtained by performing a saturation process by adding a correction value to the original data in the embodiment of FIG.

【図7】図1の実施例に用いるスプライトの一例を示す
図であり、(A)は元データ、(B)はライトデータで
ある。
FIG. 7 is a diagram showing an example of a sprite used in the embodiment of FIG. 1, where (A) is original data and (B) is write data.

【図8】図1の実施例の処理の流れを示すフローチャー
トである。
FIG. 8 is a flowchart showing a processing flow of the embodiment of FIG.

【図9】図7のスプライトの4頂点に対する補正値の一
例を示す図である。
9 is a diagram showing an example of correction values for the four vertices of the sprite of FIG.

【図10】図1の実施例における補正値算出手段に用い
る関数グラフの一例を示す図である。
10 is a diagram showing an example of a function graph used in the correction value calculating means in the embodiment of FIG.

【図11】図9の補正値に基づいてスプライトの縦方向
の2頂点間の補正値を算出した例を示す図である。
11 is a diagram showing an example in which a correction value between two vertical vertices of a sprite is calculated based on the correction value of FIG.

【図12】図11の補正値に基づいてスプライトの横方
向の頂点間の補正値を算出した例を示す図である。
12 is a diagram showing an example of calculating a correction value between apexes of a sprite in the horizontal direction based on the correction value of FIG.

【図13】図7のスプライトに対する全ての補正値を算
出した例を示す図である。
13 is a diagram showing an example in which all correction values for the sprite of FIG. 7 are calculated.

【図14】図7のスプライトに対して図13の補正値を
加算した例を示す図である。
14 is a diagram showing an example in which the correction value of FIG. 13 is added to the sprite of FIG.

【図15】平面的なスプライトに対して本実施例により
シェーディングを施した例を示す図である。
FIG. 15 is a diagram showing an example in which a flat sprite is shaded according to the present embodiment.

【符号の説明】[Explanation of symbols]

1…パターンメモリ 2…読み出し回路 3…補正値発生回路 3a…R成分発生回路 3b…G成分発生回路 3c…B成分発生回路 4…飽和処理回路 4a…R成分飽和処理回路 4b…G成分飽和処理回路 4c…B成分飽和処理回路 5…フレームメモリ 6…補正値算出回路(DDA) 7…描画コマンド発生回路 8…加算回路 9…オーバーフロー・アンダーフロー信号発生回路 10…オーバーフロー処理回路 11…アンダーフロー発生回路 701以降…手順の各ステップ 1 ... Pattern memory 2 ... Reading circuit 3 ... Correction value generating circuit 3a ... R component generating circuit 3b ... G component generating circuit 3c ... B component generating circuit 4 ... Saturation processing circuit 4a ... R component saturation processing circuit 4b ... G component saturation processing Circuit 4c ... B component saturation processing circuit 5 ... Frame memory 6 ... Correction value calculation circuit (DDA) 7 ... Drawing command generation circuit 8 ... Addition circuit 9 ... Overflow / underflow signal generation circuit 10 ... Overflow processing circuit 11 ... Underflow generation Circuit 701 and later ... Each step of the procedure

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 画像パターンをディスプレイ装置の画面
に表示するための元データを格納したパターンメモリ
と、前記元データにおける輝度を画素ごとに変化させる
補正値を生成する補正値発生手段と、前記元データに前
記補正値を加算する加算手段とを有する画像パターンに
対するシェーディング装置において、 前記元データの任意の2点の画素に対する補正値に基づ
いて、当該2点を結ぶ直線上の画素に対する補正値を決
定する補正値算出手段を備えたことを特徴とする画像パ
ターンに対するシェーディング装置。
1. A pattern memory for storing original data for displaying an image pattern on a screen of a display device, a correction value generating means for generating a correction value for changing the luminance of the original data for each pixel, and the original data. In a shading device for an image pattern having an adding means for adding the correction value to data, a correction value for a pixel on a straight line connecting the two points is calculated based on a correction value for any two points of the original data. A shading device for an image pattern, comprising a correction value calculating means for determining.
【請求項2】 前記補正値算出手段は、ディジタル回路
によって構成されたディジタル微分解析機であることを
特徴とする請求項1記載の画像パターンに対するシェー
ディング装置。
2. The shading device for an image pattern according to claim 1, wherein the correction value calculation means is a digital differential analyzer configured by a digital circuit.
【請求項3】 画像パターンをディスプレイ装置の画面
に表示するための元データを所定の数のビット列の表現
形式で格納したパターンメモリと、前記元データにおけ
る輝度を画素ごとに変化させる補正値を前記ビット列の
表現形式で生成する補正値発生手段と、前記元データに
前記補正値を加算する加算手段とを有する画像パターン
に対するシェーディング装置において、 前記加算回路による前記元データと前記補正値との加算
結果が、前記ビット列で表現可能な最小値よりも小さい
場合には当該最小値を出力し、前記ビット列で表現可能
な最大値よりも大きい場合には当該最大値を出力する飽
和処理手段を備えたことを特徴とする画像パターンに対
するシェーディング装置。
3. A pattern memory in which original data for displaying an image pattern on a screen of a display device is stored in a representation format of a predetermined number of bit strings, and a correction value for changing the brightness of the original data for each pixel. In a shading device for an image pattern, which has a correction value generation unit that generates a bit string representation format and an addition unit that adds the correction value to the original data, a result of addition of the original data and the correction value by the addition circuit. Is provided with a saturation processing unit that outputs the minimum value when it is smaller than the minimum value that can be expressed by the bit string, and outputs the maximum value when it is larger than the maximum value that can be expressed by the bit string. A shading device for image patterns.
【請求項4】 前記飽和処理手段は、 前記加算回路による加算結果が前記ビット列で表現可能
な最小値よりも小さい場合にはアンダーフロー信号を生
成し、前記ビット列で表現可能な最大値よりも大きい場
合にはオーバーフロー信号を生成するオーバーフロー・
アンダーフロー信号発生回路と、 前記オーバーフロー信号が入力された場合にはビット列
における全てのビットを1として出力し、前記オーバー
フロー信号が入力されない場合には加算結果のビット列
をそのまま出力するオーバーフロー処理回路と、 前記アンダーフロー信号が入力された場合にはビット列
における全てのビットを0として出力し、前記アンダー
フロー信号が入力されない場合には加算結果のビット列
をそのまま出力するアンダーフロー処理回路とを備えた
ことを特徴とする請求項3記載の画像パターンに対する
シェーディング装置。
4. The saturation processing means generates an underflow signal when the addition result of the adding circuit is smaller than the minimum value that can be expressed by the bit string, and is larger than the maximum value that can be expressed by the bit string. Overflow generating an overflow signal in case
An underflow signal generation circuit, and an overflow processing circuit that outputs all the bits in the bit string as 1 when the overflow signal is input, and outputs the bit string of the addition result as it is when the overflow signal is not input, An underflow processing circuit that outputs all bits in the bit string as 0 when the underflow signal is input, and outputs the bit string of the addition result as it is when the underflow signal is not input. The shading device for an image pattern according to claim 3.
【請求項5】 画像パターンをディスプレイ装置の画面
に表示するための元データにおける輝度を、画素ごとに
変化させる補正値を生成し、前記元データに前記補正値
を加算する画像パターンに対するシェーディング方法に
おいて、 前記元データの任意の2点の画素に対する補正値に基づ
いて、当該2点を結ぶ直線上の画素に対する補正値を決
定することを特徴とする画像パターンに対するシェーデ
ィング方法。
5. A shading method for an image pattern, which generates a correction value for changing the brightness of original data for displaying an image pattern on a screen of a display device for each pixel and adds the correction value to the original data. A shading method for an image pattern, wherein a correction value for pixels on a straight line connecting the two points is determined based on correction values for pixels at arbitrary two points of the original data.
【請求項6】 画像パターンをディスプレイ装置の画面
に表示するための元データを所定の数のビット列で表現
し、前記元データにおける輝度を画素ごとに変化させる
補正値を前記ビット列の表現形式で生成し、前記元デー
タに前記補正値を加算する画像パターンに対するシェー
ディング方法において、 前記元データと前記補正値との加算結果が、前記ビット
列で表現可能な最小値よりも小さい場合には当該最小値
を生成し、 前記ビット列で表現可能な最大値よりも大きい場合には
当該最大値を生成することを特徴とする画像パターンに
対するシェーディング方法。
6. The original data for displaying an image pattern on a screen of a display device is expressed by a predetermined number of bit strings, and a correction value for changing the brightness of the original data for each pixel is generated in the bit string expression format. Then, in the shading method for the image pattern in which the correction value is added to the original data, when the addition result of the original data and the correction value is smaller than the minimum value that can be expressed by the bit string, the minimum value is set. A shading method for an image pattern, which is characterized by generating the maximum value and generating the maximum value when the maximum value is larger than the maximum value that can be expressed by the bit string.
JP24584594A 1994-10-12 1994-10-12 Device and method for shading picture pattern Withdrawn JPH08110957A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP24584594A JPH08110957A (en) 1994-10-12 1994-10-12 Device and method for shading picture pattern
TW083110104A TW345652B (en) 1994-10-12 1994-11-02 Device and method for shading picture pattern

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24584594A JPH08110957A (en) 1994-10-12 1994-10-12 Device and method for shading picture pattern

Publications (1)

Publication Number Publication Date
JPH08110957A true JPH08110957A (en) 1996-04-30

Family

ID=17139708

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24584594A Withdrawn JPH08110957A (en) 1994-10-12 1994-10-12 Device and method for shading picture pattern

Country Status (2)

Country Link
JP (1) JPH08110957A (en)
TW (1) TW345652B (en)

Also Published As

Publication number Publication date
TW345652B (en) 1998-11-21

Similar Documents

Publication Publication Date Title
JP3578498B2 (en) Image information processing device
JP2923648B2 (en) Method and apparatus for generating color characteristics of an object
US5388192A (en) Image layout processing method and apparatus
US5467442A (en) Image processing apparatus
US7362339B2 (en) Image processing method and apparatus
US7212215B2 (en) Apparatus and method for rendering an antialiased image
JP2005077522A (en) Image processor and image processing method
KR100273786B1 (en) Image processing apparatus
KR20040011525A (en) Drawing method
JP3352458B2 (en) Graphic Coloring Method for Graphic Display System
JP3548642B2 (en) Image information generating apparatus and method, image information processing apparatus and method, and recording medium
JPH08110957A (en) Device and method for shading picture pattern
JPH11331700A (en) Image processing unit and image processing method
JP2003051023A (en) Device, method and program for plotting and computer readable recording medium with the same program recorded
JPS62217375A (en) Air brush processing system
JPH07117823B2 (en) Color display
JPH11296160A (en) Encoder and its method, graphic operation device
JPH10149431A (en) Picture processing method
JP2003187260A (en) Image rendering program, recording medium in which image rendering program is recorded, image rendering apparatus and method
JP3698747B2 (en) Image data generation method and image processing system
JP4048731B2 (en) Image data transfer apparatus and image display processing system
JP3680351B2 (en) Image control device
JP2647073B2 (en) Graphic display device
JP2674755B2 (en) Color drawing device
JP2004227338A (en) Device, method and program for processing image, and electronic device system

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20020115