[go: up one dir, main page]

JP2006127368A - Graphics rendering device with gamma correction function based on depth value - Google Patents

Graphics rendering device with gamma correction function based on depth value Download PDF

Info

Publication number
JP2006127368A
JP2006127368A JP2004317854A JP2004317854A JP2006127368A JP 2006127368 A JP2006127368 A JP 2006127368A JP 2004317854 A JP2004317854 A JP 2004317854A JP 2004317854 A JP2004317854 A JP 2004317854A JP 2006127368 A JP2006127368 A JP 2006127368A
Authority
JP
Japan
Prior art keywords
value
gamma correction
color
pixel
brightness
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.)
Pending
Application number
JP2004317854A
Other languages
Japanese (ja)
Inventor
Makoto Yamakura
誠 山倉
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2004317854A priority Critical patent/JP2006127368A/en
Publication of JP2006127368A publication Critical patent/JP2006127368A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Image Generation (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Abstract

【課題】より簡単に3次元的な明るさの調節を行うことのできるグラフィックス描画装置を安価に提供すること。従来の照度計算では演算コストが高く、高速に処理するためにはハードウェアリソースが増大してしまうという課題があった。また、光源の位置やマテリアルなどのパラメータの設定が煩雑で、ユーザーが手軽に明るさをプログラムするということが容易ではなく、明るさのプログラマブル性が低いという課題があった。
【解決手段】複数のガンマ補正曲線を設定するためのルックアップテーブルを備え、各画素の奥行き値(Z値)に応じて、前記ルックアップテーブルによりガンマ補正が適用された複数のカラー値のうちの1つを選択することにより、Z値に応じた明るさの調節を行う。
【選択図】図1
To provide a graphics drawing apparatus capable of adjusting three-dimensional brightness more easily at low cost. The conventional illuminance calculation has a problem that the calculation cost is high, and hardware resources are increased for high-speed processing. Further, setting parameters such as the position of the light source and the material is complicated, and it is not easy for the user to easily program the brightness, and there is a problem that the brightness is not programmable.
A lookup table for setting a plurality of gamma correction curves is provided, and a plurality of color values to which gamma correction is applied by the lookup table according to the depth value (Z value) of each pixel. By selecting one of these, the brightness is adjusted according to the Z value.
[Selection] Figure 1

Description

本発明は、コンピュータグラフィックス技術に関し、特に3次元グラフィックス描画において、従来よりも簡単な方法で、奥行き感のあるリアルな画像を生成するための技術に関する。   The present invention relates to a computer graphics technique, and more particularly to a technique for generating a real image with a sense of depth in a three-dimensional graphics drawing by a simpler method than before.

一般的な3次元グラフィックス描画では、仮想的な3次元空間内に配置された複数の多角形(ポリゴン)からなる複数のオブジェクトを、観測者の視線に垂直な2次元平面(スクリーン)上に投影することによって行われる。このとき、観測者から見てポリゴンの前後関係が正しくなるようにするために、ポリゴンの陰面消去が一般的に行われる。ポリゴンの陰面処理の方法としては、Zバッファ法が広く用いられている。Zバッファ法では、ディスプレイの画素数分のカラー値を格納するカラーバッファの他に、ディスプレイの画素数分の奥行き値(Z値)を格納するZバッファを用いる。Zバッファには、すでに描画済みの、視点から最も近い位置にあるオブジェクトのZ値を格納しておき、画素単位でこのZバッファのZ値と、これから描画しようとするポリゴンのZ値とを比較することによって、Z値が小さいポリゴンの画素だけを描画することにより陰面消去を行う。   In general three-dimensional graphics drawing, a plurality of objects composed of a plurality of polygons (polygons) arranged in a virtual three-dimensional space are placed on a two-dimensional plane (screen) perpendicular to the observer's line of sight. This is done by projecting. At this time, the hidden surface removal of the polygon is generally performed so that the context of the polygon is correct as viewed from the observer. The Z buffer method is widely used as a polygon hidden surface processing method. In the Z buffer method, a Z buffer that stores depth values (Z values) corresponding to the number of pixels of the display is used in addition to color buffers that store color values corresponding to the number of pixels of the display. The Z buffer stores the Z value of the object that has already been drawn and is closest to the viewpoint, and compares the Z value of this Z buffer with the Z value of the polygon to be drawn in pixel units. By doing so, the hidden surface removal is performed by drawing only the pixels of the polygon having a small Z value.

Zバッファを用いて3次元オブジェクトの陰面消去が行われる様子を、図2および図3を用いて説明する。図2(A)は3次元空間内に配置された2個のポリゴン201および202が、スクリーン200上に投影される様子を示している。ポリゴン203は、ポリゴン201がスクリーン200上に投影された図形を示しており、ポリゴン204は、ポリゴン202がスクリーン200上に投影された図形を示している。図2(B)は、Zバッファによる描画を示す図であって、図2(A)のスクリーン200上に表示された2個のポリゴン203および204が、ZバッファのZ値とポリゴンのZ値の比較によって、画素ごとに陰面消去しながら描画された結果を示している。図3は、Zバッファを用いて、より多くのポリゴンからなるオブジェクトの陰面消去を行った例である。図3(A)は、奥行きのある部屋オブジェクト301の中で、多数の細かいポリゴンからなる球状のオブジェクト302および303が宙に浮かんでいるシーンを描画する様子を示している。図3(B)は、スクリーン300上に投影された描画結果を示している。以上のように、Zバッファを用いることで、より複雑な3次元画像を生成することが可能である。   The manner in which hidden surface removal of a three-dimensional object is performed using a Z buffer will be described with reference to FIGS. FIG. 2A shows how two polygons 201 and 202 arranged in a three-dimensional space are projected on the screen 200. A polygon 203 indicates a figure in which the polygon 201 is projected on the screen 200, and a polygon 204 indicates a figure in which the polygon 202 is projected on the screen 200. FIG. 2B is a diagram showing drawing by the Z buffer, and the two polygons 203 and 204 displayed on the screen 200 of FIG. 2A are the Z buffer Z value and the polygon Z value. These results show the result of rendering while removing the hidden surface for each pixel. FIG. 3 is an example in which hidden surface removal of an object made up of more polygons is performed using a Z buffer. FIG. 3A shows a state in which a scene in which spherical objects 302 and 303 made of a large number of fine polygons are floating in a room object 301 having a depth is drawn. FIG. 3B shows a drawing result projected on the screen 300. As described above, a more complicated three-dimensional image can be generated by using the Z buffer.

しかしながら、単にZバッファを用いてポリゴンを陰面消去するだけでは、実写のようなリアル感を得ることは難しい。なぜなら、3次元空間内に配置されているオブジェクトの明るさの3次元的な広がりが考慮されていないからである。すなわち、ポリゴンの頂点や画素についているカラー値が見た目に不自然であるため、実写に比べてリアリティに欠けてしまうからである。そこで、よりリアリティの高いグラフィックス画像が求められる用途では、3次元的な明るさの広がりを持たせる手段として、3次元空間内に仮想的な光源を配置して、ポリゴンの頂点あるいは画素ごとに照度値を計算することが一般的に行われている。例えば図4は、オブジェクトの配置が図3と同じ状況において、仮想的な点光源400を配置することにより、オブジェクトに明るさの強弱をつけ、3次元的な視覚効果を高める様子を示している。   However, it is difficult to obtain a real feeling like a live-action by simply removing the hidden surface of the polygon using the Z buffer. This is because the three-dimensional spread of the brightness of the objects arranged in the three-dimensional space is not considered. That is, the color values attached to the vertices and pixels of the polygon are unnatural to the eye, and thus lack the reality compared to the actual image. Therefore, in applications where a more realistic graphics image is required, a virtual light source is arranged in a three-dimensional space as a means of giving a three-dimensional brightness spread, and is applied to each vertex or pixel of a polygon. It is common practice to calculate the illuminance value. For example, FIG. 4 shows how the virtual point light source 400 is arranged to increase the brightness of the object and enhance the three-dimensional visual effect in the same situation as FIG. .

文献(OpenGL Specification 1.3)によれば、照度値の計算式は次式で表される。   According to the literature (OpenGL Specification 1.3), the formula for calculating the illuminance value is represented by the following formula.

Figure 2006127368
Figure 2006127368

上式の照度計算はRGBカラーごとに行われる。上式において、ME、MA、MD、MSはポリゴンの材質(マテリアル)に関するパラメータであって、それぞれエミッションカラー、アンビエントカラー、ディフューズカラー、スペキュラーカラーを示す。CAは全体環境(シーン)のアンビエントカラーである。記号Σは、複数の光源(i)について加算することを示している。LA(i)、LD(i)、LS(i)はそれぞれ光源(i)のアンビエント強度、ディフューズ強度、スペキュラー強度である。Att(i)およびSpot(i)は、光源(i)に関する減衰項およびスポットライト項であり、Dc(i)およびSc(i)は、光源(i)に関するディフューズ項およびスペキュラー項である。これらの各項は、光源(i)とポリゴンの頂点または画素の相互関係から求められる。すなわち、3次元空間における光源(i)の位置ベクトルと、ポリゴンの頂点または画素の位置ベクトルまたは法線ベクトルを用いて、ベクトルの内積計算や指数計算を行うことにより求められる値である。このように、3次元空間において、オブジェクトに相対して光源を配置し、ポリゴンの頂点あるいは画素ごとに照度値を求めることによって、3次元的な明るさの強弱をつけることができ、より実写に近いリアルな3次元グラフィックス画像を生成することができる。   The above illuminance calculation is performed for each RGB color. In the above equation, ME, MA, MD, and MS are parameters relating to the material of the polygon, and indicate the emission color, ambient color, diffuse color, and specular color, respectively. CA is the ambient color of the entire environment (scene). The symbol Σ indicates that addition is performed for a plurality of light sources (i). LA (i), LD (i), and LS (i) are the ambient intensity, diffuse intensity, and specular intensity of the light source (i), respectively. Att (i) and Spot (i) are the attenuation and spotlight terms for light source (i), and Dc (i) and Sc (i) are the diffuse and specular terms for light source (i). Each of these terms is obtained from the interrelationship between the light source (i) and the vertexes or pixels of the polygon. That is, it is a value obtained by calculating the inner product of the vector or calculating the exponent using the position vector of the light source (i) in the three-dimensional space and the position vector or normal vector of the vertex or pixel of the polygon. In this way, in a three-dimensional space, by arranging a light source relative to an object and obtaining an illuminance value for each vertex or pixel of a polygon, the intensity of the three-dimensional brightness can be added, making it more realistic. A near real 3D graphics image can be generated.

上記の照度計算の他に、3次元的な視覚効果を与える手段として、フォグが知られている。上記の文献によれば、フォグの計算式は次式で表される。   In addition to the above illuminance calculation, fog is known as a means for giving a three-dimensional visual effect. According to the above literature, the fog calculation formula is expressed by the following formula.

Figure 2006127368
Figure 2006127368

上式のフォグ計算はRGBカラーごとに行われる。Ciは入力されるポリゴンの頂点または画素のカラー値であり、Cfはフォグカラーである。fはこれら2つのカラーを混合する際のブレンド係数であって、ポリゴンの頂点または画素の位置から視点までの距離(Z値)の関数である。一般的なフォグのブレンド係数はZ値について減少関数であって、視点から遠くなるほどフォグカラーCfの割合が多くなり、視点に近くなるほど入力カラーCiの割合が多くなる。すなわち、視点から遠い位置にあるポリゴンは、フォグ(霧)がかかったような、ぼやけた感じの色になる。このようにフォグは、遠くの位置にあるオブジェクトをぼかす手法(被写界深度)の1つであって、照度計算のような3次元的に明るさの強弱を求めるものではない。   The above fog calculation is performed for each RGB color. Ci is the color value of the vertex or pixel of the input polygon, and Cf is the fog color. f is a blending coefficient for mixing these two colors, and is a function of the distance (Z value) from the vertex or pixel position of the polygon to the viewpoint. The general fog blend coefficient is a decreasing function with respect to the Z value, and the ratio of the fog color Cf increases as the distance from the viewpoint increases, and the ratio of the input color Ci increases as the distance from the viewpoint increases. That is, the polygon far from the viewpoint has a blurry color as if fog (fog) is applied. As described above, fog is one of the methods (depth of field) for blurring an object located at a far position, and does not calculate brightness intensity three-dimensionally like illuminance calculation.

さらに別の方法として、特許文献1に、インデックスカラー・テクスチャ用のルックアップテーブル(LUT)に、あらかじめ不透明度(α値)を格納しておき、前記LUTのインデックスとしてZ値を設定してα値を引き、前記α値に応じてアルファブレンドを行う方法が公開されている。この方法についてもフォグと同様、視点から遠い位置にあるポリゴンをぼかすものであって、照度計算のような3次元的に明るさの強弱を求めるものではない。
特開2002−92629号公報(第22頁、図14)
As another method, in Patent Document 1, opacity (α value) is stored in advance in an index color / texture look-up table (LUT), and a Z value is set as an index of the LUT, and α A method of subtracting a value and performing alpha blending according to the α value is disclosed. As with fog, this method also blurs polygons far from the viewpoint, and does not determine the intensity of brightness three-dimensionally as in illuminance calculation.
Japanese Unexamined Patent Publication No. 2002-92629 (page 22, FIG. 14)

3次元グラフィックス描画において、オブジェクトに3次元的な明るさの広がりを与えるという目的に対し、従来の方法では以下のような課題がある。すなわち、光源の配置による照度計算は、(数1)に示されるように、演算コストが非常に高く、高速に処理するためにはハードウェアリソースが増大してしまうという課題があった。また、光源の位置やマテリアルなどのパラメータの設定が煩雑で、ユーザーが手軽に明るさをプログラムするということが容易ではない、すなわち、明るさのプログラマブル性が低いという課題があった。   In the three-dimensional graphics drawing, the conventional method has the following problems for the purpose of giving the object a three-dimensional brightness spread. In other words, the illuminance calculation based on the arrangement of the light sources has a problem that the calculation cost is very high as shown in (Equation 1), and hardware resources are increased for high-speed processing. Further, the setting of parameters such as the position of the light source and the material is complicated, and it is not easy for the user to easily program the brightness, that is, there is a problem that the brightness is not programmable.

また、フォグや、Z値をインデックスとしてLUTからα値を求めてアルファブレンドを行う方法については、Z値に応じてオブジェクトをぼかすことはできるが、3次元空間内の明るさの調節を行うことはできないので、上記の課題を解決するものではない。   As for the method of performing alpha blending by obtaining the α value from the LUT using fog or the Z value as an index, the object can be blurred according to the Z value, but the brightness in the three-dimensional space is adjusted. Can not solve the above problems.

上記の課題を解決するために、本発明では以下の手段を講じた。すなわち、各画素のカラー値を変換するためのガンマ補正手段を複数備え、各画素の奥行き値に応じて前記複数のガンマ補正手段から出力された複数のカラー値のうちの1つを選択し、前記選択されたカラー値を前記画素のカラー値とすることにより、前記奥行き値に応じた明るさ調節を行う。   In order to solve the above problems, the present invention takes the following measures. That is, a plurality of gamma correction means for converting the color value of each pixel, and selecting one of the plurality of color values output from the plurality of gamma correction means according to the depth value of each pixel, Brightness adjustment according to the depth value is performed by using the selected color value as the color value of the pixel.

あるいは、各画素のカラー値を変換するためのガンマ補正手段を複数備え、各画素の奥行き値に応じて前記複数のガンマ補正手段から出力された複数のカラー値のうちの2つを選択し、前記選択された2つのカラー値を前記奥行き値を用いて線形補間し、前記線形補間されたカラー値を前記画素のカラー値とすることにより、前記奥行き値に応じた明るさ調節を行う。   Alternatively, a plurality of gamma correction means for converting the color value of each pixel, and selecting two of the plurality of color values output from the plurality of gamma correction means according to the depth value of each pixel, The selected two color values are linearly interpolated using the depth value, and the linearly interpolated color value is used as the color value of the pixel, thereby adjusting the brightness according to the depth value.

あるいは、各画素のカラー値を変換するためのガンマ補正手段を複数備え、各画素のスクリーン座標および奥行き値に応じて前記複数のガンマ補正手段から出力された複数のカラー値のうちの1つを選択し、前記選択されたカラー値を前記画素のカラー値とすることにより、前記スクリーン座標および前記奥行き値に応じた明るさ調節を行う。   Alternatively, a plurality of gamma correction means for converting the color value of each pixel are provided, and one of the plurality of color values output from the plurality of gamma correction means according to the screen coordinate and depth value of each pixel is obtained. The brightness is adjusted according to the screen coordinates and the depth value by selecting and using the selected color value as the color value of the pixel.

本発明によれば、ユーザーが奥行きに応じたガンマ補正曲線を自由に、かつ簡単に設定できるので、3次元空間内の明るさのプログラマブル性の高いという効果がある。また本発明によれば、従来の照度計算に比べて演算コストが低く、より少ないハードウェアリソースにより高速に処理することが可能であるという効果がある。   According to the present invention, since the user can freely and easily set a gamma correction curve corresponding to the depth, there is an effect that the brightness in the three-dimensional space is highly programmable. Further, according to the present invention, the calculation cost is lower than that of the conventional illuminance calculation, and it is possible to perform high-speed processing with fewer hardware resources.

また、Z値に応じたガンマ補正が画質的にもたらす効果としては、例えば、Z値が大きくなるほど入力階調に対する出力階調の比が小さくなるように複数のガンマ補正曲線を設定すれば、遠い位置の画素ほど、すべての階調について全体的に暗くなるという視覚効果を生み出すことができる。また、Z値が小さくなるほど非線形性の度合いが大きくなるようにるガンマ補正曲線を設定すれば、近い位置の画素ほど、中間調付近で明るい階調はより明るくなり、暗い階調はより暗くなり、したがってコントラストが大きくなるという視覚効果を生み出すことができる。結果として、Z値の大きい画素と小さい画素では、ガンマ補正曲線、すなわち明るさやコントラストに差が生じて奥行き感がより一層得られるので、よりリアルな3次元グラフィックス画像を得ることができるという効果がある。   In addition, as an effect of gamma correction according to the Z value in terms of image quality, for example, if a plurality of gamma correction curves are set so that the ratio of the output gradation to the input gradation becomes smaller as the Z value becomes larger, it is farther away. It is possible to produce a visual effect that the pixel at the position becomes darker overall for all gradations. In addition, if a gamma correction curve is set so that the degree of nonlinearity increases as the Z value decreases, the closer the pixel is, the brighter the gradation near the halftone and the darker the gradation becomes darker. Therefore, it is possible to produce a visual effect that the contrast is increased. As a result, a gamma correction curve, that is, a difference in brightness and contrast is generated between the pixel having a large Z value and the pixel having a small Z value, and a sense of depth is further obtained, so that a more realistic three-dimensional graphics image can be obtained. There is.

以下、本発明の実施の形態について、図面を参照しながら説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

(実施の形態1)
図1に本発明の実施の形態1における構成を示す。図1において、入力カラーCinがガンマ補正部100に入力されている。ガンマ補正部100は、4個のルックアップテーブルLUT0〜LUT3により構成され、それぞれ異なるガンマ補正曲線があらかじめ設定されている。各ルックアップテーブルには、入力カラーCinがインデックスとして入力され、それぞれインデックスに対応するカラー値、すなわちガンマ補正済みのカラー値を出力する。ここで、入力カラー値Cinを例えば8ビットとすると、ルックアップテーブルのインデックスは8ビットであって、256通りのインデックス値に応じて8ビットのガンマ補正済みカラー値を出力する。なお、本実施の形態の入力カラーCinは、RGBカラー値ではなく、輝度値であるものと仮定する。
(Embodiment 1)
FIG. 1 shows a configuration according to Embodiment 1 of the present invention. In FIG. 1, the input color Cin is input to the gamma correction unit 100. The gamma correction unit 100 includes four look-up tables LUT0 to LUT3, and different gamma correction curves are set in advance. Each look-up table receives an input color Cin as an index, and outputs a color value corresponding to the index, that is, a gamma-corrected color value. Here, if the input color value Cin is, for example, 8 bits, the lookup table index is 8 bits, and an 8-bit gamma-corrected color value is output according to 256 different index values. Note that it is assumed that the input color Cin of this embodiment is not an RGB color value but a luminance value.

これらのルックアップテーブルLUT0〜LUT3に設定するガンマ補正曲線の例を図5に示す。図5では、LUT0→LUT1→LUT2→LUT3と変化するにつれて、入力階調に対する出力階調の比が小さくなり、かつ非線形性の度合いが小さくなるようなガンマ補正曲線が設定されている。   Examples of gamma correction curves set in these lookup tables LUT0 to LUT3 are shown in FIG. In FIG. 5, a gamma correction curve is set such that the ratio of the output gradation to the input gradation becomes smaller and the degree of nonlinearity becomes smaller as LUT0 → LUT1 → LUT2 → LUT3 changes.

選択信号生成部101は、現在描画しようとしている画素のZ値から、特定の2ビットを抽出するブロックである。抽出された2ビットのZ値は、ガンマ補正曲線選択信号Zselとしてマルチプレクサ102に入力される。なお、ガンマ補正曲線選択信号Zselとしては、Z値の最上位ビットから順に2ビットを抽出するのが最も簡単な構成であるが、任意の連続した2ビットを抽出するような構成にしても良い。例えば、シーンによってはZ値が特定の範囲に偏っている場合もあるので、Z値の最上位の2ビットではなく、さらに下位の2ビットをガンマ補正曲線選択信号Zselとして採用することができる。このような場合は、選択信号生成部101が、Z値のどのビットを抽出するかをあらかじめ設定できるような構成にしておけばよい。   The selection signal generation unit 101 is a block that extracts specific 2 bits from the Z value of a pixel that is currently drawn. The extracted 2-bit Z value is input to the multiplexer 102 as the gamma correction curve selection signal Zsel. As the gamma correction curve selection signal Zsel, it is simplest to extract 2 bits in order from the most significant bit of the Z value, but it may be configured to extract any continuous 2 bits. . For example, since the Z value may be biased to a specific range depending on the scene, not the most significant 2 bits of the Z value but the lower 2 bits can be adopted as the gamma correction curve selection signal Zsel. In such a case, the selection signal generation unit 101 may be configured to be able to set in advance which bits of the Z value are to be extracted.

マルチプレクサ102は、前記ガンマ補正曲線選択信号Zselに応じて、ガンマ補正部100の出力である4つのガンマ補正済みカラーからいずれか1つを選択するブロックである。Zselが”00”の場合は、ルックアップテーブルLUT0の出力が選択され、Zselが”01”の場合は、ルックアップテーブルLUT1の出力が選択され、Zselが”10”の場合は、ルックアップテーブルLUT2の出力が選択され、Zselが”11”の場合は、ルックアップテーブルLUT3の出力が選択される。このように、マルチプレクサ102により、Z値に応じたガンマ補正済みの最終的なカラー値Coutが得られる。   The multiplexer 102 is a block that selects any one of the four gamma corrected colors that are the output of the gamma correction unit 100 in accordance with the gamma correction curve selection signal Zsel. When Zsel is “00”, the output of the lookup table LUT0 is selected, when Zsel is “01”, the output of the lookup table LUT1 is selected, and when Zsel is “10”, the lookup table is selected. When the output of LUT2 is selected and Zsel is “11”, the output of lookup table LUT3 is selected. In this manner, the final color value Cout after gamma correction corresponding to the Z value is obtained by the multiplexer 102.

図6に、本実施の形態における3次元空間とガンマ補正曲線の対応関係を示す。図6では、奥行きのある部屋オブジェクト601の中に、多数の細かいポリゴンからなる球状のオブジェクト602および603が宙に浮かんでいるシーンを描画することを想定している。このとき、Z値によって区分された4つの領域(A)〜(D)においてそれぞれ描画される画素に対して、図5のガンマ補正曲線(A)〜(D)が適用される。すなわち、オブジェクトを構成する画素のZ値に応じて異なるガンマ補正曲線が適用され、結果として、図7のような3次元グラフィックス画像が生成される。   FIG. 6 shows the correspondence between the three-dimensional space and the gamma correction curve in the present embodiment. In FIG. 6, it is assumed that a scene in which spherical objects 602 and 603 made of a large number of fine polygons are floating in a room object 601 having a depth is drawn. At this time, the gamma correction curves (A) to (D) of FIG. 5 are applied to the pixels drawn in the four regions (A) to (D) divided by the Z value. That is, a different gamma correction curve is applied according to the Z value of the pixels constituting the object, and as a result, a three-dimensional graphics image as shown in FIG. 7 is generated.

以上のように、現在描画しようとしている画素のカラー値は、その画素のZ値によって任意のガンマ補正が適用される。これにより、例えば、図5のようにガンマ補正曲線を設定しておけば、Z値が大きくなるほど入力階調に対する出力階調の比が小さくなっているガンマ補正曲線が選択されるので、遠い位置の画素ほど、すべての階調について全体的に暗くなる。また、Z値が小さくなるほど非線形性の度合いが大きくなっているガンマ補正曲線が選択されるので、近い位置の画素ほど、中間調付近で明るい階調はより明るくなり、暗い階調はより暗くなり、したがってコントラストが大きくなる。結果として、Z値の大きい画素と小さい画素では、ガンマ補正曲線、すなわち明るさやコントラストに差が生じて奥行き感がより一層得られるので、よりリアルな3次元グラフィックス画像を得ることができる。   As described above, an arbitrary gamma correction is applied to the color value of the pixel that is currently drawn based on the Z value of the pixel. Accordingly, for example, if a gamma correction curve is set as shown in FIG. 5, a gamma correction curve having a smaller ratio of output gradation to input gradation as the Z value increases is selected. This pixel becomes darker for all gradations as a whole. In addition, since a gamma correction curve with a higher degree of non-linearity is selected as the Z value decreases, the closer the pixel is, the brighter the gradation near the halftone and the darker the gradation becomes darker. Therefore, the contrast is increased. As a result, a pixel having a large Z value and a pixel having a small Z value have a difference in gamma correction curves, that is, brightness and contrast, and a sense of depth is further obtained, so that a more realistic three-dimensional graphics image can be obtained.

なお、本実施の形態ではガンマ補正部100が4つのルックアップテーブルから構成されているが、ルックアップテーブルの個数については、これに限られるものではない。その場合、ルックアップテーブルの数に応じて、ガンマ補正曲線選択信号Zselのビット数が変化するので、選択信号生成部101やマルチプレクサ102を、Zselのビット数に対応させる必要がある。またガンマ補正曲線は、図5の例に限らず、ユーザーが自由に設定できる。例えば、図5とは逆に、Z値が大きいほど明るくしたり、コントラストを大きくしたりすることも可能である。また本実施の形態では、入力カラーCinが、RGBカラー値ではなく輝度値であると仮定したが、RGBカラー値であっても良い。その場合は、RGBごとにガンマ補正を行うために、ルックアップテーブルやマルチプレクサの個数が3倍必要になる。   In the present embodiment, the gamma correction unit 100 includes four lookup tables, but the number of lookup tables is not limited to this. In this case, since the number of bits of the gamma correction curve selection signal Zsel changes according to the number of lookup tables, it is necessary to make the selection signal generation unit 101 and the multiplexer 102 correspond to the number of bits of Zsel. The gamma correction curve is not limited to the example shown in FIG. For example, contrary to FIG. 5, it is possible to increase the brightness or increase the contrast as the Z value increases. In the present embodiment, it is assumed that the input color Cin is a luminance value, not an RGB color value, but may be an RGB color value. In that case, in order to perform gamma correction for each RGB, the number of lookup tables and multiplexers is three times as many.

(実施の形態2)
図8に本発明の実施の形態2における構成を示す。図8(A)は図1と比較して、ガンマ補正部800に関しては同じものであるが、マルチプレクサ802の出力が2種類存在し、線形補間部803に入力されている点と、選択信号生成部801がガンマ補正曲線選択信号Zselの他に線形補間部803への混ぜ率Zαを出力している点が異なっている。
(Embodiment 2)
FIG. 8 shows a configuration according to the second embodiment of the present invention. 8A is the same as that in FIG. 1 with respect to the gamma correction unit 800, but there are two types of outputs from the multiplexer 802 and the input to the linear interpolation unit 803, and the generation of the selection signal. The difference is that the unit 801 outputs the mixing rate Zα to the linear interpolation unit 803 in addition to the gamma correction curve selection signal Zsel.

本実施の形態は、2つの異なるルックアップテーブルからの出力を、線形補間部803によりフィルタリングすることによって、色の境目を目立たなくすることを特徴としている。そのような必要性があるのは、図5の4つのガンマ補正曲線の中で、隣り合う2つのガンマ補正曲線の設定値に大きな差がある場合であって、図6の(A−B間)あるいは(B−C間)あるいは(C−D間)の境界付近の画素において、色の段差が出てしまう可能性があるからである。   This embodiment is characterized in that the color boundary is made inconspicuous by filtering outputs from two different look-up tables by a linear interpolation unit 803. There is such a need when there is a large difference in the set values of two adjacent gamma correction curves among the four gamma correction curves in FIG. ) Or (between B-C) or (between C-D), there is a possibility that a color step will appear in the pixels near the boundary.

マルチプレクサ802は、選択信号生成部801からのガンマ補正曲線選択信号Zselにしたがって、ルックアップテーブルLUT0〜LUT3の合計4つの出力から2つを選択する。Zselが”00”の場合は、ルックアップテーブルLUT0およびLUT1の出力が選択され、Zselが”01”の場合は、ルックアップテーブルLUT1およびLUT2の出力が選択され、Zselが”10”の場合は、ルックアップテーブルLUT2およびLUT3の出力が選択され、Zselが”11”の場合は、ルックアップテーブルLUT3の出力のみが選択される。   The multiplexer 802 selects two of the total four outputs of the lookup tables LUT0 to LUT3 according to the gamma correction curve selection signal Zsel from the selection signal generation unit 801. When Zsel is “00”, the outputs of the lookup tables LUT0 and LUT1 are selected, when Zsel is “01”, the outputs of the lookup tables LUT1 and LUT2 are selected, and when Zsel is “10” When the outputs of the lookup tables LUT2 and LUT3 are selected and Zsel is “11”, only the output of the lookup table LUT3 is selected.

線形補間部803への混ぜ率Zαは、例えばビット幅を8ビットとして、図8(B)のように、Z値のガンマ補正曲線選択信号Zselより下の8ビットを使用することができる。この混ぜ率Zαと、マルチプレクサ802の出力Cm0およびCm1を用いて、以下のようにフィルタリングを行うことができる。   As the mixing ratio Zα to the linear interpolation unit 803, 8 bits below the gamma correction curve selection signal Zsel of the Z value can be used as shown in FIG. Using the mixing ratio Zα and the outputs Cm0 and Cm1 of the multiplexer 802, filtering can be performed as follows.

Figure 2006127368
Figure 2006127368

なお、本実施の形態ではガンマ補正部800が4つのルックアップテーブルから構成されているが、ルックアップテーブルの個数については、これに限られるものではない。その場合、ルックアップテーブルの数に応じて、ガンマ補正曲線選択信号Zselのビット数が変化するので、選択信号生成部801やマルチプレクサ802を、Zselのビット数に対応させる必要がある。また本実施の形態では、混ぜ率Zαを8ビットとしたが、これ以外であってもよい。また本実施の形態では、入力カラーCinが、RGBカラー値ではなく輝度値であると仮定したが、RGBカラー値であっても良い。その場合は、RGBごとにガンマ補正を行うために、ルックアップテーブルやマルチプレクサ、線形補間部の個数が3倍必要になる。   In the present embodiment, the gamma correction unit 800 is composed of four lookup tables, but the number of lookup tables is not limited to this. In this case, since the number of bits of the gamma correction curve selection signal Zsel changes according to the number of lookup tables, the selection signal generation unit 801 and the multiplexer 802 need to correspond to the number of bits of Zsel. In the present embodiment, the mixing rate Zα is 8 bits, but may be other than this. In the present embodiment, it is assumed that the input color Cin is a luminance value, not an RGB color value, but may be an RGB color value. In that case, in order to perform gamma correction for each RGB, the number of lookup tables, multiplexers, and linear interpolation units is required to be three times.

(実施の形態3)
上述した実施の形態1および2では、図6のように、Z軸の方向に3次元空間を分割して、ガンマ補正曲線を割り当てたが、本実施の形態では、図9のように、Z軸に限らずX軸およびY軸の方向にも領域を分割して、ガンマ補正曲線を割り当てるものである。あるいは、図10のように、3次元空間の定義された任意のベクトルPの方向に、領域を分割することも可能である。このような場合には、画素のX、Y、Z値からガンマ補正曲線選択信号を生成する必要がある。
(Embodiment 3)
In the first and second embodiments described above, a gamma correction curve is assigned by dividing the three-dimensional space in the Z-axis direction as shown in FIG. 6, but in this embodiment, as shown in FIG. The gamma correction curve is assigned by dividing the region not only in the axis but also in the X-axis and Y-axis directions. Alternatively, as shown in FIG. 10, it is possible to divide the region in the direction of an arbitrary vector P defined in the three-dimensional space. In such a case, it is necessary to generate a gamma correction curve selection signal from the X, Y, and Z values of the pixel.

本実施形態の構成を図11に示す。図11は図1に比べて、選択信号生成部1101への入力が画素のX、Y、Z値となっている点が異なっている。選択信号生成部1101は、2ビットのガンマ補正曲線選択信号selを出力する必要があるが、図9(A)のような領域分割では、Z値とX値からそれぞれ上位のビットを1ビットずつ取ればよく、また図9(B)のような領域分割では、Z値とY値からそれぞれ上位ビットを1ビットずつ取ればよい。   The configuration of the present embodiment is shown in FIG. FIG. 11 differs from FIG. 1 in that the input to the selection signal generation unit 1101 is the X, Y, and Z values of the pixel. The selection signal generation unit 1101 needs to output a 2-bit gamma correction curve selection signal sel. However, in the area division as shown in FIG. In the area division as shown in FIG. 9B, it is only necessary to take one higher bit from each of the Z value and the Y value.

図10のような領域分割では、ベクトルの始点Pの3次元空間座標を(Xp,Yp,Zp)として、次の領域判定関数Fを求め、上位2ビットをガンマ補正曲線選択信号selとして出力すればよい。   In the area division as shown in FIG. 10, the next area determination function F is obtained with the three-dimensional space coordinates of the vector starting point P as (Xp, Yp, Zp), and the upper 2 bits are output as the gamma correction curve selection signal sel. That's fine.

Figure 2006127368
Figure 2006127368

ただし、(数4)において、sqrtは平方根演算を示す。(数4)の計算は多少複雑であって、演算コストが高くなるため、ベクトルPの始点を原点に取ったり、平方根演算を省略することで、選択信号生成部の構成を簡単化することができる。なお、本実施形態では、3次元空間を4つの領域に分割して、異なるガンマ補正曲線を割り当てたが、さらにもっと多くの領域に分割しても良い。   However, in (Equation 4), sqrt represents a square root operation. Since the calculation of (Equation 4) is somewhat complicated and the calculation cost is high, the configuration of the selection signal generation unit can be simplified by taking the starting point of the vector P as the origin or omitting the square root calculation. it can. In the present embodiment, the three-dimensional space is divided into four regions and different gamma correction curves are assigned, but it may be further divided into more regions.

(実施の形態4)
図12、図13および図14に、本発明のZ値によるガンマ補正部を備えたグラフィックス描画装置に関する一実施の形態を示す。図12は、前記グラフィックス描画装置の最上位階層の構成を示し、CPU(中央演算装置)1201、グラフィックスエンジン1202、メモリコントローラ1203、表示コントローラ1204、メモリデバイス1205、表示デバイス1206で構成されている。なお、これらのブロックは別々の半導体で構成されていても良いし、いくつかのブロックをまとめて、1つのシステムLSIとして集積されていても良い。メモリコントローラ1203はメモリデバイス1206を制御し、表示コントローラは1204は表示デバイス1207を制御する。
(Embodiment 4)
FIG. 12, FIG. 13 and FIG. 14 show an embodiment relating to a graphics drawing apparatus having a gamma correction unit based on Z values according to the present invention. FIG. 12 shows the configuration of the highest hierarchy of the graphics drawing apparatus, which is composed of a CPU (Central Processing Unit) 1201, a graphics engine 1202, a memory controller 1203, a display controller 1204, a memory device 1205, and a display device 1206. Yes. Note that these blocks may be composed of separate semiconductors, or some blocks may be integrated as a single system LSI. The memory controller 1203 controls the memory device 1206, and the display controller 1204 controls the display device 1207.

グラフィックスエンジン1202は、CPUバス1207を介してCPU1201に接続され、制御されている。また、グラフィックスエンジン1202はメモリバス1208を介してメモリコントローラ1203に接続され、メモリデバイス1205上のデータにアクセスできる。メモリデバイス1205上には、グラフィックスエンジン1202による3次元グラフィックス描画で用いられる、カラーバッファおよびZバッファの画素データ、ディスプレイリスト、テクスチャデータなどが格納されている。なお、メモリアクセスの高速化のために、これらのデータを格納するメモリがグラフィックスエンジン1202の内部に存在していても良い。   The graphics engine 1202 is connected to and controlled by the CPU 1201 via the CPU bus 1207. The graphics engine 1202 is connected to the memory controller 1203 via the memory bus 1208 and can access data on the memory device 1205. The memory device 1205 stores color buffer and Z buffer pixel data, a display list, texture data, and the like that are used in three-dimensional graphics rendering by the graphics engine 1202. Note that a memory for storing these data may exist inside the graphics engine 1202 in order to increase the memory access speed.

次に、グラフィックスエンジン1202の内部構成を図13に示す。ホストインターフェース1301はCPUバスに接続され、CPUとの通信を行う。グラフィックスコントローラ1302は、CPUからの命令に従い、グラフィックスパイプライン1304にポリゴン描画データを投入する。前記ポリゴン描画データは、CPUからの命令列に含まれていても良いし、前記メモリデバイス1205上にあるディスプレイリストに含まれていても良い。後者の場合、グラフィックスコントローラ1302は、メモリバスインターフェース1303を介してディスプレイリストをリードし、ポリゴン描画データを取得する。グラフィックスパイプラインは1304は、次の3つの主要なブロックに分かれている。頂点処理部1305は、ポリゴンの頂点ごとに座標変換や照度計算などの処理を行うブロックである。ラスタライザ1307は、ポリゴン内部をピクセル単位で走査し、各ピクセルに対してZ値による陰面処理やテクスチャマッピング、各種ブレンド処理などを行うブロックである。セットアップ部1306はそれら両者の間にあって、頂点処理部1305が出力する座標変換および照度計算済みの3つの頂点データから、ポリゴンの幾何形状やポリゴン内部のカラー値やテクスチャ座標などの傾斜情報などを求め、ラスタライザ1307に入力できるデータ形式に変換する処理を行う。なお、図13は本発明におけるグラフィックスエンジンの構成であるが、一般的なグラフィックスエンジンもほぼ同様の構成であって、本実施の形態を特徴づける構成はラスタライザ1307よりも下層にある。   Next, the internal configuration of the graphics engine 1202 is shown in FIG. The host interface 1301 is connected to the CPU bus and communicates with the CPU. The graphics controller 1302 inputs polygon drawing data to the graphics pipeline 1304 in accordance with an instruction from the CPU. The polygon drawing data may be included in a command sequence from the CPU, or may be included in a display list on the memory device 1205. In the latter case, the graphics controller 1302 reads the display list via the memory bus interface 1303 and acquires polygon drawing data. The graphics pipeline 1304 is divided into the following three main blocks. The vertex processing unit 1305 is a block that performs processing such as coordinate conversion and illuminance calculation for each vertex of the polygon. The rasterizer 1307 is a block that scans the inside of a polygon in units of pixels and performs hidden surface processing using Z values, texture mapping, various blending processing, and the like for each pixel. The setup unit 1306 is between them, and obtains polygon information such as the polygon shape, the color value inside the polygon, texture coordinates, and the like from the three vertex data that have been subjected to coordinate conversion and illuminance calculation output from the vertex processing unit 1305. Then, the data is converted into a data format that can be input to the rasterizer 1307. FIG. 13 shows the configuration of the graphics engine in the present invention, but a general graphics engine has almost the same configuration, and the configuration characterizing this embodiment is in the lower layer than the rasterizer 1307.

図14にラスタライザの内部構成を示す。図14において、ピクセル座標生成部1401はポリゴン内部をピクセル単位で走査し、ポリゴン内部に含まれる画素の位置座標(X座標およびY座標)を求める。テクスチャアドレス生成部1402、カラー生成部1403、フォグ生成部1404、Z値生成部1405は、前記位置座標からそれぞれ画素のテクスチャ座標値、カラー値、フォグ値、Z値を求める。テクスチャカラー生成部1406はメモリバスインターフェースを介して外部メモリ(図12のメモリデバイス1205)上にあるテクスチャカラーをリードし、フィルタリングなどの処理を行う。テクスチャカラー生成部1406から出力されるテクスチャカラーは、カラー生成部1403から出力されるカラーとテクスチャ環境演算部1407においてブレンドされた後、フォグ生成部1404から出力されるフォグ値とフォグ演算部1408においてブレンドされ、Z値によるガンマ補正部1409に送られる。なお、テクスチャマッピングを行わない場合は、テクスチャ環境演算部1407はカラー生成部1403から入力されるカラーをそのまま出力することは言うまでもない。フォグを行わない場合もまた同様である。また、図14のラスタライザの内部構成には、フォグ生成部1404およびフォグ演算部1408が含まれるが、これらのブロックが存在しない構成であっても本実施の形態の特徴を損なうものではない。図14において、本実施の形態を特徴づけるブロックは、Z値によるガンマ補正部1409である。このブロックの内部構成は、すでに実施の形態1および2で説明した、図1および図8に示された構成と同様の構成をとる。すなわち、Z値によるガンマ補正部1409は、ガンマ補正曲線を格納できるルックアップテーブルを複数持ち、Z値によって、いずれかのルックアップテーブルの出力を選択するものである。   FIG. 14 shows the internal configuration of the rasterizer. In FIG. 14, a pixel coordinate generation unit 1401 scans the inside of a polygon in units of pixels, and obtains position coordinates (X coordinate and Y coordinate) of pixels included in the polygon. A texture address generation unit 1402, a color generation unit 1403, a fog generation unit 1404, and a Z value generation unit 1405 obtain the texture coordinate value, color value, fog value, and Z value of the pixel from the position coordinates, respectively. The texture color generation unit 1406 reads the texture color on the external memory (memory device 1205 in FIG. 12) via the memory bus interface, and performs processing such as filtering. The texture color output from the texture color generation unit 1406 is blended with the color output from the color generation unit 1403 and the texture environment calculation unit 1407, and then the fog value output from the fog generation unit 1404 and the fog calculation unit 1408 Blended and sent to the gamma correction unit 1409 based on Z value. Needless to say, when texture mapping is not performed, the texture environment calculation unit 1407 outputs the color input from the color generation unit 1403 as it is. The same is true when fog is not performed. 14 includes a fog generation unit 1404 and a fog calculation unit 1408, but the configuration of this embodiment does not impair the characteristics of the present embodiment even if these blocks are not present. In FIG. 14, the block that characterizes this embodiment is a gamma correction unit 1409 based on Z values. The internal configuration of this block is the same as the configuration shown in FIGS. 1 and 8 already described in the first and second embodiments. That is, the gamma correction unit 1409 based on the Z value has a plurality of lookup tables that can store gamma correction curves, and selects one of the lookup table outputs according to the Z value.

なお、前記ルックアップテーブルに関しては、Z値によるガンマ補正部1409とテクスチャカラー生成部1406とで共用できるような構成にしても良い。これは以下のような理由による。従来より、「インデックステクスチャ」というテクスチャのデータ形式が、外部メモリ上のテクスチャデータの容量を小さくする目的で一般的に用いられている。この形式のテクスチャでは、テクスチャカラー生成部1406の内部にルックアップテーブルが必要である。しかしながら、近年の半導体技術の進歩により、メモリバスのバンド幅が向上し、使用可能なメモリ容量が増大する傾向にある。また高画質化の要求から、必ずしもインデックステクスチャを使わなければならないという状況が少なくなってきているのも事実である。したがって、従来のインデックステクスチャと、本発明のZ値によるガンマ補正の2つの用途に対して、同じルックアップテーブルを流用できれば、回路を効率的に使用でき、回路面積の増加も抑えられるという利点がある。   The lookup table may be configured so that it can be shared by the Z-value gamma correction unit 1409 and the texture color generation unit 1406. This is due to the following reasons. Conventionally, a texture data format called “index texture” is generally used for the purpose of reducing the capacity of texture data in an external memory. In this type of texture, a look-up table is required inside the texture color generation unit 1406. However, recent advances in semiconductor technology tend to increase the memory bus bandwidth and increase the usable memory capacity. It is also true that the situation where index textures must always be used due to the demand for higher image quality. Therefore, if the same look-up table can be used for the conventional index texture and the gamma correction using the Z value of the present invention, the circuit can be used efficiently and the increase in circuit area can be suppressed. is there.

ピクセルテスト部1410では、アルファテスト、ステンシルテスト、Zテスト(Z値による陰面処理)などが行われる。Zテストが行われる場合、Z値生成部1405から出力されるZ値と、前記外部メモリからリードされたZ値が比較され、前者が後者よりも小さい(手前にある)と判断された画素だけがこのテストをパスする。ディスティネーションブレンド部1411では、Z値によるガンマ補正部1409からの出力されたガンマ補正済みのカラーと、前記レンダリングバッファからリードされたカラー値が必要に応じてブレンドされる。最終的に、ブレンド処理後のカラー値とZ値生成部1405が生成したZ値が、前記外部メモリにライトされる。   In the pixel test unit 1410, an alpha test, a stencil test, a Z test (hidden surface processing using Z values), and the like are performed. When the Z test is performed, the Z value output from the Z value generation unit 1405 is compared with the Z value read from the external memory, and only the pixels for which the former is determined to be smaller (in front) than the latter. Passes this test. In the destination blend unit 1411, the gamma corrected color output from the gamma correction unit 1409 based on the Z value and the color value read from the rendering buffer are blended as necessary. Finally, the color value after blending and the Z value generated by the Z value generation unit 1405 are written into the external memory.

本発明の奥行き値によるガンマ補正機能を備えたグラフィックス描画装置は、グラフィックス描画機能を搭載するさまざまな電子機器、例えば、携帯電話、PDA、デジタルテレビ、カーナビゲーションシステム、家庭用ゲーム機、パーソナルコンピュータ等において用いることができる。   A graphics drawing apparatus having a gamma correction function based on a depth value according to the present invention is a variety of electronic devices equipped with a graphics drawing function, such as a mobile phone, a PDA, a digital TV, a car navigation system, a home game machine, and a personal computer. It can be used in a computer or the like.

本発明の実施の形態1における構成を示す図The figure which shows the structure in Embodiment 1 of this invention. 従来技術におけるZバッファを用いた陰面消去を説明するための図The figure for demonstrating the hidden surface removal using Z buffer in a prior art 従来技術におけるZバッファを用いた陰面消去を説明するための図The figure for demonstrating the hidden surface removal using Z buffer in a prior art 従来技術における光源による照度計算を説明するための図The figure for demonstrating the illumination intensity calculation by the light source in a prior art 本発明の実施の形態1におけるガンマ補正曲線の設定例を示す図The figure which shows the example of a setting of the gamma correction curve in Embodiment 1 of this invention 本発明の実施の形態1における3次元空間とガンマ補正曲線の対応関係を示す図The figure which shows the correspondence of the three-dimensional space and gamma correction curve in Embodiment 1 of this invention 本発明の実施の形態1において生成された3次元グラフィックス画像を示す図The figure which shows the three-dimensional graphics image produced | generated in Embodiment 1 of this invention. 本発明の実施の形態2における構成を示す図The figure which shows the structure in Embodiment 2 of this invention. 本発明の実施の形態3における3次元空間とガンマ補正曲線の対応関係を示す図The figure which shows the correspondence of the three-dimensional space and gamma correction curve in Embodiment 3 of this invention. 本発明の実施の形態3における3次元空間とガンマ補正曲線の対応関係を示す図The figure which shows the correspondence of the three-dimensional space and gamma correction curve in Embodiment 3 of this invention. 本発明の実施の形態3における構成を示す図The figure which shows the structure in Embodiment 3 of this invention. 本発明の実施の形態4における全体構成を示す図The figure which shows the whole structure in Embodiment 4 of this invention. 本発明の実施の形態4におけるグラフィックスエンジンの構成を示す図The figure which shows the structure of the graphics engine in Embodiment 4 of this invention. 本発明の実施の形態4におけるラスタライザの構成を示す図The figure which shows the structure of the rasterizer in Embodiment 4 of this invention.

符号の説明Explanation of symbols

100,800,1100 ガンマ補正部
101,801,1101 選択信号生成部
102,802,1102 マルチプレクサ
200,300 スクリーン
201〜204 ポリゴン
301〜303,601〜603 描画オブジェクト
400 光源
803 線形補間部
1201 CPU
1202 グラフィックスエンジン
1203 メモリコントローラ
1204 表示コントローラ
1205 メモリデバイス
1206 表示デバイス
1207 CPUバス
1208 メモリバス
1301 ホストインターフェース
1302 グラフィックスコントローラ
1303 メモリバスインターフェース
1304 グラフィックスパイプライン
1305 頂点処理部
1306 セットアップ部
1307 ラスタライザ
1401 ピクセル座標生成部
1402 テクスチャアドレス生成部
1403 カラー生成部
1404 フォグ生成部
1405 Z値生成部
1406 テクスチャカラー生成部
1407 テクスチャ環境演算部
1408 フォグ演算部
1409 Z値によるガンマ補正部
1410 ピクセルテスト部
1411 ディスティネーションブレンド部
100, 800, 1100 Gamma correction unit 101, 801, 1101 Selection signal generation unit 102, 802, 1102 Multiplexer 200, 300 Screen 201-204 Polygon 301-303, 601-603 Drawing object 400 Light source 803 Linear interpolation unit 1201 CPU
1202 Graphics Engine 1203 Memory Controller 1204 Display Controller 1205 Memory Device 1206 Display Device 1207 CPU Bus 1208 Memory Bus 1301 Host Interface 1302 Graphics Controller 1303 Memory Bus Interface 1304 Graphics Pipeline 1305 Vertex Processing Unit 1306 Setup Unit 1307 Rasterizer 1401 Pixel Coordinate Generation Unit 1402 texture address generation unit 1403 color generation unit 1404 fog generation unit 1405 Z value generation unit 1406 texture color generation unit 1407 texture environment calculation unit 1408 fog calculation unit 1409 gamma correction unit based on Z value 1410 pixel test unit 1411 destination blend Part

Claims (5)

各画素のカラー値を変換するためのガンマ補正手段を複数備え、各画素の奥行き値に応じて前記複数のガンマ補正手段から出力された複数のカラー値のうちの1つを選択し、前記選択されたカラー値を前記画素のカラー値とすることにより、前記奥行き値に応じた明るさ調節を行うことを特徴とするグラフィックス描画装置。 A plurality of gamma correction means for converting the color value of each pixel; and selecting one of a plurality of color values output from the plurality of gamma correction means according to a depth value of each pixel, A graphics drawing apparatus, wherein brightness adjustment is performed in accordance with the depth value by using the color value obtained as the color value of the pixel. 各画素のカラー値を変換するためのガンマ補正手段を複数備え、各画素の奥行き値に応じて前記複数のガンマ補正手段から出力された複数のカラー値のうちの2つを選択し、前記選択された2つのカラー値を前記奥行き値を用いて線形補間し、前記線形補間されたカラー値を前記画素のカラー値とすることにより、前記奥行き値に応じた明るさ調節を行うことを特徴とするグラフィックス描画装置。 A plurality of gamma correction means for converting the color value of each pixel; and selecting two of the plurality of color values output from the plurality of gamma correction means according to the depth value of each pixel, The two color values are linearly interpolated using the depth value, and the brightness value is adjusted according to the depth value by using the linearly interpolated color value as the color value of the pixel. Graphics drawing device. 各画素のカラー値を変換するためのガンマ補正手段を複数備え、各画素のスクリーン座標および奥行き値に応じて前記複数のガンマ補正手段から出力された複数のカラー値のうちの1つを選択し、前記選択されたカラー値を前記画素のカラー値とすることにより、前記スクリーン座標および前記奥行き値に応じた明るさ調節を行うことを特徴とするグラフィックス描画装置。 A plurality of gamma correction means for converting the color value of each pixel are provided, and one of the plurality of color values output from the plurality of gamma correction means is selected according to the screen coordinates and the depth value of each pixel. A graphics drawing apparatus, wherein brightness adjustment is performed in accordance with the screen coordinates and the depth value by using the selected color value as a color value of the pixel. 前記ガンマ補正手段がルックアップテーブルであることを特徴とする請求項1乃至3のいずれか一項に記載のグラフィックス描画装置。 The graphics drawing apparatus according to claim 1, wherein the gamma correction unit is a look-up table. 前記ルックアップテーブルが、インデックステクスチャの生成のために共用されることを特徴とする請求項4記載のグラフィックス描画装置。 5. The graphics drawing apparatus according to claim 4, wherein the lookup table is shared for generating an index texture.
JP2004317854A 2004-11-01 2004-11-01 Graphics rendering device with gamma correction function based on depth value Pending JP2006127368A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004317854A JP2006127368A (en) 2004-11-01 2004-11-01 Graphics rendering device with gamma correction function based on depth value

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004317854A JP2006127368A (en) 2004-11-01 2004-11-01 Graphics rendering device with gamma correction function based on depth value

Publications (1)

Publication Number Publication Date
JP2006127368A true JP2006127368A (en) 2006-05-18

Family

ID=36722034

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004317854A Pending JP2006127368A (en) 2004-11-01 2004-11-01 Graphics rendering device with gamma correction function based on depth value

Country Status (1)

Country Link
JP (1) JP2006127368A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008033897A (en) * 2006-06-29 2008-02-14 Matsushita Electric Ind Co Ltd Image processing apparatus, image processing method, program, recording medium, and integrated circuit
JP2008112391A (en) * 2006-10-31 2008-05-15 Fujitsu Ltd Fog effect processing method, graphics apparatus, graphics semiconductor integrated circuit device, and fog effect processing program
CN108305578A (en) * 2017-01-12 2018-07-20 辛纳普蒂克斯日本合同会社 For sub-pixel rendering and the system and method for display driver

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008033897A (en) * 2006-06-29 2008-02-14 Matsushita Electric Ind Co Ltd Image processing apparatus, image processing method, program, recording medium, and integrated circuit
JP2008112391A (en) * 2006-10-31 2008-05-15 Fujitsu Ltd Fog effect processing method, graphics apparatus, graphics semiconductor integrated circuit device, and fog effect processing program
CN108305578A (en) * 2017-01-12 2018-07-20 辛纳普蒂克斯日本合同会社 For sub-pixel rendering and the system and method for display driver

Similar Documents

Publication Publication Date Title
US11069128B2 (en) Rendering an image from computer graphics using two rendering computing devices
JP4291892B2 (en) Image processing apparatus and method
EP1977801B1 (en) Game machine, game machine control method, and information storage medium
JP3626144B2 (en) Method and program for generating 2D image of cartoon expression from 3D object data
JP2004110597A (en) Image generation information, information storage medium, and image generation device
US6927778B2 (en) System for alpha blending and method thereof
JP2007066064A (en) Image generating device and image generating program
EP1355276A2 (en) System and method for distance adjusted rendering
US6833836B2 (en) Image rendering process for displaying three-dimensional image information on a two-dimensional screen
JP2006127412A (en) Drawing device and drawing method
JP2002260007A (en) Plotting method, plotting device, computer readable recording medium for recording plotting processing program to be executed by computer, program executing device for executing plotting processing program and plotting processing program to be executed by computer
KR100453529B1 (en) APPARATUS AND METHOD FOR DRAWING THREE DIMENSIONAL GRAPHICS BY CONTROLLING α VALUE BASED ON Z COORDINATE VALUE
US6744440B1 (en) Image processing apparatus, recording medium, and program
KR20080100854A (en) A computer readable recording medium on which a rendering processing method, a rendering processing apparatus, and a rendering processing program are recorded.
JP2001126086A (en) Method and device for displaying three-dimensional model in video game, game machine, and computer- readable recording medium storing three-dimensional model displaying program for video game
JP3035571B2 (en) Image processing device
JP2006127368A (en) Graphics rendering device with gamma correction function based on depth value
JP2006011539A (en) Program, information storage medium, and image generation system
JP2001283254A (en) Three-dimensional graphic plotting device and its method
KR100603134B1 (en) 3D Rendering Processing Method Using Monochromatic Light and Its Apparatus
US12322030B2 (en) Computer-readable non-transitory storage medium having image processing program stored therein, image processing apparatus, image processing system, and image processing method
JP2015045958A (en) Display processing unit, display processing method, and program
JP4563070B2 (en) GAME DEVICE AND GAME PROGRAM
JP4449582B2 (en) Image generation device
JP2009211243A (en) Program, information storage medium, and image generation system