JP4740476B2 - Method and apparatus for providing a logical combination of N alpha operations in a graphics system - Google Patents

Method and apparatus for providing a logical combination of N alpha operations in a graphics system Download PDF

Info

Publication number
JP4740476B2
JP4740476B2 JP2001163359A JP2001163359A JP4740476B2 JP 4740476 B2 JP4740476 B2 JP 4740476B2 JP 2001163359 A JP2001163359 A JP 2001163359A JP 2001163359 A JP2001163359 A JP 2001163359A JP 4740476 B2 JP4740476 B2 JP 4740476B2
Authority
JP
Japan
Prior art keywords
alpha
texture
shader
graphics
recirculating shader
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.)
Expired - Fee Related
Application number
JP2001163359A
Other languages
Japanese (ja)
Other versions
JP2002074385A (en
Inventor
ワイ ロー パトリック
吉孝 安本
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.)
Nintendo Co Ltd
Original Assignee
Nintendo 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 Nintendo Co Ltd filed Critical Nintendo Co Ltd
Publication of JP2002074385A publication Critical patent/JP2002074385A/en
Application granted granted Critical
Publication of JP4740476B2 publication Critical patent/JP4740476B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、コンピュータグラフィックスに関し、より特定的には、家庭用ビデオゲームプラットフォームのような対話式グラフィックスシステムに関する。さらにより特定的には、本発明は、N個のアルファチャンネル演算の論理結合を用いて、漫画のアウトライニングなどのフォトリアリスティックでない画像を含む興味深いグラフィックス効果を生じさせることに関する。
【0002】
【従来の技術】
我々の多くは、非常に現実感のある恐竜や宇宙人、アニメ化されたおもちゃといった空想的な生物を含む映像を目にしたことがある。このようなアニメーションは、コンピュータグラフィックスによって可能となっている。このような技術を用いて、コンピュータグラフィックス製作者は、各物体がどのように見えるか、および時間の経過に伴ってどのような外見上の変化が生じるかを特定することができる。そして、コンピュータが、物体をモデル化し、テレビやコンピュータ画面などのディスプレイに表示する。表示画像の各部分の着色や形状が、そのシーンに存在する個々の物体の位置や向き、各物体に対する照明方向、各物体の面の質感、その他様々な要素に基づいて確実にうまく行なわれるために必要な数多くのタスクは、コンピュータが引き受ける。
【0003】
コンピュータグラフィックスの生成は複雑なため、ほんの数年前まで、コンピュータで作成した3次元グラフィックスの活用は、高価で専門化されたフライトシミュレータやハイエンドグラフイックスワークステーション、スーパーコンピュータにほぼ限定されていた。人々は、コンピュータシステムによって生成された画像を、映画や制作費の高いテレビ広告において目にすることはあっても、グラフィックス生成を行なうコンピュータに実際に接することはできなかった。このような状況が変化したのは、ニンテンドウ64(登録商標)やパーソナルコンピュータで利用可能な各種の3Dグラフィックスカードなど、比較的安価な3Dグラフィックスプラットフォームの出現によるものである。今や、自宅や勤務先でも、比較的安価なコンピュータグラフィックスシステム上において、迫力のある3Dアニメーションやシミュレーションと対話的に接することが可能となっている。
【0004】
これまでのコンピュータグラフィックス研究のほとんどは、現実感のある画像を生成することが中心となる傾向にあった。この研究は、大きな成果を上げている。いまや、コンピュータは、写真と区別がつかないほど現実感のある画像を生成することができるようになった。たとえば、我々の多くは、映画やテレビにおいて、本物のような恐竜や宇宙人、コンピュータによって生成されたフォトリアリスティックな特殊効果を見てきている。新人のパイロットは、実際の飛行をほぼ再現するような高い現実感のあるコンピュータに基づくフライトシミュレータ上で訓練を行なっている。いまや、低価格の家庭用ビデオゲームシステムは、非常に高い現実感を提供することができ、ゲームプレーヤに対して、実際のレーシングカーを競技場で運転したり、雪や氷で覆われたスキー斜面をスキーで滑り降りたり、中世の城の中を歩いたりといった幻影を与えることができる。ゲームの多くは、このような現実感の幻影によって、ゲームプレイ体験を大きく拡張している。
【0005】
現実感を拡張する方法の一つとして、「アルファブレンディング」と呼ばれる技術を用いて、面の不透明度(透明度)をモデリングする方法がある。この従来技術を用いて、各画像要素は、不透明度の度合いを表す「アルファ値」が割り当てられる。画像要素の色は、アルファ値に基づいてブレンディングされ、あるオブジェクトが他のオブジェクトを通して透けて見えるようにすることができる。さらに他の従来技術として、「アルファ関数」または「アルファテスト」と呼ばれるものがあり、これを用いて、オブジェクト・フラグメントのアルファ値を基準関数または基準値と比較することによって、当該オブジェクト・フラグメントを破棄することができる。アルファテストは、透明だから見えなくなるであろうという理由で、画像の一部となるであろう部分をブレンドしない(すなわち、破棄する)と決定することもできる。
【0006】
アルファブレンディングおよびアルファテストは、水やガラスなどの透明なオブジェクトをモデリングするのに特に有効である。これと同じ機能を、テクスチャマッピングと共に用いて、様々な効果を達成することもできる。たとえば、アルファテストは、マットとして機能するアルファ要素と共に、ポリゴン上のテクスチャマップを用いて複雑な形状を描くために頻繁に用いられる。例として、木は、ポリゴン上で木のピクチャ(テクスチャ)として描くことが可能である。テクスチャ画像の木の部分は、アルファ値1(不透明)とし、木でない部分はアルファ値0(透明)とすることができる。このように、ポリゴンの「木でない」部分は、テクスチャマップの見えない(透明な)部分にマッピングされ、ポリゴンの「木」の部分は、テクスチャマップの見える(不透明)部分にマッピングされる。
【0007】
テクスチャのアルファ要素のこの他の使い方として、たとえば、穴をあけたり、面をトリムするといったことが挙げられる。一例として、カットアウトまたはトリム領域の画像は、テクスチャマップに保存することができる。ポリゴン面にテクスチャをマッピングする際には、アルファテストまたはアルファブレンディングを用いて、ポリゴン面からカットアウトまたはトリムされた領域をカットすることができる。さらに、コンピュータグラフィックスシステムのアルファチャンネルを用いて、漫画のアウトライニングなどのフォトリアリスティックでない画像効果を提供することもできる。1999年12月21日出願の米国特許出願番号09/468,109に開示された機構では、リアルタイムレンダリングシステムのアルファチャンネルを用いて、異なるオブジェクトや異なるオブジェクト部分に対応する識別子を符号化している。このシステムでは、オブジェクトをカラーフレームバッファにいれてレンダリングし、対応するオブジェクトIDをアルファフレームバッファに書き込む。アルファテスト処理がアルファフレームバッファに対して行なわれ、アルファ比較結果(すなわち、2つのアルファ値の差の絶対値)を用いて、シルエットや異なるアルファ/IDで符号化された画像領域間で規定された輪郭を囲んでいる輪郭線の配色を、選択的にブレンドする。
【0008】
DirectXやOpenGLなどの典型的な一般に利用可能な3Dグラフィックスアプリケーションプログラマインターフェースは、アルファ比較に対応している。このアルファ比較は、透明度のためや、たとえば反復アルファまたはテクスチャアルファと定数との比較を行なって、比較が失敗したピクセルを「キル」するためのものである。一例として、Direct3Dには、アルファテストをイネーブルするために用いられる「D3DRENDERSTATE AlPHATEST−ENABLE」というコマンドが用意されている。コマンドD3DCOMFUNCといった列挙型によれば、プログラマはアルファ比較演算(たとえば、決して〜ない、常に、<、>、以下、以上、不等など)において用いられるであろうテストを特定することができる。たとえば、アルファ比較関数が「以上」に設定され、ラスタライズされるピクセルが、ピクセルに既に存在するカラーよりも不透明である場合、Direct3Dは、これを完全にスキップして、2つのカラーをブレンドするのにかかるであろう時間を節約し、カラーバッファやzバッファが更新されるのを防止する。また、D3DRENDERSTATE_ALPHAREFコマンドを用いて、新たなアルファを、プログラマが指定した基準アルファ値と比較することもできる(たとえば、「もし、アルファ<128/255であれば、ピクセルをキルする」)。たとえば、コバック他、「インサイドDirect3D(マイクロソフト2000)」、289〜291頁を参照のこと。同様のアルファテスト/比較機能は、GL_ALPHA_TEST,GL_ALPHA_TEST_FUNC,GL_ALPHA_TEST_REFコマンドによって、OpenGLにおいても用意されている。ナイダー他、「OpenGLプログラミングガイド」(アディソン−ウエズリー、1993年)の301〜302頁を参照のこと。
【0009】
上述の漫画のアウトライニングアルゴリズムを含む、様々で複雑なアルファ比較を実施する際に生じる問題として、単一のレンダリングパスを用いて、ハードウェアにおいて、より複雑なアルファ比較をいかに効率的に行なうかということがある。たとえば、任意な複雑性を有するアルファテストは、典型的には、プロセッサによって実行されるソフトウェアによって直接的に行うことができるが、(たとえば、より高速に行なうためには)ハードウェアに基づいたアルファテストを用いた方が望ましい場合もある。このような任意な複雑性を有するアルファテスト機能は、家庭用ビデオゲームやパーソナルコンピュータのグラフィックスカードなどといった低価格グラフィックスシステムにおいては、これまで通常利用できないものであった。
【0010】
本発明は、この問題を解決するものであって、論理的に結合可能な複数のアルファ比較を行なうことが可能な、ハードウェアに基づくピクセルシェーダを提供することによって、幅広いアルファテスト機能を達成するものである。本発明の一局面によれば、ピクセルシェーダは、シェードツリーに類似した透過ツリーを提供するために用いることができる。特に、アルファ機能を用いて、N個の論理アルファ演算をMアルファ入力に対して行なうことができる。ここで、NおよびMは、いかなる整数であってもよい。
【0011】
本発明の一局面が提供するのは、グラフィックス画像を生成する方法であって、画像化される面を表す情報(前記情報はアルファを含む)を生成し、同一のレンダリングパス内において、複数のアルファ比較を前記アルファ情報に対して実行して、対応する複数のアルファ比較結果を提供し、前記複数のアルファ比較結果を論理的に結合し、少なくとも一部は前記論理結合に基づいて、前記グラフィックス画像をレンダリングする方法である。レンダリングステップは、前記論理結合に基づいてピクセルをキルするか否かを選択することを含んでもよい。実行ステップは、ハードウェア内および/または再循環シェーダを用いて行なわれてもよい。
【0012】
本発明の他の局面によれば、グラフィックスシステムは、テクスチャ座標マトリックス乗算器を含むテクスチャ部と、アルファチャンネルを含むシェーダと、アルファ画像を記憶可能な組み込みフレームバッファと、アルファ画像を上記フレームバッファからコピーして前記テクスチャ部がテクスチャとして利用できるよ うにするコピーアウトパイプラインとを備え、前記グラフィックスシステムは、単一のレンダリングパスにおいて複数のアルファ比較を行なう。
【0013】
アルファ比較およびアルファ論理演算を結合して用いることによって、アルファに基づく付加的な効果を幅広く達成することができる。たとえば、二重のアルファ比較を用いて、漫画のアウトライニングなどのフォトリアリスティックでない効果を提供することができる(たとえば、絶対値関数を実施することによって、前記論理結合に基づいた漫画の輪郭線カラーのブレンドを行なうか否かを効率的に決定することができる)。
【0014】
【発明の実施の形態】
図1は、対話式3Dコンピュータグラフィックスシステム50の例を示す。システム50は、興味をそそる立体音響を伴う対話式3Dビデオゲームをプレイするのに用いることができる。また、これは、他の様々な用途に応用できる。
【0015】
本例において、システム50は、デジタル表現や3次元世界モデルを、対話的にリアルタイムで処理することができる。システム50は、世界のすべてまたは一部を、任意の視点から表示することができる。たとえば、システム50は、手持ちコントローラ52aおよび52bなどの入力装置からのリアルタイム入力に応答して、視点を対話的に変化させることができる。これにより、ゲームプレイヤは、世界の内部または外部の者から見た世界を見ることができる。システム50は、リアルタイム3D対話式表示を要求しないような用途(たとえば、2D表示生成および/または非対話式表示)に用いることもできるが、上質の3D画像を非常に高速に表示する能力は、現実感の高いおもしろいゲームプレイなどの視覚的な対話を生成するのに用いることができる。
【0016】
システム50を用いてビデオゲームなどのアプリケーションをプレイするためには、ユーザは、まず、ケーブル58を用いて、メインユニット54をユーザのカラーテレビ56などの表示装置に接続する。メインユニット54は、カラーテレビ56を制御するためのビデオ信号および音声信号を生成する。ビデオ信号は、テレビ画面59に表示される画像を制御するものであり、音声信号は、テレビのステレオスピーカ61Lおよび61Rを介して、音として再生される。
【0017】
また、ユーザは、メインユニット54を電源に接続する必要がある。この電源は、家庭の壁にある電気コンセントに差し込む従来のACアダプタ(図示せず)であってもよく、家庭用電流を、メインユニット54に電力供給するのに適切な、より低いDC電圧信号に変換する。他の態様として、電池を用いることも可能である。
【0018】
ユーザは、ハンドコントローラ52aおよび52bを用いて、メインユニット54を制御してもよい。たとえば、操作部60を用いて、テレビ56に表示されるキャラクタが3次元世界内で移動すべき方向(上または下、左または右、近または遠)を指定することができる。また、操作部60は、他の用途のための入力を与える(たとえば、メニュー選択、ポインタ/カーソル制御など)。コントローラ52は、様々な形態を取り得る。本例においては、図示された各コントローラ52は、ジョイスティック、押しボタン、および/または方向スイッチなどの操作部60を含む。コントローラ52のメインユニット54への接続は、ケーブルであってもよいし、電磁波(たとえば、電波または赤外線波)を介した無線であってもよい。
【0019】
ゲームなどのアプリケーションをプレイするためには、ユーザは、プレイしたいと思う当該ビデオゲームなどのアプリケーションを記憶する適切な記憶媒体62を選択して、当該記憶媒体をメインユニット54内のスロット64に挿入する。記憶媒体62は、たとえば、特に符号化されたおよび/または暗号化された光学および/または磁気ディスクであってもよい。ユーザは、電源スイッチ66を操作して、メインユニット54をオンして、記憶媒体62に記憶されたソフトウェアに基づいてビデオゲームなどのアプリケーションの実行を開始してもよい。ユーザは、コントローラ52を操作して、メインユニット54に入力を与えてもよい。たとえば、操作部60を操作すると、ゲームなどのアプリケーションが開始されてもよい。他の操作部60を動かすと、動くキャラクタを異なる方向へ移動させたり、3D世界内でのユーザの視点を変化させたりすることができる。記憶媒体62内に記憶された特定のソフトウェアに基づいて、コントローラ52上の様々な制御部60は、異なる時に異なる機能を実行することができる。
【0020】
<システム全体の電子回路例>
図2は、システム50の構成要素例のブロック図を示す。主な構成要素は以下のものを含む。
・メインプロセッサ(CPU)110、
・メインメモリ112、および
・グラフィックス&音声プロセッサ114
【0021】
本例においては、メインプロセッサ110(たとえば、拡張されたIBMPowerPC750)は、グラフィックス&音声プロセッサ114を介して手持ちコントローラ108(および/または他の入力装置)からの入力を受ける。メインプロセッサ110は、ユーザ入力に対話的に応答して、たとえば外部記憶媒体62から光学ディスクドライブなどの大容量記憶アクセス装置106を介して供給されるビデオゲームなどのプログラムを実行する。一例として、ビデオゲームプレイの場合、メインプロセッサ110は、様々な対話的な制御機能に加えて、衝突検出や動画処理を行うことができる。
【0022】
本例において、メインプロセッサ110は、3Dグラフィックスコマンドおよび音声コマンドを生成して、グラフィックス&音声プロセッサ114に送る。グラフィックス&音声プロセッサ114は、これらのコマンドを処理して、興味をそそる視覚的な画像をディスプレイ59に生成したり、興味をそそる立体音響をステレオスピーカ61Rおよび61Lなどの適切な音発生装置に生成したりする。
【0023】
本例のシステム50が含むビデオエンコーダ120は、グラフィックス&音声プロセッサ114から画像信号を受信して、当該画像信号を、コンピュータモニタや家庭用カラーテレビ56などの標準的な表示装置に表示するのに適切なアナログおよび/またはデジタルビデオ信号に変換する。また、システム50が含む音声コーデック(圧縮器/伸長器)122は、デジタル化された音声信号の圧縮および伸長を行い、また、必要に応じて、デジタルまたはアナログ音声信号形式への変換を行なってもよい。音声コーデック122は、音声入力をバッファ124を介して受信して、グラフィックス&音声プロセッサ114に与えて、処理を行なうことができる(たとえば、プロセッサが生成した他の音声信号とミキシングするおよび/または大容量記憶アクセス装置106のストリーミング音声出力を介して受信する)。本例のグラフィックス&音声プロセッサ114は、音声関連情報を音声タスク用に利用可能な音声メモリ126に記憶することができる。グラフィックス&音声プロセッサ114は、処理結果の音声出力信号を音声コーデック112に与えて、スピーカ61Lおよび61Rによって再生できるように、(たとえば、バッファ増幅器128Lおよび128Rを介して)伸長やアナログ信号への変換が行われる。
【0024】
グラフィックス&音声プロセッサ114は、システム50内にある様々な付加的な装置と通信を行うことが可能である。たとえば、パラレルデジタルバス130が、大容量記憶アクセス装置106および/または他の構成要素との通信に用いられてもよい。シリアル周辺機器バス132が、様々な周辺機器などの機器との通信に用いられてもよく、それらの機器としては、たとえば、以下のものを含む。
・プログラム可能な読み出し専用メモリおよび/またはリアルタイムクロック134、
・モデム136などのネットワークインターフェース(インターネットなどのデジタルネットワークのような、プログラム命令および/またはデータをダウンロードしたりアップロードしたりすることが可能な電気通信ネットワーク138に対して、システム50を接続するようなものであってもよい)、および
・フラッシュメモリ140。
【0025】
別の外部シリアルバス142が、付加的な拡張メモリ144(たとえば、メモリカード)などの装置との通信に用いられてもよい。コネクタが、様々な装置をバス130、132、および142を接続するために用いられてもよい。
【0026】
<グラフィックス&音声プロセッサの例>
図3は、グラフィックス&音声プロセッサ114の例のブロック図である。一例として、グラフィックス&音声プロセッサ114は、単一チップASIC(特定用途向けIC)であってもよい。本例において、グラフィックス&音声プロセッサ114は、以下のものを含む。
・プロセッサインターフェース150、
・メモリインターフェース/コントローラ152、
・3Dグラフィックスプロセッサ154、
・音声デジタル信号プロセッサ(DSP)156、
・音声メモリインターフェース158
・音声インターフェース&ミキサ160
・周辺機器コントローラ162、および
・ディスプレイコントローラ164。
【0027】
3Dグラフィックスプロセッサ154は、グラフィック処理タスクを行う。音声デジタル信号プロセッサ156は、音声処理タスクを行う。ディスプレイコントローラ164は、画像情報をメインメモリ112からアクセスして、それをビデオエンコーダ120に与えて、表示装置56に表示させる。音声インターフェース&ミキサ160は、音声コーデック122とインターフェースし、また、別のソースからの音声(たとえば、大容量記憶アクセス装置106からのストリーミング音声、音声DSP156の出力、および音声コーデック122を介して受信した外部音声入力)をミキシングすることも可能である。プロセッサインターフェース150は、メインプロセッサ110およびグラフィックス&音声プロセッサ114間のデータおよび制御インターフェースを提供する。
【0028】
メモリインターフェース152は、グラフィックス&音声プロセッサ114およびメモリ112間のデータおよび制御に関するインターフェースを提供する。本例において、メインプロセッサ110は、グラフィックス&音声プロセッサ114の一部であるプロセッサインターフェース150およびメモリインターフェース152を介して、メインメモリ112にアクセスする。周辺機器コントローラ162は、グラフィックス&音声プロセッサ114および上述の様々な周辺機器間におけるデータおよび制御に関するインターフェースを提供する。音声メモリインターフェース158は、音声メモリ126とのインターフェースを提供する。
【0029】
<グラフィックスパイプラインの例>
図4は、3Dグラフィックスプロセッサ154の例のより詳細な図である。3Dグラフィックスプロセッサ154は、特に、コマンドプロセッサ200と、3Dグラッフィックスパイプライン180とを含む。メインプロセッサ110は、データのストリーム(たとえば、グラフィックスコマンドストリームやデータリスト)をコマンドプロセッサ200に伝達する。メインプロセッサ110は、メモリの待ち時間を最小限にするための2レベルキャッシュ115を有し、また、グラフィックス&音声プロセッサ114向けの未キャッシュのデータストリームのためのライトギャザリングバッファ111も有する。ライトギャザリングバッファ111は、部分キャッシュラインを集めて完全キャッシュラインとし、このデータを1キャッシュラインずつグラフィックス&音声プロセッサ114に送出して、バスが最大限に利用できるようにする。
【0030】
コマンドプロセッサ200は、メインプロセッサ110から表示コマンドを受信し、これを解析して、処理に必要な付加データを共通メモリ112から取得する。コマンドプロセッサ200は、頂点コマンドのストリームをグラフィックスパイプライン180に与えて、2Dおよび/または3D処理およびレンダリングを行う。グラフィックスパイプライン180は、これらのコマンドに基づいて画像を生成する。生成された画像情報は、メインメモリ112に転送されて、表示制御部/ビデオインターフェース部164によってアクセスできるようにしてもよく、それによって、ディスプレイ56にパイプライン180のフレームバッファ出力が表示される。
【0031】
図5は、グラフィックスプロセッサ154の論理フロー図である。メインプロセッサ110は、グラフィックスコマンドストリーム210と、表示リスト212と、頂点アレイ214とをメインメモリ112に記憶してもよく、バスインターフェース150を介してポインタをコマンドプロセッサ200に渡す。メインプロセッサ110は、メインメモリ110内に割り当てた1つ以上のグラフィックス先入れ先出し(FIFO)バッファ210にグラフィックスコマンドを記憶する。コマンドプロセッサ200は、以下のものを取り出す。
・グラフィックスコマンドを受信およびバッファリングして、同期/フロー制御およびロードバランシングを行なうオンチップFIFOメモリバッファ216を介して、メインメモリ112からのコマンドストリーム、
・オンチップ呼び出しFIFOメモリバッファ218を介して、メインメモリ112からの表示リスト212、および
・コマンドストリームからの、および/または頂点キャッシュ220を介してメインメモリ112内の頂点アレイ214からの頂点属性。
【0032】
コマンドプロセッサ200は、コマンド処理動作200aを行って、属性型を浮動小数点形式に変換し、その結果の完全な頂点ポリゴンデータをグラフィックスパイプライン180に渡して、レンダリング/ラスタライズする。プログラム可能なメモリ調停回路130(図4参照)は、グラフィックスパイプライン180、コマンドプロセッサ200、および表示制御部/ビデオインターフェース部164の間で共通のメインメモリ112に対するアクセスを調停する。
【0033】
図4に示すように、グラフィックスパイプライン180は、以下のものを含んでもよい。
・変換部1300、
・セットアップ/ラスタライザ400、
・テクスチャ部500、
・テクスチャ環境部600、および
・ピクセルエンジン部700。
【0034】
変換部1300は、2Dおよび3D変換などの様々な処理300aを行う(図5参照)。変換部300は、変換処理300aに用いられるマトリックスを記憶する1以上のマトリックスメモリ300bを含んでもよい。変換部1300は、頂点毎に入力される形状を、オブジェクト空間から画面空間へ変換し、入力されるテクスチャ座標を変換して投影テクスチャ座標を計算する(300c)。変換部1300は、ポリゴンクリッピング/カリング(300d)を行ってもよい。また、変換部300bによって行われるライティング処理300eによって、一実施例においては、8個の独立した光に対するライティング計算が頂点毎に行われる。また、変換部1300は、エンボス型のバンプマッピング効果を出すためのテクスチャ座標生成(300c)や、ポリゴンクリッピング/カリング処理(300d)を行うこともできる。
【0035】
セットアップ/ラスタライザ400は、セットアップ部を含む。セットアップ部は、頂点データを変換部300から受信して三角形セットアップ情報を1以上のラスタライザ(400b)に送信して、エッジラスタライズ、テクスチャ座標ラスタライズ、およびカラーラスタライズを行う。
【0036】
テクスチャ部500(オンチップテクスチャメモリ(TMEM)502を含んでもよい)、テクスチャリング関連の様々なタスクを行う。タスクには、たとえば、以下のものが含まれる。
・メインメモリ112からテクスチャ504を取り出す、
・たとえばマルチテクスチャ処理、ポストキャッシュテクスチャ伸展、テクスチャフィルタリング、エンボス、投影テクスチャを用いたシャドウおよびライティング、ならびにアルファ透明およびデプスを用いたBLITを含む、テクスチャ処理(500a)、
・バンプマッピング、疑似テクスチャ、テクスチャタイリング効果のためのテクスチャ座標変換量を計算するバンプマップ処理(500b)、および
・間接テクスチャ処理(500c)。
【0037】
テクスチャ部500は、透過されたテクスチャ値をテクスチャ環境部600に出力して、テクスチャ環境処理を行なう(600a)。
【0038】
テクスチャ部500は、再循環し、直接および間接テクスチャリングを両方とも実行可能で、単一のレンダリングパス中に、テクスチャマッピング出力シーケンスをブレンディング用にテクスチャ環境部600に与える。米国特許出願番号09/722,382、名称「グラフィクスシステムにおいて直接および間接テクスチャを処理するための方法および装置」(代理人整理番号723−961)および2000年8月23日出願の対応仮出願番号60/226,891を参照のこと。両出願は、本願に引用によって合体される。
【0039】
テクスチャ環境部600は、ポリゴンとテクスチャカラー/アルファ/デプスをブレンドし、テクスチャフォグ処理(600b)をも行って、インバースレンジに基づくフォグ効果を達成する。テクスチャ環境部600は、複数のステージを提供して、たとえばカラー/アルファ・モジュレーション、エンボス、ディテールテクスチャリング、テクスチャスワッピング、クランピング、およびデプスブレンディングに基づいて、他の興味をそそる様々な環境関連の機能を行うことができる。
【0040】
ピクセルエンジン700は、デプス(z)比較(700a)およびピクセルブレンディング(700b)を行う。本例において、ピクセルエンジン700は、組み込み(オンチップ)フレームバッファメモリ702にデータを記憶する。グラフィックスパイプライン180は、1以上の組み込みDRAMメモリ702を含んでもよく、フレームバッファの内容および/またはテクスチャ情報をローカルに記憶する。現在有効なレンダリングモードによっては、Z比較700a’は、グラフィックスパイプラインの早い段階において行われることもできる(たとえば、アルファブレンディングが不要であれば、z比較は早い段階で行うことができる。)。ピクセルエンジン700は、コピー処理700cを含む。これは、オンチップフレームバッファの内容をメインメモリに周期的に書き込むものであり、表示/ビデオインターフェース部164がアクセスできるようにする。このコピー処理700cを用いて、組み込みフレームバッファ702の内容からテクスチャまでを、メインメモリ112にコピーすることもでき、動的なテクスチャ合成効果が得られる。アンチエイリアシングやその他のフィルタリングは、コピーアウト処理中に行うことができる。(最終的にはメインメモリ112に記憶される)グラフィックスパイプライン180のフレームバッファ出力は、フレーム毎に、表示/ビデオインターフェース部164によって読み出される。表示制御部/ビデオインターフェース164は、ディジタルRGBピクセル値を与えて、ディスプレイ102に表示する。コピーアウトパイプラインは、ピクセルエンジン700の一部であってもよく、このコピーアウトパイプラインにより、組み込みフレームバッファ702の内容の一部または全部を、単一のレンダリングパス内において、テクスチャとして、メインメモリ112にコピーアウトすることができる。そして、テクスチャ部500は、コピーアウトされたテクスチャをテクスチャメモリ502に読み出して、テクスチャマッピングの付加的な視覚化を行なう際にこれをフレームバッファの内容として用いてもよい。システム50が、たとえば、組み込みフレームバッファ702に入れてレンダリングされたアルファ情報をコピーアウトして、このアルファ情報をテクスチャとしてテクスチャマッピングの際に適用して、組み込みフレームバッファの内容に加えることも可能である。これらすべては、同一のレンダリングパス内で行なわれる。米国特許出願番号09/722,663、名称「内部フレームバッファと主メモリ間でのコピーアウト変換を有するグラフィクスシステム」(代理人整理番号723−963)および2000年8月23日出願のその対応仮出願番号60/227,030を参照のこと。両出願は、本願に引用によって合体される。
【0041】
<N個のアルファ比較の論理結合>
同時係属出願番号09/722,367、ドレビン他、「グラフィクスシステム用再循環シェードツリーブレンダ」(代理人参照番号723−968)に記載されているように(この出願による図面を含むすべての開示は、本願に引用によって合体される)、再循環シェーダの実施例602(図6〜12b参照)は、単一のレンダリングパス内におけるアルファテスト結果の論理結合を含む、様々なアルファ関数に対応している。本実施例において、アルファ関数は、以下のいずれか一つの演算を用いて、ソースアルファを基準アルファと比較する。
・常に
・決して〜ない
・不等
・等しい
・未満
・以上
・以下
・超える
本実施例において、2つの関数は、以下のものを用いて結合される。
・AND
・OR
・XOR
・XNOR
ピクセルクワッド内のすべての有効なピクセルがアルファテストに失敗する場合は、当該クワッドは破棄され、したがって、フレームバッファ702は更新されない。なお、本実施例において、(再循環論理の一部である)比較器674を用いてアルファチャンネル比較が行なわれるにもかかわらず、アルファ比較演算は、再循環ステージの一部ではなく、むしろ、再循環が完了した後に行なわれるものである点に注意されたい。以下は、実施することが可能な例である。
例1
Asrc>Aref0 AND Asrc<Aref1
例2
Asrc>Aref0 OR Asrc<Aref1
例3
Asrc>Aref OR Asrc<−Aref
【0042】
このように、(たとえば、非再循環アルファ比較と結合して)再循環シェーダ602のアルファ機能を用いて、シェードツリーに類似した透過ツリーを提供することができる。特に、再循環シェーダ602のアルファ機能を用いて、N個の論理アルファ処理をM個のアルファ入力に対して行なうことができる。ここで、NおよびMは、いかなる整数であってもよい。アルファ比較およびアルファ論理演算を用いて、たとえば、漫画のアウトライニングなどのフォトリアリスティックでない効果を提供することができる。
【0043】
<漫画のアウトライニング技術の例>
図14および15は、漫画のキャラクタに境界線または輪郭線を付けるのが望ましいことを示す。図14の漫画のキャラクタ例1300は、シルエットの輪郭1302に付けられた境界線を有する。シルエットの輪郭1302により、画像の明確性が向上して手書きの漫画や漫画本形式の画像を再現するといった「漫画のアウトライニング」効果が生じる。
【0044】
図14は、この漫画のキャラクタ1300が、右手、手首、および上腕部を有し、自身の前で上腕を曲げている状態であることを示している。漫画作家は、右手、手首、および上腕部の回りの輪郭に対しても、たとえここに示す当該キャラクタの姿勢ではそれがシルエット輪郭というよりは内部輪郭であるにもかかわらず、境界線を付ける。キャラクタのシルエット輪郭1302だけに漫画のアウトライニングを適用するのであれば、漫画のキャラクタ1300の部位は、消えてしまったり、不明確になってしまう恐れがあるということを、図14は示している。見る者は、(ぬり絵本や、手書きの動画キャラクタおよび/または漫画本の経験から)手、手首、および上腕をはっきり区別するために、これらにも境界線が付けられていることを期待する。
【0045】
漫画のキャラクタ1300が手書きであるかのように見せるためには、境界線をシルエット輪郭だけでなく、一定の内部輪郭304に対しても付けるようにするのが有用であろう。一定の内部輪郭とは、すなわち、本例においては、自身の前で折り曲げているキャラクタの手、手首、および上腕部を規定する内部輪郭に該当する。図15は、これら内部輪郭304に境界線が付けられたキャラクタ1300を示す。これら内部輪郭304は、キャラクタ1300が腕を挙げて伸ばした状態であればシルエット輪郭となるが、図15の腕の向きでは、内部輪郭である。
【0046】
この問題を解決する方法として、異なるオブジェクトまたはオブジェクトの部分に対して異なるID値を割り当てて、レンダリング処理中にID値とピクセルとを関連付けることによって、どのピクセルが異なるオブジェクトまたはオブジェクトの部分を表すかを追跡するという方法がある。このような識別値は、一例として、フレームバッファ702内にある、通常はアルファ情報を符号化するために用いられるビットを当てることによって、割り当てることができる。割り当てられた識別値は、ピクセル位置において境界線を描くか否かを決定するために用いられてもよい。たとえば、システムは、ピクセルの識別値を、近傍の(たとえば、隣接する)ピクセルの識別値と比較してもよい。2つの隣接ピクセルの識別値が所定の関係にある場合には、境界線は描かれない。識別値が同一の場合は、2つのピクセルは同一面上にあり、境界線は描かれない。2つの隣接するピクセルの識別値が、異なるオブジェクトまたはオブジェクトの異なる部分が重なっている旨示すような、他の所定の関係にある場合には、境界線が描かれる。
【0047】
図16〜18は、一例を示す。図16は、3つのオブジェクト部分1320,1322,1324を備えるオブジェクト1319を示す。図17は、同一のオブジェクト1319の平面図を示す。オブジェクト部分1320は正方形であり、オブジェクト部分1322は円であり、オブジェクト部分1324は円錐である。グラフィックデザイナが、円錐1324が視覚的に正方形1320と交わるところには境界線330(図16参照)を描きたいが、円錐が円1322と交わるところや円が正方形と交わるところには描きたくないと仮定する。
【0048】
この例において、正方形1320、円1322、および円錐1324内のピクセルは、それぞれ異なる識別値を用いて符号化される。たとえば、正方形1320内のピクセルは、識別値「1」によって符号化され、円1322内のピクセルは、識別値「2」によって符号化され、円錐1324内のピクセルは、識別値「3」によって符号化される。図18は、符号化された情報を記憶するフレームバッファ702のアルファ部分の例を示す。影付けされたセルは、隣接アルファ/ID値間の差である2(またはそれ以上)に基づいて境界線カラーが適用されるであろうセルを示す。
【0049】
アルファおよびカラー画像がフレームバッファ702に入れてレンダリングされた後のピクセル後処理フェーズにおいて、フレームバッファ内の様々な識別値がテストされる。隣接ピクセルとして識別値が同一であるピクセル(このようなピクセルはすべて同一面上にある)に関しては、境界線は描かれない。また、一定の基準または基準セット分だけ隣接ピクセルの識別値と異なる識別値をピクセルが有している場合には、境界線は描かれない(たとえば、ピクセルkの識別値が2未満だけピクセルk+1の識別値と異なってる場合には、境界線は描かれない)。しかしながら、一定の別の基準または基準セット分だけ隣接ピクセルの識別値と異なる識別値をピクセルが有している場合には、境界線が描かれる(たとえば、ピクセルkの識別値が2以上だけピクセルk+1の識別値と異なってる場合には、ピクセルkに境界線が描かれてもよい)。
【0050】
図19は、境界線を描くためのピクセル後処理ルーチン1350の例のフローチャートである。ルーチン1350は、ループ(ブロック1352〜1362)を含み、このループは、フレームバッファ702に記憶された画像内の各ピクセル[i][j]について行なわれる。上述したように、画像生成処理は、画像をフレームバッファに入れてレンダリングする一環として、通常はアルファ値を記憶するために割り当てられるフレームバッファビット内のオブジェクトの別個の各部分に対して、識別値を設定してもよい。ルーチン1350のテストは、これらのアルファ(現時点では、ID)値をテストして、境界線を描くか否かを決定する。この例において、ルーチン1350は、ピクセル[i][j]のアルファ(ID)値を取り出すとともに、隣接ピクセル(すなわち、ピクセル[i−1][j]およびピクセル[i][j−1])のアルファ(ID)値をも取り出す(ブロック1352)。その後、ルーチン1352は、(ブロック1354において)以下の計算を行なって、ピクセル[i][j]のアルファ(ID)値と隣接ピクセルのアルファ(ID)値との差分を判断する。
diffX=ABS(Alpha[i][j]−Alpha[i−1][j]
diffX=ABS(Alpha[i][j]−Alpha[i][j−1]
【0051】
その後、ルーチン1350は、計算の結果得られた差分値diffXおよdiffYをテストして、いずれかが所定の差分(たとえば、任意の定数閾値または1などのプログラム可能な閾値)を超えるか否かを判断する(ブロック1356)。差分値のうち少なくとも1つが所定の差分を超える場合には、ルーチン1350は、ピクセル[i][j]のカラーを境界線カラーに設定する(ブロック1358)。したがって、アルファの傾きが−1から+1の場合、本実施例において、ピクセルは同一面上にあると考えられる。ステップ1352〜1358は、繰り返されて、画像内の各ピクセルに対して行なわれる(ブロック1360,1362)。
【0052】
ルーチン1350の変形例として、或るオブジェクトが特別のアルファ識別値(たとえば、0x00)を用いて符号化されて、当該オブジェクト内のピクセルは境界線を描く際には無視されるように指定することができる(図20参照)。これは、たとえば、境界線のないオブジェクトをビットマップとしてレンダリングする場合に有用である(たとえば、爆発を表す動画の場合)。
【0053】
図21は、図14および15に示すオブジェクト1300上に効率的に境界線を描くために、上記のルーチン1350がどのように適用できるかを示す。この例において、オブジェクト1300の異なる部分は、異なるアルファ(ID)値を用いて符号化される。たとえば、オブジェクト1300は、2本の腕1311a,1311bおよび胴1309を含んでもよい。各腕は、手1313,手首部1310,下腕部1312,肘部1308,上腕部1310,肩部1317を含んでもよい。これら様々な各部分は、異なるアルファIDを用いて以下のように符号化することができる。
【表1】

Figure 0004740476
【0054】
上記のアルファID符号化例によって、ルーチン1350は、図21の濃い色の線で示す境界線を描くことになるが、反対部分が交わる他の(点線の)部分では境界線を描かない。
【0055】
上記符号化は、同一のオブジェクト1300の接続部が交わる部分に境界線を付けるために用いることもできる。従来のぬり絵本や、手書きの動画漫画などは、関節部分をよりはっきりとさせるためや、筋肉が発達しているような感じを出すために、このような自己交差部分に漫画のアウトライニングを付ける場合もある。たとえば、図22〜24は、キャラクタ1300の関節部1308(すなわち、肘)の拡大図であって、関節部は、キャラクタの上腕1310を前腕1312と連結している。上述の符号化を用いて、図23および24に示すように、外肢1310,1312とが互いに(たとえば接触して)隣接して方向付けされるように、関節部1308が曲げられて、ルーチン1350は、(下腕1310のアルファIDと上腕1312のアルファIDとの差が1より大きいということに基づいて)境界線分1316を体部位1310と1312とが交わる交差部分に付ける。
【0056】
<システム50上で実施される漫画のアウトライニング処理の例>
図25は、漫画のアウトライニングを提供するためにはシステム50をどのように用いればよいかを示す高次のフローチャート例であり、図26は、漫画のアウトライニングパイプラインを実施するためにはシステム50をどのように構成することができるかを示す例である。
【0057】
図25を参照して、漫画の輪郭線画像化または同様の効果を行なうためには、アプリケーションは、フレームバッファ702を、アルファチャンネルを含むように設定する(ブロック1400)。米国特許出願番号09/726,227、名称「再構成可能なピクセルフォーマットを有する組み込みフレームバッファを有するグラフィックスシステム」(代理人整理番号723−957)および2000年8月23日出願の対応仮出願番号60/226,910を参照のこと。両出願は、本願に引用によって合体される。そして、システム50は、シーンをフレームバッファ702に入れて描画するように制御される(ブロック1402)。しかしながら、この処理中に、各頂点情報の一部としてメインプロセッサ110から与えられるであろうオブジェクト識別子は、たとえば、システム50のアルファチャンネルに書き込まれ、フレームバッファ702内のアルファ位置に記憶される。
【0058】
面にIDを割り当てる場合には、細かい注意が要求される。本実施例のアルファチャンネルは、8ビットに限定されているので、1シーン内に256個以上もの異なるオブジェクトがある場合には、IDを再利用する必要があるということもあり得る。本実施例では、アルファは7ビットしか利用可能ではない。というのは、8ビット目は、閾値計算のサインビットとして利用されるからである。このことは、同一のIDを有する異なるオブジェクトが重ならなければ、問題ない。へこんだオブジェクト同士が重なる部分にシルエットが欲しい場合は、より複雑なIDおよび閾値システムを利用すればよい。これを実施する1つの方法として、1だけ異なるIDを同一のオブジェクトの異なる部分に割り当て、重なるであろう部分については、少なくとも2つの合計差分を有するようにするという方法がある。そして、閾値関数は、少なくとも2つの差分に対して、シルエットを作成する必要があるだけである。上述の図19を参照のこと。もちろん、異なる実施例であれば、異なる限定があり、これら特定の仕組みは、一例にすぎない。
【0059】
画像の所望する部分がフレームバッファ702に入れてレンダリングされると、ピクセルエンジン700は、フレームバッファのアルファ画像を外部フレームバッファまたは他のバッファ内のテクスチャにコピーするように制御される(ブロック1404、図14参照)。このようなコピーアウトは、たとえば、IA8テクスチャフォーマットに入れることもできる。同期やメモリのコヒーレンスを確保するために、適切な対策が行なわれる。米国特許出願番号09/726,227、名称「レンダリングモードに基づいた隠面処理の動的な再構成」および2000年8月23日出願の対応仮出願番号60/226,890に記載された同期トークン技術を参照のこと。両出願は、本願に引用によって合体される。
【0060】
アルファテクスチャを内部のフレームバッファからうまくコピーアウトして、テクスチャメモリ502に読み込んだ場合(図14参照)、システム50は、グラフィックスプロセッサ114を再構成して、隣接ピクセルアルファ間の差分に基づいて、輪郭線カラーをフレームバッファ702内のピクセルに書き込む(ブロック1406)。上述の図19を参照のこと。このような漫画の輪郭線を描く処理は、たとえば、ピクセルアルファ値を読み出し、これらのアルファ値を修正し、ブレンドパラメータとして再びアルファを書き戻すことを含んでもよい。テクスチャ座標の1対と2つの異なるテクスチャマトリックスとを用いて、隣接アルファ値をアルファテクスチャからルックアップすることができる。一方のマトリックスを単位行列として設定し、他方を単位行列に変換を加えたものとして設定することができる。ブレンドテスト/比較は、2つの一般的なアルファ比較関数にORまたはANDのような第3の論理計算を組み合わせて用いて、実施することができる。これによって、単に大小ではなく、範囲内外のテストが可能となる。
【0061】
より詳細には、差分計算(たとえば、[a0 −a1 ]の絶対値であって、a0 はあるピクセルのアルファ値、a1 は隣接ピクセルのアルファ値である)を行うためには、一方のアルファ値を他方のアルファ値から減算し、未クランプの結果をテクスチャ環境部の出力レジスタに書き込むようにテクスチャ環境部600を設定することができる。閾値を超えるアルファ値を検出するように、テクスチャ環境部600内のアルファ比較や他の値比較器を設定することができる。
alpha=texture1−texture2
acomp1=alpha<−X
acomp2=alpha>X
killpixel=acomp1 OR acomp2
【0062】
本一実施例において、テクスチャ環境部600からの未クランプの負の結果は、最上位ビットのセットにより、アルファ値に変換されてもよい。したがって、アルファ差分閾値が2の場合、アプリケーションは、アルファ差分が1より大きく(最大−2)より小さいピクセルに対して輪郭線カラーを書き込むことができる。ここで、最大値は255に等しい。比較結果に基づいて、レジスタからのカラー値にブレンドするようにテクスチャ環境部600を設定することができる。メインプロセッサ110は、このカラー値レジスタを所望の値に設定することもできる(たとえば、黒のアウトライニング効果用に黒を、青のアウトライニング効果用に青を、など)。
【0063】
本一実施例において、輪郭線の書き込みは、テクスチャ環境部600内の再循環シェーダの2つの再循環パスにおいて行なうことができる。第1のパスにおいて(ブロック1408)、水平アウトライニングがフレームバッファ702に入れて描かれる。これは、アルファテクスチャ画像を1ピクセル(テクセル)垂直に移動させるように設定されている変換部300によって実行される、テクスチャ座標変換マトリックス乗算に基づく。垂直アウトライニングを書き込むために用いられる第2のパスにおいて(ブロック1410)、アルファ画像を1ピクセル(テクセル)水平に移動させるように、テクスチャマトリックスを修正することができる。1ピクセルよりも大きく移動させれば、より太い輪郭線を描くこともできるが、輪郭線が太すぎると、見た感じが異常となる場合もある。
【0064】
水平および垂直輪郭線が両方ともフレームバッファ702に書き込まれると、フレームバッファはコピーアウトされて、表示することができるようになる(ブロック1412)。
【0065】
<例>
以下は、システム50を制御して漫画のアウトライニングを行なうのに用いることができるプログラミングインターフェースコールのセット例である。
【表2】
Figure 0004740476
【0066】
<GXSetTexCopySrc>
<説明>
この関数は、組み込みフレームバッファ(EFB)のソースパラメータをテクスチャ画像コピーに設定する。この機能は、グラフィックスプロセッサ(GP)を用いてテクスチャを生成する際に有用である。
【0067】
GPは、GXCopyTexで指定されたタイル型テクスチャにテクスチャをコピーする。GPは、タイル幅の倍数でない画像幅や高さが、コピーされた画像の未定義データでパディングされるように、タイル(32バイト)を常にコピーする。また、メインメモリ内の割り当てられた画像サイズは、32バイトの倍数でなければならない。GXGetTexBufferSizeを参照のこと。
【0068】
<引数>
left 最も左にある、コピーソースピクセルであって、2ピクセルの倍数
top 最も上にある、コピーソース行であって、2行の倍数
wd コピー幅であって、2ピクセルの倍数
ht コピー高さであって、2行の倍数
【0069】
<GXCopyTex>
<説明>
この関数は、組み込みフレームバッファ(EFB)の内容を、メインメモリ内のテクスチャ画像バッファdestにコピーする。この機能は、グラフィックスプロセッサ(GP)を用いてテクスチャを生成する際に有用である。クリアフラグがGX_TRUEの場合には、EFBは、コピー処理中に、現在のクリアカラーにクリアされる(GXSetCopyClear参照)。ソース画像は、GXSetTexCopySrcによって記述される。コピー処理中に、EFBの内容はテクスチャフォーマットに変換される。テクスチャフォーマットおよびフィルタをイネーブルするオプションボックスは、GXSetTexCopyDstを用いて設定される。
【0070】
割り当てられたバッファは、パディングされて、XとYとのテクスチャタイル(1タイル当たり32バイト)となる。パディング後のサイズを決定するためには、関数GXGetTexBufferSizeが用意されている。
【0071】
クリアフラグは、フレームバッファがコピー処理中にクリアされるべきことを示す。フレームバッファは、GXSetCopyClearによって指定された定数値にクリアされる。
【0072】
<引数>
dest :メインメモリ内のテクスチャ画像バッファへのポインタ。このポインタは、32バイトに調節される。
clear :このフラグがGX_TRUEの場合、フレームバッファはコピー中にクリアされなければならない。
【0073】
<GXLoadTexObjPreLoaded>
<説明>
この関数は、予めロードされたテクスチャを記述する状態を8つのハードウェアレジスタセットのうちの1つにロードする。これが生じる前に、テクスチャオブジェクトであるobjは、GXInitTexObjまたはGXInitTexObjCIを用いて初期化されなければならない。idパラメータは、テクスチャ状態レジスタセットを参照する。テクスチャは、GXPreLoadEntireTextureを用いて、事前にロードされなければならない。
【0074】
ロードされると、テクスチャは、どのテクスチャ環境(Tev)ステージにおいても、GXSetTevOrder関数を用いて利用することができる。GXInitは、初めに、GXSetTevOrderを呼び出して、GX_TEXMAP0をGX_TEVSTAGE0に、GX_TEXMAP1をGX_TEVSTAGE1に関連付けるといった、単一のテクスチャパイプラインを作成する。
【0075】
ここで、GXLoadTexObjPreLoadedは、GXSetTexRegionCallBackによって設定された関数を呼び出さない(また、テクスチャがカラーインデックスフォーマットの場合にはGXSetTlutRegionCallBackによって設定された関数を呼び出さない)ことに注意されたい。なぜなら、領域は明示的に設定されるからである。しかしながら、これらのコールバック関数は、予めロードするすべての領域を知っていなければならない。GXInitによって設定されるデフォルトのコールバックは、予めロードされた領域はないと推定する。
【0076】
<引数>
obj :テクスチャおよびその属性を記述するテクスチャオブジェクトをポイントする。
region :テクスチャメモリの領域を記述する領域オブジェクトをポイントする。
id :テクスチャ環境(Tev)ステージにおいて参照されるテクスチャを指名する。
【0077】
<GXInitTexObj>
<説明>
この関数は、非カラーインデックステクスチャのテクスチャオブジェクトを初期化または変更するために用いられる。テクスチャオブジェクトは、テクスチャに関連するすべてのパラメータを記述するために用いられ、このパラメータには、サイズ、フォーマット、ラップモード、フィルタモードなどが含まれる。テクスチャオブジェクトにメモリを提供するのはアプリケーションの任務である。初期化されると、テクスチャオブジェクトは、GXLoadTexObjを用いて8つのアクティブテクスチャIDのうちの1つと関連付けられる。
【0078】
カラーインデックステクスチャのテクスチャオブジェクトを初期化するには、GXInitTexObjCIを用いる。
【0079】
ミップマップフラグがGX_TRUEの場合には、テクスチャはミップマップであり、テクスチャは3重線形補間される。ミップマップフラグがGX_FALSEの場合には、テクスチャはミップマップではなく、テクスチャは2重線形補間される。フィルタモードや他のミップマップコントロールを無視するには、GXInitTexObjLODを参照のこと。
【0080】
<引数>
【表3】
Figure 0004740476
【0081】
<GXInitTexObjLOD>
<C言語仕様>
【挿入1】
Figure 0004740476
【0082】
<説明>
この関数は、テクスチャの詳細レベル(LOD)コントロールを、テクスチャオブジェクトに対して明示的に設定する。テクスチャオブジェクトにメモリを提供するのは、アプリケーションの任務である。GXInitTexObjまたはGXInitTexObjCIを用いてテクスチャオブジェクトを初期化する際に、ミットマップフラグに基づいて、この情報をデフォルト値に設定する。この関数により、プログラマは、これらデフォルトをオーバーライドすることができる。なお、この関数の呼び出しは、特定のテクスチャオブジェクトに対するGXInitTexObjまたはGXInitTexObjCIの後でなければならないことに注意されたい。
【0083】
グラフィックスハードウェアによって計算されたLODは、lod_biasパラメータを用いてバイアスをかけることができる。このlod_biasは、計算されたlodに加算され、その結果はmin_lodとmax_lodの間でクランプされる。bias_clampがイネーブルされると、lod_biasの効果は、ポリゴンがビュー方向に対してより垂直になるにつれて小さくなる。これにより、このような状態のテクスチャが鮮明になり過ぎることを防止するが、斜めのポリゴンに対してはLODバイアスを許容する。
【0084】
<引数>
【表4】
Figure 0004740476
【0085】
<GXInitTexPreLoadRegion>
<説明>
【0086】
この関数は、予めロードできるように、テクスチャメモリ(TMEM)領域オブジェクトを初期化する。この領域は、アプリケーションによって、TMEM内に割り当てられ、予めロードされたバッファとしてのみ用いることができる。キャッシュ領域は、GXInitTexCacheRegionを用いて割り当てられなければならない。予め割り当てられたテクスチャに関して、当該領域のサイズは、テクスチャのサイズと一致しなければならない。アプリケーションにより、多くの領域オブジェクトを作成することができ、領域オブジェクトのうちの幾つかは重なり合う可能性がある。しかしながら、2つの重なり合う領域が同時にアクティブにはなり得ない。
【0087】
領域の最大サイズは、512Kである。
【0088】
GXInitは、予めロードするための領域を作成しない。したがって、予めのロードが必要な場合は、アプリケーションが適切な領域を割り当てなければならない。また、GXInitTexCacheRegionおよびGXSetTexRegionCallBackを用いて、キャッシュ領域やそのアロケータを作成する必要がある。なぜなら、新たな領域は、デフォルトのテクスチャメモリ構成を破壊する場合があるからである。
【0089】
<引数>
【表5】
Figure 0004740476
【0090】
<漫画のアウトライニングを実施するソフトウェア制御された処理の例>
以下のプログラム部分は、グラフィックスパイプラインを制御して漫画のアウトライニング効果を行なうために用いることができる。
【挿入2】
Figure 0004740476
Figure 0004740476
【0091】
<互換可能な他の実施例>
上述のシステム構成要素50のうちのあるものは、上述の家庭用ビデオゲームコンソール以外であっても実施できる。たとえば、システム50のために書き込まれているグラフィックスアプリケーションなどのソフトウェアを、システム50をエミュレートするかまたはそれと互換性のある他の構成を用いたプラットフォーム上で実行することができる。他のプラットフォームが、システム50のハードウェアおよびソフトウェア資源の一部または全部をうまくエミュレート、模倣、および/または提供できるのであれば、当該他のプラットフォームは、ソフトウェアをうまく実行することができるであろう。
【0092】
一例として、エミュレータは、システム50のハードウェアおよび/またはソフトウェア構成(プラットフォーム)とは異なるハードウェアおよび/またはソフトウェア構成(プラットフォーム)を提供してもよい。エミュレータシステムは、アプリケーションソフトウェアを書き込む対象であるシステムのハードウェアおよび/またはソフトウェア構成要素の一部またはすべてをエミュレートするハードウェアおよび/またはソフトウェア構成要素を含んでいてもよい。たとえば、エミュレータシステムは、パーソナルコンピュータなどの汎用デジタルコンピュータを備えることができ、これによって、システム50のハードウェアおよび/またはファームウェアを模倣するソフトウェアエミュレータプログラムが実行される。
【0093】
汎用デジタルコンピュータの中には(たとえば、IBMまたはマッキントッシュ製パーソナルコンピュータおよびその互換機)、現在、DirectX3Dやその他の標準グラフィックスコマンドAPIに対応したグラフィックスパイプラインを提供する3Dグラフィックスカードが搭載されているものもある。これらには、また、標準的なサウンドコマンドに基づいて高品質の立体音響を提供する立体音響サウンドカードも搭載されている場合もある。エミュレータソフトウェアを実行させるこのようなマルチメディアハードウェアを搭載したコンピュータは、システム50のグラフィックス性能およびサウンド性能を近似するに充分な性能を有している場合がある。エミュレータソフトウェアは、パーソナルコンピュータプラットフォーム上のハードウェア資源を制御して、ゲームプログラマがゲームソフトウェアを書き込む対象である家庭用ビデオゲームゲームコンソールプラットフォームの処理性能、3Dグラフィックス性能、サウンド性能、周辺性能などを模倣する。
【0094】
図27は、エミュレーション処理全体の例を示しており、この処理は、ホストプラットフォーム1201と、エミュレータ構成要素1303と、記憶媒体62上に与えられているバイナリ画像を実行可能なゲームソフトウェアとを用いる。ホスト1201は、汎用または専用デジタルコンピューティング装置であってもよく、たとえばパーソナルコンピュータやビデオゲームコンソールなど、充分な計算能力を備えたプラットフォームが挙げられる。エミュレータ1303は、ホストプラットフォーム1201上で実行されるソフトウェアおよび/またはハードウェアであってもよく、コマンドやデータなどの記憶媒体62からの情報をリアルタイムで変換して、ホスト1201が処理可能な形式にすることができる。たとえば、エミュレータ1303は、システム50が実行しようとする「ソース」バイナリ画像プログラム命令を記憶媒体62から取り出して、実行可能な形式またはホスト1201によって処理可能な形式に当該プログラム命令を変換する。
【0095】
一例として、IBMのPowerPCなどの特定のプロセッサを用いたプラットフォーム上で実行するためにソフトウェアが書き込まれており、ホスト1201は、異なる(たとえば、インテルの)プロセッサを用いたパーソナルコンピュータである場合、エミュレータ1303は、バイナリ画像プログラム命令の1つまたはシーケンスを記憶媒体1305から取り出して、これらのプログラム命令を、インテルのバイナリ画像プログラム命令に相当するものに変換する。また、エミュレータ1303は、グラフィックス音声プロセッサ114によって処理されるグラフィックスコマンドや音声コマンドを取り出しおよび/または生成し、ハードウェアおよび/またはソフトウェアグラフィックスおよびホスト1201で利用可能な音声処理資源によって処理可能な形式に、これらコマンドを変換する。一例として、エミュレータ1303は、これらのコマンドを、ホスト1201の特定のグラフィックスおよび/またはサウンドハードウェアによって処理可能なコマンドに変換する(たとえば、DirectX、OpenGLおよび/またはサウンドAPIを用いる)。
【0096】
エミュレータ1303または図25のアウトライニング処理をを実施する他のプラットフォームは、再循環シェーダを有していなくてもよく、その代わりに、個別のシェーディング/ブレンディングステージのパイプラインを用いてアルファ比較演算を実施してもよい。同様に、他の実施例においては、アルファやカラー情報を同一のバッファに記憶させなくてもよく、その代わりに、この情報を異なるフレームバッファに記憶させてもよい。たとえば、オブジェクトIDを与えるアルファ「画像」は、メインメモリのマップとして記憶させてもよい。事後処理は、テクスチャリングを用いることによって行われる必要はないが、その代わりに、汎用プロセッサによって行ってもよい。輪郭線のレンダリングは2つのパスで行わなくてもよい。他の実施例においては、水平および垂直輪郭線は、同一のパスでレンダリングされてもよい。
【0097】
上述のビデオゲームシステムの機能の一部または全部を提供するために用いられるエミュレータ1303には、エミュレータを用いて実行される様々なオプションや画面モードの選択を簡略化または自動化するグラフィックユーザインターフェース(GUI)が与えられてもよい。一例として、そのようなエミュレータ1303は、ソフトウェアが本来対象としていたホストプラットフォームに比較して、拡張された機能をさらに含んでいてもよい。
【0098】
図28は、エミュレータ1303と共に用いられるのに適したエミュレーションホストシステム1201を示す。システム1201は、処理部1203と、システムメモリ1205とを含む。システムバス1207は、システムメモリ1205から処理部1203までを含む様々なシステム構成要素を結合する。システム1207は、メモリバスまたはメモリコントローラ、周辺機器バス、ローカルバスなど、様々なバスアーキテクチャのいずれかを用いたものを含む、数種のバス構成のいずれであってもよい。システムメモリ1207は、読み出し専用メモリ(ROM)1252と、ランダムアクセスメモリ(RAM)1254とを含む。ベーシック入出力システム(BIOS)1256は、パーソナルコンピュータシステム1201内の要素間において情報を転送するのを助ける基本ルーチンを含んでおり、ROM1252に記憶される。システム1201は、様々なドライブや、関連したコンピュータが読み取り可能な媒体をさらに含む。ハードディスクドライブ1209は、(典型的には固定された)磁気ハードディスク1211からの読み出しやそれに対する書き込みを行う。付加的な(選択可能な)磁気ディスクドライブ1213は、着脱可能な「フロッピー」などの磁気ディスク1215からの読み出しやそれに対する書き込みを行う。随意のディスクドライブ1217は、CDROMなどの随意の媒体のような着脱可能な光ディスク1219からの読み出しや、構成によってはそれに対する書き込みも行う。ハードディスクドライブ1209および光ディスクドライブ1217は、それぞれ、ハードディスクドライブインターフェース1221および光ドライブインターフェース1225によって、システムバス1207に接続している。ドライブやそれに関連するコンピュータが読み出し可能な媒体によって、コンピュータが読み出し可能な命令、データ構造、プログラムモジュール、ゲームプログラムなどのパーソナルコンピュータシステム1201のためのデータが不揮発的に記憶される。他の構成においては、コンピュータが読み出し可能な他の種類の媒体が用いられていてもよく、コンピュータによってアクセス可能なデータを記憶できる媒体(たとえば、磁気カセット、フラッシュメモリカード、デジタルビデオディスク、ベルヌーイカートリッジ、ランダムアクセスメモリ(RAM)、読み出し専用メモリ(ROM)など)であってもよい。
【0099】
エミュレータ1303を含む多くのプログラムモジュールは、ハードディスク1211、着脱可能な磁気ディスク1215、光学ディスク1219、および/またはシステムメモリ1205のROM1252および/またはRAM1254に記憶されてもよい。そのようなプログラムモジュールは、グラフィックスやサウンドAPIを提供するオペレーティングシステム、1つ以上のアプリケーションプログラム、他のプログラムモジュール、プログラムデータ、ゲームデータを含んでもよい。ユーザは、コマンドや情報を、キーボード1227、ポインティングデバイス1229、マイク、ジョイスティック、ゲームコントローラ、衛星アンテナ、スキャナなどの入力装置を通じて、パーソナルコンピュータシステム1201に対して入力する。このような入力装置は、システムバス1207に結合されたシリアルポートインターフェース1231を介して処理部1203に接続されることが可能であるが、パラレルポートや、ゲームポートファイアワイヤーバス、またはユニバーサルシリアルバス(USB)などの他のインターフェースによって接続されてもよい。モニタ1233などの表示装置も、ビデオアダプタ1235などのインターフェースを介して、システムバス1207に接続される。
【0100】
また、システム1201は、インターネットのようなネットワーク1152上での通信を確立するための、モデム1154などのネットワークインターフェース手段を含んでもよい。モデム1154は、内蔵であっても外付けであってもよく、シリアルポートインターフェース1231を介してシステムバス123に接続される。また、ローカルエリアネットワーク1158を介して(または、ワイドエリアネットワーク1152、ダイアルアップなどの他の通信路、または他の通信手段を介してもよい)、システム1201が遠隔コンピューティング装置1150(たとえば、他のシステム1201)と通信できるように、ネットワークインターフェース1156が与えられてもよい。システム1201は、典型的には、プリンタなどの標準周辺機器のような、他の周辺出力装置を含む。
【0101】
一例において、ビデオアダプタ1235は、Microsoft製DirextX7.0などのバージョンのような標準3Dグラフィックスアプリケーションプログラマインターフェースに基づいて出される3Dグラフィックスコマンドに応答して、高速3Dグラフィックスレンダリングを提供するグラフィックスパイプラインチップセットを含んでいてもよい。立体音響スピーカセット1237も、システムバス1207に対して、従来の「サウンドカード」のような音声生成インターフェースを介して接続されている。そのようなインターフェースは、バス1207から与えられたサウンドコマンドに基づいて高品質な立体音響を生成するための支援をハードウェアや組み込みソフトウェアに対して行う。このようなハードウェアの機能によって、システム1201は、記憶媒体62に記憶されたソフトウェアを実行するのに充分なグラフィックスおよび音響の速度性能を提供することができる。
【0102】
上記の特許、特許出願およびその他の上述の書類のすべての内容は、本明細書に明示的に引用されている。
【0103】
本発明は、現時点において最も現実的で最適な実施例と思われるものに関連して説明してきたが、本発明は、開示された実施例に限定されるべきと解釈されるべきではない。たとえば、図示の実施例の目的は、漫画のアウトライニングと共に画像を提供することであるとしたが、上述の柔軟なアルファ比較演算を多くの異なる画像アプリケーション用に用いることが可能である。さらに、二重のアルファ比較を上では説明したが、本願は、単なる2回のアルファ比較のみに限定されない。さらに、好ましい実施例においては、再循環シェーダを使用したが、複数のアルファ比較器を有するパラレルな仕組みを用いることも可能である。したがって、本発明は、添付の請求項の範囲に含まれる様々な変形例や相当する仕組みを含むことを意図している。
【図面の簡単な説明】
【図1】対話式コンピュータグラフィックスシステムの一例の概略図である。
【図2】図1のコンピュータグラフィックスシステムの例のブロック図である。
【図3】図2に示すグラフィックス&音声プロセッサの例のブロック図である。
【図4】図3に示す3Dグラフィックスプロセッサの例のブロック図である。
【図5】図4のグラフィックス&音声プロセッサの論理フロー図の例である。
【図6】再利用可能な再循環シェーダの例を示す。
【図7】再循環シェーダを用いて実施されるシェーディングパイプラインの例を示す。
【図8】再循環シェーダのブロック図の例を示す。
【図9】再循環シェーダ入力乗算器の例を示す。
【図10】再循環シェーダの動作ブロック図の例を示す。
【図11】再循環シェーダの実施例を示す。
【図12】カラースワップ機能の例を示す。
【図13】カラースワップ機能の例を示す。
【図14】アルファ情報を用いてオブジェクトIDを符号化する、漫画のアウトライニング技術の例を示す。
【図15】アルファ情報を用いてオブジェクトIDを符号化する、漫画のアウトライニング技術の例を示す。
【図16】アルファ情報を用いてオブジェクトIDを符号化する、漫画のアウトライニング技術の例を示す。
【図17】アルファ情報を用いてオブジェクトIDを符号化する、漫画のアウトライニング技術の例を示す。
【図18】アルファ情報を用いてオブジェクトIDを符号化する、漫画のアウトライニング技術の例を示す。
【図19】アルファ情報を用いてオブジェクトIDを符号化する、漫画のアウトライニング技術の例を示す。
【図20】アルファ情報を用いてオブジェクトIDを符号化する、漫画のアウトライニング技術の例を示す。
【図21】アルファ情報を用いてオブジェクトIDを符号化する、漫画のアウトライニング技術の例を示す。
【図22】アルファ情報を用いてオブジェクトIDを符号化する、漫画のアウトライニング技術の例を示す。
【図23】アルファ情報を用いてオブジェクトIDを符号化する、漫画のアウトライニング技術の例を示す。
【図24】アルファ情報を用いてオブジェクトIDを符号化する、漫画のアウトライニング技術の例を示す。
【図25】システム50によって実行される漫画のアウトライニング処理の例を示す。
【図26】システム50によって実施される漫画のアウトライニングパイプラインの例を示す。
【図27】他の代替可能な実施例を示す。
【図28】他の代替可能な実施例を示す。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to computer graphics, and more particularly to interactive graphics systems such as home video game platforms. Even more particularly, the present invention relates to the use of a logical combination of N alpha channel operations to produce interesting graphics effects including non-photorealistic images such as cartoon outlining.
[0002]
[Prior art]
Many of us have seen images of imaginary creatures such as dinosaurs, aliens, and animated toys that are very realistic. Such animation is made possible by computer graphics. Using such techniques, computer graphics producers can specify how each object looks and what appearance changes over time. Then, the computer models the object and displays it on a display such as a television or a computer screen. The coloring and shape of each part of the displayed image is performed properly based on the position and orientation of each object in the scene, the illumination direction for each object, the texture of the surface of each object, and various other factors. The computer takes care of many of the tasks that are necessary.
[0003]
Due to the complexity of computer graphics generation, until just a few years ago, the use of computer-generated 3D graphics was almost limited to expensive and specialized flight simulators, high-end graphics workstations, and supercomputers. It was. People could see the images generated by the computer system in movies and high-cost television advertising, but could not actually touch the computer that generated the graphics. This situation has changed due to the emergence of relatively inexpensive 3D graphics platforms such as Nintendo 64 (registered trademark) and various 3D graphics cards that can be used in personal computers. Now, at home and at work, it is possible to interact with powerful 3D animations and simulations on a relatively inexpensive computer graphics system.
[0004]
Most computer graphics research so far has centered on generating realistic images. This research has been very successful. Computers can now produce images that are so realistic that they are indistinguishable from photographs. For example, many of us have seen photorealistic special effects generated by real dinosaurs, aliens, and computers in movies and television. New pilots train on a highly realistic computer-based flight simulator that almost reproduces the actual flight. Now, low-cost home video game systems can provide a very high sense of reality, allowing game players to drive real racing cars on the stadium or ski covered with snow or ice. You can give illusions such as skiing down the slope or walking in a medieval castle. Many games greatly extend the gameplay experience with such a phantom of reality.
[0005]
One way to extend the realism is to model the opacity (transparency) of a surface using a technique called “alpha blending”. Using this prior art, each image element is assigned an “alpha value” representing the degree of opacity. The color of the image element can be blended based on the alpha value to make one object show through through the other object. Yet another prior art is called an “alpha function” or “alpha test”, which is used to compare an object fragment's alpha value with a reference function or reference value to determine that object fragment. Can be discarded. The alpha test can also decide not to blend (i.e. discard) the part that will become part of the image because it will be invisible because it is transparent.
[0006]
Alpha blending and alpha testing are particularly useful for modeling transparent objects such as water and glass. This same function can be used with texture mapping to achieve various effects. For example, alpha tests are frequently used to draw complex shapes using texture maps on polygons, with alpha elements acting as matte. As an example, a tree can be drawn on a polygon as a picture (texture) of the tree. The tree portion of the texture image can have an alpha value of 1 (opaque), and the non-tree portion can have an alpha value of 0 (transparent). Thus, the “non-tree” portion of the polygon is mapped to the invisible (transparent) portion of the texture map, and the “tree” portion of the polygon is mapped to the visible (opaque) portion of the texture map.
[0007]
Other uses for texture alpha elements include drilling holes and trimming faces. As an example, an image of a cut-out or trim area can be stored in a texture map. When mapping a texture to a polygonal surface, alpha testing or alpha blending can be used to cut the area cut out or trimmed from the polygonal surface. In addition, the alpha channel of computer graphics systems can be used to provide non-photorealistic image effects such as cartoon outlining. In the mechanism disclosed in US patent application Ser. No. 09 / 468,109 filed Dec. 21, 1999, the alpha channel of the real-time rendering system is used to encode identifiers corresponding to different objects and different object parts. In this system, an object is rendered in a color frame buffer and rendered, and the corresponding object ID is written into the alpha frame buffer. Alpha test processing is performed on the alpha frame buffer and is defined between silhouettes and image regions encoded with different alpha / IDs using the alpha comparison result (ie the absolute value of the difference between the two alpha values). The color scheme of the contour line surrounding the contour is selectively blended.
[0008]
Typical commonly available 3D graphics application programmer interfaces, such as DirectX and OpenGL, support alpha comparison. This alpha comparison is for transparency, or to “kill” pixels that fail the comparison, eg, by comparing a repeated alpha or texture alpha with a constant. As an example, Direct3D has a command “D3DRENDERSTATE ALPHATEST-ENABLE” used to enable the alpha test. The enumerated type, such as the command D3DCOMFUNC, allows the programmer to specify tests that will be used in alpha comparison operations (eg, never to, always <,>, hereafter, inequality, etc.). For example, if the alpha comparison function is set to “above” and the rasterized pixel is more opaque than the color already present in the pixel, Direct3D will skip this completely and blend the two colors Saves the time it will take to prevent the color buffer and z-buffer from being updated. The D3DRENDERSATE_ALPHAREF command can also be used to compare the new alpha to a reference alpha value specified by the programmer (eg, “If alpha <128/255, kill the pixel”). See, for example, Kobak et al., “Inside Direct 3D (Microsoft 2000)”, pages 289-291. Similar alpha test / comparison functions are also provided in OpenGL by GL_ALPHA_TEST, GL_ALPHA_TEST_FUNC, and GL_ALPHA_TEST_REF commands. See pages 301-302 of Nider et al., "OpenGL Programming Guide" (Addison-Wesley, 1993).
[0009]
A problem that arises when performing various complex alpha comparisons, including the cartoon outlining algorithm described above, is how to perform more complex alpha comparisons in hardware using a single rendering pass. There is. For example, alpha testing with arbitrary complexity can typically be done directly by software executed by the processor, but hardware based alpha (eg, to do faster) It may be desirable to use a test. The alpha test function having such arbitrary complexity has not been normally used in low-priced graphics systems such as home video games and personal computer graphics cards.
[0010]
The present invention solves this problem and achieves a wide range of alpha test functions by providing a hardware based pixel shader capable of performing multiple logically connectable alpha comparisons. Is. According to one aspect of the invention, the pixel shader can be used to provide a transparent tree similar to a shade tree. In particular, using the alpha function, N logical alpha operations can be performed on the M alpha input. Here, N and M may be any integer.
[0011]
One aspect of the present invention provides a method for generating a graphics image, which generates information representing a surface to be imaged (the information includes alpha), and in the same rendering pass, a plurality of Performing an alpha comparison of the alpha information to provide a corresponding plurality of alpha comparison results, logically combining the plurality of alpha comparison results, based at least in part on the logical combination, A method for rendering a graphics image. The rendering step may include selecting whether to kill a pixel based on the logical combination. The execution step may be performed in hardware and / or using a recirculating shader.
[0012]
According to another aspect of the invention, a graphics system includes a texture portion that includes a texture coordinate matrix multiplier, a shader that includes an alpha channel, a built-in frame buffer that can store an alpha image, and an alpha image. the above Copy from the frame buffer and the texture part texture The graphics system makes multiple alpha comparisons in a single rendering pass.
[0013]
By combining and using alpha comparison and alpha logic operations, a wide range of additional effects based on alpha can be achieved. For example, double alpha comparison can be used to provide non-photorealistic effects such as comic outlining (e.g., comic outline based on the logical combination by performing an absolute value function). Efficiently determine whether or not to blend colors).
[0014]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 shows an example of an interactive 3D computer graphics system 50. The system 50 can be used to play interactive 3D video games with intriguing stereophony. It can also be applied to various other uses.
[0015]
In this example, the system 50 can interactively process digital representations and 3D world models in real time. The system 50 can display all or part of the world from any viewpoint. For example, the system 50 can interactively change the viewpoint in response to real-time input from input devices such as handheld controllers 52a and 52b. Thereby, the game player can see the world viewed from inside or outside the world. The system 50 can be used for applications that do not require real-time 3D interactive display (eg, 2D display generation and / or non-interactive display), but the ability to display high quality 3D images very quickly is It can be used to generate visual dialogues such as high realistic gameplay.
[0016]
In order to play an application such as a video game using the system 50, the user first connects the main unit 54 to a display device such as the user's color television 56 using the cable 58. The main unit 54 generates a video signal and an audio signal for controlling the color television 56. The video signal controls an image displayed on the television screen 59, and the audio signal is reproduced as sound through the stereo speakers 61L and 61R of the television.
[0017]
Further, the user needs to connect the main unit 54 to a power source. This power source may be a conventional AC adapter (not shown) that plugs into an electrical outlet on the wall of the home, and a lower DC voltage signal suitable for powering the home current to the main unit 54. Convert to As another embodiment, a battery can be used.
[0018]
The user may control the main unit 54 using the hand controllers 52a and 52b. For example, the operation unit 60 can be used to specify the direction (up or down, left or right, near or far) in which the character displayed on the television 56 should move within the three-dimensional world. The operation unit 60 also provides input for other uses (for example, menu selection, pointer / cursor control, etc.). The controller 52 can take a variety of forms. In the present example, each illustrated controller 52 includes an operation unit 60 such as a joystick, a push button, and / or a direction switch. The connection of the controller 52 to the main unit 54 may be a cable or may be wireless via electromagnetic waves (for example, radio waves or infrared waves).
[0019]
In order to play an application such as a game, the user selects an appropriate storage medium 62 storing the application such as the video game that he / she wants to play, and inserts the storage medium into the slot 64 in the main unit 54. To do. The storage medium 62 may be, for example, a specifically encoded and / or encrypted optical and / or magnetic disk. The user may operate the power switch 66 to turn on the main unit 54 and start execution of an application such as a video game based on software stored in the storage medium 62. The user may operate the controller 52 to give input to the main unit 54. For example, when the operation unit 60 is operated, an application such as a game may be started. When the other operation unit 60 is moved, the moving character can be moved in a different direction, or the viewpoint of the user in the 3D world can be changed. Based on the specific software stored in the storage medium 62, the various controllers 60 on the controller 52 can perform different functions at different times.
[0020]
<Example of electronic circuit of the entire system>
FIG. 2 shows a block diagram of example components of system 50. The main components include:
A main processor (CPU) 110,
Main memory 112, and
・ Graphics & Audio Processor 114
[0021]
In this example, main processor 110 (eg, enhanced IBM Power PC 750) receives input from handheld controller 108 (and / or other input devices) via graphics & audio processor 114. The main processor 110 interactively responds to user input and executes programs such as video games supplied from the external storage medium 62 via a mass storage access device 106 such as an optical disk drive. As an example, in the case of video game play, the main processor 110 can perform collision detection and moving image processing in addition to various interactive control functions.
[0022]
In this example, the main processor 110 generates 3D graphics commands and audio commands and sends them to the graphics and audio processor 114. The graphics & audio processor 114 processes these commands to generate an intriguing visual image on the display 59, or intriguing stereophonic sound to an appropriate sound generator such as stereo speakers 61R and 61L. Or generate.
[0023]
The video encoder 120 included in the system 50 of the present example receives an image signal from the graphics and audio processor 114 and displays the image signal on a standard display device such as a computer monitor or a home color television 56. To analog and / or digital video signals suitable for An audio codec (compressor / decompressor) 122 included in the system 50 compresses and expands a digitized audio signal, and converts it into a digital or analog audio signal format as necessary. Also good. Audio codec 122 can receive audio input via buffer 124 and provide it to graphics & audio processor 114 for processing (eg, mixing with other audio signals generated by the processor and / or). Received via streaming audio output of mass storage access device 106). The graphics and audio processor 114 of this example can store audio related information in the audio memory 126 that is available for audio tasks. The graphics & audio processor 114 provides the processed audio output signal to the audio codec 112 for decompression or analog signal (eg, via buffer amplifiers 128L and 128R) so that it can be played back by the speakers 61L and 61R. Conversion is performed.
[0024]
Graphics and audio processor 114 can communicate with various additional devices within system 50. For example, the parallel digital bus 130 may be used for communication with the mass storage access device 106 and / or other components. The serial peripheral device bus 132 may be used for communication with devices such as various peripheral devices. Examples of such devices include the following.
A programmable read-only memory and / or real-time clock 134,
A network interface such as modem 136 (such as connecting system 50 to a telecommunications network 138 capable of downloading and uploading program instructions and / or data, such as a digital network such as the Internet; May be)
A flash memory 140;
[0025]
Another external serial bus 142 may be used for communication with devices such as additional expansion memory 144 (eg, a memory card). Connectors may be used to connect buses 130, 132, and 142 to various devices.
[0026]
<Example of graphics and audio processor>
FIG. 3 is a block diagram of an example of the graphics and audio processor 114. As an example, the graphics and audio processor 114 may be a single chip ASIC (application specific IC). In this example, the graphics and audio processor 114 includes:
Processor interface 150,
Memory interface / controller 152,
3D graphics processor 154,
An audio digital signal processor (DSP) 156,
-Voice memory interface 158
・ Audio interface & mixer 160
The peripheral device controller 162, and
A display controller 164;
[0027]
The 3D graphics processor 154 performs graphics processing tasks. The audio digital signal processor 156 performs audio processing tasks. The display controller 164 accesses the image information from the main memory 112, gives it to the video encoder 120, and displays it on the display device 56. Audio interface & mixer 160 interfaces with audio codec 122 and also receives audio from another source (eg, streaming audio from mass storage access device 106, output of audio DSP 156, and audio codec 122. It is also possible to mix (external audio input). The processor interface 150 provides a data and control interface between the main processor 110 and the graphics and audio processor 114.
[0028]
Memory interface 152 provides an interface for data and control between graphics and audio processor 114 and memory 112. In this example, the main processor 110 accesses the main memory 112 via a processor interface 150 and a memory interface 152 that are part of the graphics and audio processor 114. Peripheral controller 162 provides an interface for data and control between graphics and audio processor 114 and the various peripherals described above. The audio memory interface 158 provides an interface with the audio memory 126.
[0029]
<Example of graphics pipeline>
FIG. 4 is a more detailed diagram of an example 3D graphics processor 154. The 3D graphics processor 154 includes a command processor 200 and a 3D graphics pipeline 180, among others. The main processor 110 transmits a data stream (for example, a graphics command stream or a data list) to the command processor 200. The main processor 110 has a two-level cache 115 to minimize memory latency, and also has a write gathering buffer 111 for an uncached data stream for the graphics and audio processor 114. The write gathering buffer 111 collects partial cache lines to form a complete cache line, and sends this data to the graphics & audio processor 114 one cache line at a time so that the bus can be used to the maximum.
[0030]
The command processor 200 receives a display command from the main processor 110, analyzes it, and acquires additional data necessary for processing from the common memory 112. Command processor 200 provides a stream of vertex commands to graphics pipeline 180 for 2D and / or 3D processing and rendering. The graphics pipeline 180 generates an image based on these commands. The generated image information may be transferred to the main memory 112 and made accessible by the display controller / video interface unit 164, thereby displaying the frame buffer output of the pipeline 180 on the display 56.
[0031]
FIG. 5 is a logic flow diagram of the graphics processor 154. The main processor 110 may store the graphics command stream 210, the display list 212, and the vertex array 214 in the main memory 112, and passes a pointer to the command processor 200 via the bus interface 150. The main processor 110 stores graphics commands in one or more graphics first in first out (FIFO) buffers 210 allocated in the main memory 110. The command processor 200 retrieves:
A command stream from the main memory 112 via an on-chip FIFO memory buffer 216 that receives and buffers graphics commands for synchronization / flow control and load balancing;
The display list 212 from the main memory 112 via the on-chip call FIFO memory buffer 218, and
Vertex attributes from the command stream and / or from the vertex array 214 in the main memory 112 via the vertex cache 220.
[0032]
The command processor 200 performs a command processing operation 200a to convert the attribute type to a floating-point format, and passes the resulting complete vertex polygon data to the graphics pipeline 180 for rendering / rasterization. Programmable memory arbitration circuit 130 (see FIG. 4) arbitrates access to main memory 112 that is common among graphics pipeline 180, command processor 200, and display controller / video interface unit 164.
[0033]
As shown in FIG. 4, graphics pipeline 180 may include:
-Conversion unit 1300,
-Setup / rasterizer 400,
-Texture part 500,
-Texture environment unit 600, and
Pixel engine unit 700.
[0034]
The conversion unit 1300 performs various processes 300a such as 2D and 3D conversion (see FIG. 5). The conversion unit 300 may include one or more matrix memories 300b that store a matrix used for the conversion process 300a. The conversion unit 1300 converts the shape input for each vertex from the object space to the screen space, converts the input texture coordinates, and calculates the projected texture coordinates (300c). The conversion unit 1300 may perform polygon clipping / culling (300d). Further, in one embodiment, the lighting calculation for the eight independent lights is performed for each vertex by the lighting processing 300e performed by the conversion unit 300b. The conversion unit 1300 can also perform texture coordinate generation (300c) for producing an embossed bump mapping effect and polygon clipping / culling processing (300d).
[0035]
The setup / rasterizer 400 includes a setup unit. The setup unit receives vertex data from the conversion unit 300 and transmits triangle setup information to one or more rasterizers (400b) to perform edge rasterization, texture coordinate rasterization, and color rasterization.
[0036]
A texture unit 500 (which may include an on-chip texture memory (TMEM) 502), performs various tasks related to texturing. The tasks include, for example, the following.
Extract texture 504 from main memory 112,
Texture processing (500a), including, for example, multi-texture processing, post-cache texture extension, texture filtering, embossing, shadows and lighting with projected textures, and BLIT with alpha transparency and depth,
Bump map processing (500b) for calculating a texture coordinate conversion amount for bump mapping, pseudo texture, texture tiling effect, and
Indirect texture processing (500c).
[0037]
The texture unit 500 outputs the transmitted texture value to the texture environment unit 600 to perform texture environment processing (600a).
[0038]
The texture unit 500 can be recirculated and both direct and indirect texturing can be performed, providing a texture mapping output sequence to the texture environment unit 600 for blending during a single rendering pass. US patent application Ser. No. 09 / 722,382, entitled “Method and apparatus for processing direct and indirect textures in graphics systems” (Attorney Docket No. 723-961) and corresponding provisional application number filed on August 23, 2000. See 60 / 226,891. Both applications are incorporated herein by reference.
[0039]
The texture environment unit 600 blends the polygon and the texture color / alpha / depth and also performs texture fog processing (600b) to achieve a fog effect based on the inverse range. Texture environment 600 provides multiple stages to provide a variety of other intriguing environment-related, for example, based on color / alpha modulation, embossing, detail texturing, texture swapping, clamping, and depth blending. The function can be performed.
[0040]
The pixel engine 700 performs depth (z) comparison (700a) and pixel blending (700b). In this example, the pixel engine 700 stores data in an embedded (on-chip) frame buffer memory 702. Graphics pipeline 180 may include one or more embedded DRAM memories 702 and stores the contents of the frame buffer and / or texture information locally. Depending on the currently available rendering mode, the Z comparison 700a ′ can be done early in the graphics pipeline (eg, if no alpha blending is needed, the z comparison can be done early). The pixel engine 700 includes a copy process 700c. This is to periodically write the contents of the on-chip frame buffer to the main memory and allow the display / video interface unit 164 to access. Using this copy process 700c, the contents from the embedded frame buffer 702 to the texture can be copied to the main memory 112, and a dynamic texture synthesis effect can be obtained. Anti-aliasing and other filtering can be done during the copy-out process. The frame buffer output of the graphics pipeline 180 (which is finally stored in the main memory 112) is read by the display / video interface unit 164 for each frame. The display controller / video interface 164 gives digital RGB pixel values and displays them on the display 102. The copy-out pipeline may be part of the pixel engine 700, and this copy-out pipeline allows some or all of the contents of the embedded frame buffer 702 as a texture in a single rendering pass. It can be copied out to the memory 112. Then, the texture unit 500 may read the copied texture into the texture memory 502 and use this as the contents of the frame buffer when performing additional visualization of the texture mapping. The system 50 can, for example, copy out the rendered alpha information in the embedded frame buffer 702 and apply this alpha information as a texture during texture mapping to add to the embedded frame buffer contents. is there. All of this is done in the same rendering pass. US patent application Ser. No. 09 / 722,663, entitled “Graphics System with Copy-Out Conversion between Internal Frame Buffer and Main Memory” (Attorney Docket No. 723-963) and its corresponding provisional application of August 23, 2000 See application number 60 / 227,030. Both applications are incorporated herein by reference.
[0041]
<Logical combination of N alpha comparisons>
As described in co-pending application No. 09 / 722,367, Drebin et al., “Recirculation Shade Tree Blender for Graphics Systems” (Attorney Ref. 723-968), all disclosures including drawings according to this application are , Incorporated herein by reference), a recirculating shader embodiment 602 (see FIGS. 6-12b) supports various alpha functions, including logical combination of alpha test results within a single rendering pass. Yes. In this embodiment, the alpha function compares the source alpha to the reference alpha using any one of the following operations:
·always
·never
・ Inequality
·equal
·Less than
·more than
·Less than
・ Exceed
In this example, the two functions are combined using:
・ AND
・ OR
・ XOR
・ XNOR
If all valid pixels in the pixel quad fail the alpha test, the quad is discarded and therefore the frame buffer 702 is not updated. Note that in this example, the alpha comparison operation is not part of the recirculation stage, although alpha channel comparison is performed using the comparator 674 (which is part of the recirculation logic). Note that this is done after recirculation is complete. The following are examples that can be implemented.
Example 1
Asrc> Aref0 AND Asrc <Aref1
Example 2
Asrc> Aref0 OR Asrc <Aref1
Example 3
Asrc> Aref OR Asrc <-Aref
[0042]
In this way, the alpha function of recirculating shader 602 (eg, in combination with a non-recirculating alpha comparison) can be used to provide a transparent tree similar to a shade tree. In particular, using the alpha function of the recirculating shader 602, N logical alpha processes can be performed on the M alpha inputs. Here, N and M may be any integer. Alpha comparison and alpha logic operations can be used to provide non-photorealistic effects such as, for example, comic outlining.
[0043]
<Examples of cartoon outlining technology>
FIGS. 14 and 15 illustrate that it is desirable to have a border or outline on the cartoon character. The cartoon character example 1300 in FIG. 14 has a boundary line attached to the outline 1302 of the silhouette. The silhouette outline 1302 produces a “cartoon outlining” effect that improves the clarity of the image and reproduces a handwritten comic or comic book format image.
[0044]
FIG. 14 shows that this cartoon character 1300 has a right hand, a wrist, and an upper arm, and is bending the upper arm in front of itself. The manga artist attaches a border to the contour around the right hand, wrist, and upper arm even though the character's posture shown here is an internal contour rather than a silhouette contour. FIG. 14 shows that if the cartoon outline is applied only to the silhouette outline 1302 of the character, the portion of the cartoon character 1300 may disappear or become unclear. . Viewers expect (from the experience of coloring books, hand-drawn animated characters and / or comic books) that they are also bordered to clearly distinguish the hands, wrists, and upper arms.
[0045]
In order for the cartoon character 1300 to appear as if it were handwritten, it would be useful to attach a boundary line not only to the silhouette outline but also to a certain internal outline 304. The constant internal contour corresponds to the internal contour that defines the hand, wrist, and upper arm of the character that is bent in front of itself. FIG. 15 shows a character 1300 in which a boundary line is attached to the internal contour 304. These inner contours 304 are silhouette contours when the character 1300 is extended with arms up, but in the direction of the arms in FIG. 15, they are inner contours.
[0046]
To solve this problem, which pixels represent different objects or parts of an object by assigning different ID values to different objects or parts of an object and associating the ID values with the pixels during the rendering process. There is a method of tracking. Such an identification value can be assigned, for example, by applying a bit in frame buffer 702 that is typically used to encode alpha information. The assigned identification value may be used to determine whether to draw a border at the pixel location. For example, the system may compare the identification value of a pixel with the identification values of neighboring (eg, adjacent) pixels. If the identification values of two adjacent pixels are in a predetermined relationship, no boundary line is drawn. If the identification values are the same, the two pixels are on the same plane and no border is drawn. A boundary line is drawn when the identification values of two adjacent pixels are in other predetermined relationships, such as indicating that different objects or different parts of an object overlap.
[0047]
16-18 show an example. FIG. 16 shows an object 1319 comprising three object portions 1320, 1322, 1324. FIG. 17 shows a plan view of the same object 1319. The object portion 1320 is a square, the object portion 1322 is a circle, and the object portion 1324 is a cone. The graphic designer wants to draw a boundary 330 (see FIG. 16) where the cone 1324 visually intersects the square 1320, but not where the cone intersects the circle 1322 or where the circle intersects the square. Assume.
[0048]
In this example, the pixels within square 1320, circle 1322, and cone 1324 are encoded with different identification values. For example, pixels in square 1320 are encoded with identification value “1”, pixels in circle 1322 are encoded with identification value “2”, and pixels in cone 1324 are encoded with identification value “3”. It becomes. FIG. 18 shows an example of the alpha portion of the frame buffer 702 that stores the encoded information. A shaded cell indicates a cell to which the border color will be applied based on 2 (or more) being the difference between adjacent alpha / ID values.
[0049]
In the pixel post-processing phase after the alpha and color images are rendered in frame buffer 702, the various identification values in the frame buffer are tested. No border is drawn for pixels that have the same identification value as neighboring pixels (all such pixels are on the same plane). In addition, when a pixel has an identification value different from the identification value of the adjacent pixel by a certain reference or reference set, a boundary line is not drawn (for example, the pixel k + 1 has an identification value of less than 2) If it is different from the identification value of, no border is drawn.) However, if a pixel has an identification value that differs from the identification value of an adjacent pixel by some other criterion or set of criteria, a boundary line is drawn (for example, a pixel k having an identification value of 2 or more If it is different from the identification value of k + 1, a boundary line may be drawn on the pixel k).
[0050]
FIG. 19 is a flowchart of an example pixel post-processing routine 1350 for drawing boundaries. The routine 1350 includes a loop (blocks 1352-1362) that is performed for each pixel [i] [j] in the image stored in the frame buffer 702. As described above, the image generation process is performed for each distinct part of the object in the frame buffer bits normally assigned to store the alpha value as part of rendering the image into the frame buffer. May be set. The routine 1350 test tests these alpha (currently ID) values to determine whether to draw a border. In this example, routine 1350 retrieves the alpha (ID) value of pixel [i] [j] and the neighboring pixels (ie, pixel [i−1] [j] and pixel [i] [j−1]). The alpha (ID) value of is also retrieved (block 1352). Thereafter, routine 1352 performs the following calculation (at block 1354) to determine the difference between the alpha (ID) value of pixel [i] [j] and the alpha (ID) value of the adjacent pixel.
diffX = ABS (Alpha [i] [j] -Alpha [i-1] [j]
diffX = ABS (Alpha [i] [j] −Alpha [i] [j−1]
[0051]
Thereafter, the routine 1350 tests the difference values diffX and diffY obtained as a result of the calculation to determine whether any exceeds a predetermined difference (eg, any constant threshold or a programmable threshold such as 1). Is determined (block 1356). If at least one of the difference values exceeds a predetermined difference, the routine 1350 sets the color of pixel [i] [j] to the border color (block 1358). Therefore, when the slope of alpha is −1 to +1, in the present embodiment, the pixels are considered to be on the same plane. Steps 1352-1358 are repeated for each pixel in the image (blocks 1360, 1362).
[0052]
As a variation of routine 1350, specify that an object is encoded with a special alpha identification value (eg, 0x00) and that pixels within that object are ignored when drawing a border. (See FIG. 20). This is useful, for example, when rendering an object without a border as a bitmap (for example, an animation representing an explosion).
[0053]
FIG. 21 shows how the above routine 1350 can be applied to efficiently draw a boundary on the object 1300 shown in FIGS. In this example, different portions of object 1300 are encoded with different alpha (ID) values. For example, the object 1300 may include two arms 1311a and 1311b and a trunk 1309. Each arm may include a hand 1313, a wrist portion 1310, a lower arm portion 1312, an elbow portion 1308, an upper arm portion 1310, and a shoulder portion 1317. Each of these various parts can be encoded using different alpha IDs as follows.
[Table 1]
Figure 0004740476
[0054]
According to the above alpha ID encoding example, the routine 1350 draws a boundary line indicated by a dark line in FIG. 21, but does not draw a boundary line at the other (dotted line) portion where the opposite portions intersect.
[0055]
The above encoding can also be used to add a boundary line to a portion where the connection portions of the same object 1300 intersect. Traditional coloring book books and hand-drawn animated cartoons add a cartoon outlining to these self-intersections in order to make the joints clearer and to make the muscles feel more developed. In some cases. For example, FIGS. 22-24 are enlarged views of the joint 1308 (ie, the elbow) of the character 1300, and the joint connects the upper arm 1310 of the character with the forearm 1312. Using the above encoding, the joint 1308 is bent so that the outer limbs 1310, 1312 are oriented adjacent to each other (eg, in contact) as shown in FIGS. 1350 attaches a border line segment 1316 to the intersection of body parts 1310 and 1312 (based on the difference between the alpha ID of the lower arm 1310 and the alpha ID of the upper arm 1312 being greater than 1).
[0056]
<Example of comic outlining process executed on the system 50>
FIG. 25 is an example high-level flowchart showing how the system 50 may be used to provide cartoon outlining, and FIG. 26 illustrates how to implement a cartoon outlining pipeline. It is an example showing how the system 50 can be configured.
[0057]
Referring to FIG. 25, to perform cartoon outline imaging or a similar effect, the application sets the frame buffer 702 to include an alpha channel (block 1400). US patent application Ser. No. 09 / 726,227, entitled “Graphics System with Embedded Frame Buffer with Reconfigurable Pixel Format” (Attorney Docket No. 723-957) and corresponding provisional application filed August 23, 2000 See number 60 / 226,910. Both applications are incorporated herein by reference. The system 50 is then controlled to draw the scene in the frame buffer 702 (block 1402). However, during this process, the object identifier that would be provided from the main processor 110 as part of each vertex information is written to, for example, the alpha channel of the system 50 and stored at the alpha position in the frame buffer 702.
[0058]
Careful attention is required when assigning IDs to faces. Since the alpha channel of this embodiment is limited to 8 bits, it may be necessary to reuse the ID when there are 256 or more different objects in one scene. In this embodiment, only 7 bits of alpha can be used. This is because the eighth bit is used as a sign bit for threshold calculation. This is not a problem if different objects with the same ID do not overlap. If a silhouette is desired at a portion where the recessed objects overlap, a more complicated ID and threshold system may be used. One way to do this is to assign IDs that differ by one to different parts of the same object, so that overlapping parts have at least two total differences. And the threshold function only needs to create silhouettes for at least two differences. See FIG. 19 above. Of course, different embodiments have different limitations, and these specific mechanisms are only examples.
[0059]
Once the desired portion of the image is rendered in frame buffer 702, pixel engine 700 is controlled to copy the frame buffer alpha image to an external frame buffer or texture in another buffer (block 1404, (See FIG. 14). Such a copy-out can be put into, for example, an IA8 texture format. Appropriate measures are taken to ensure synchronization and memory coherence. Synchronization described in US patent application Ser. No. 09 / 726,227, entitled “Dynamic Reconfiguration of Hidden Surface Processing Based on Rendering Mode” and corresponding Provisional Application No. 60 / 226,890 filed on August 23, 2000. See token technology. Both applications are incorporated herein by reference.
[0060]
If the alpha texture is successfully copied out from the internal frame buffer and loaded into the texture memory 502 (see FIG. 14), the system 50 reconfigures the graphics processor 114 based on the difference between adjacent pixel alphas. The outline color is written to the pixels in the frame buffer 702 (block 1406). See FIG. 19 above. Such a process of drawing a cartoon outline may include, for example, reading pixel alpha values, modifying these alpha values, and writing alpha back again as a blend parameter. A pair of texture coordinates and two different texture matrices can be used to look up adjacent alpha values from the alpha texture. One matrix can be set as a unit matrix, and the other can be set as a unit matrix converted. The blend test / comparison can be performed using two common alpha comparison functions in combination with a third logic calculation such as OR or AND. This allows testing within and outside the range, not just magnitude.
[0061]
More specifically, the difference calculation (eg, [a 0 -A 1 ] Absolute value of a 0 Is the alpha value of a pixel, a 1 Is the alpha value of the adjacent pixel), the texture environment unit 600 is set to subtract one alpha value from the other alpha value and write the unclamped result to the output register of the texture environment unit be able to. Alpha comparison and other value comparators in the texture environment unit 600 can be set to detect alpha values that exceed the threshold.
alpha = texture1-texture2
acomp1 = alpha <−X
acomp2 = alpha> X
killpixel = acomp1 OR acomp2
[0062]
In this embodiment, the unclamped negative result from the texture environment unit 600 may be converted to an alpha value by the most significant bit set. Thus, if the alpha difference threshold is 2, the application can write the outline color for pixels where the alpha difference is greater than 1 (max -2). Here, the maximum value is equal to 255. Based on the comparison result, the texture environment unit 600 can be set to blend with the color value from the register. Main processor 110 may also set this color value register to a desired value (eg, black for black outlining effect, blue for blue outlining effect, etc.).
[0063]
In this embodiment, the contour line can be written in two recirculation passes of the recirculation shader in the texture environment unit 600. In the first pass (block 1408), horizontal outlining is drawn into the frame buffer 702. This is based on the texture coordinate transformation matrix multiplication performed by the transformation unit 300 set to move the alpha texture image vertically by one pixel (texel). In the second pass used to write the vertical outlining (block 1410), the texture matrix can be modified to move the alpha image one pixel (texel) horizontally. If it is moved larger than one pixel, a thicker outline can be drawn, but if the outline is too thick, the look may be abnormal.
[0064]
Once both the horizontal and vertical contours are written to the frame buffer 702, the frame buffer is copied out and can be displayed (block 1412).
[0065]
<Example>
The following is an example set of programming interface calls that can be used to control the system 50 to perform cartoon outlining.
[Table 2]
Figure 0004740476
[0066]
<GXSetTexCopySrc>
<Description>
This function sets the source parameter of the embedded frame buffer (EFB) to the texture image copy. This function is useful when generating a texture using a graphics processor (GP).
[0067]
The GP copies the texture to the tiled texture specified by GXCopyTex. GP always copies tiles (32 bytes) so that image widths and heights that are not multiples of the tile width are padded with the undefined data of the copied image. Also, the allocated image size in the main memory must be a multiple of 32 bytes. See GXGetTexBufferSize.
[0068]
<Argument>
left The leftmost copy source pixel, a multiple of 2 pixels
top The top copy source line, a multiple of 2 lines
wd Copy width, multiple of 2 pixels
ht Copy height, multiple of 2 lines
[0069]
<GXCopyTex>
<Description>
This function copies the contents of the embedded frame buffer (EFB) to the texture image buffer dest in the main memory. This function is useful when generating a texture using a graphics processor (GP). If the clear flag is GX_TRUE, the EFB is cleared to the current clear color during the copy process (see GXSetCopyClear). The source image is described by GXSetTexCopySrc. During the copy process, the contents of the EFB are converted to a texture format. The option box to enable the texture format and filter is set using GXSetTexCopyDst.
[0070]
The allocated buffer is padded into X and Y texture tiles (32 bytes per tile). In order to determine the size after padding, a function GXGetTexBufferSize is prepared.
[0071]
The clear flag indicates that the frame buffer should be cleared during the copy process. The frame buffer is cleared to a constant value specified by GXSetCopyClear.
[0072]
<Argument>
dest: pointer to the texture image buffer in main memory. This pointer is adjusted to 32 bytes.
clear: If this flag is GX_TRUE, the frame buffer must be cleared during copying.
[0073]
<GXLoadTexObjPreLoaded>
<Description>
This function loads a state describing a preloaded texture into one of eight hardware register sets. Before this happens, the texture object obj must be initialized with GXInitTexObj or GXInitTexObjCI. The id parameter refers to the texture state register set. Textures must be pre-loaded using GXPreLoadEntireTexture.
[0074]
Once loaded, the texture can be used in any texture environment (Tev) stage using the GXSetTevOrder function. GXInit first calls GXSetTevOrder to create a single texture pipeline that associates GX_TEXMAP0 with GX_TEVSTAGE0 and GX_TEXMAP1 with GX_TEVSTAGE1.
[0075]
Note that GXLoadTexObjPreLoaded does not call the function set by GXSetTexRegionCallBack (and does not call the function set by GXSetTlutRegionCallBack if the texture is in color index format). This is because the area is explicitly set. However, these callback functions must know all the regions to be loaded beforehand. The default callback set by GXInit assumes that there is no preloaded region.
[0076]
<Argument>
obj: points to a texture object that describes the texture and its attributes.
region: points to a region object that describes the region of the texture memory.
id: Designates a texture to be referenced in the texture environment (Tev) stage.
[0077]
<GXInitTexObj>
<Description>
This function is used to initialize or modify a texture object with a non-color index texture. A texture object is used to describe all parameters related to the texture, including parameters such as size, format, wrap mode, filter mode, and the like. It is the application's responsibility to provide memory for the texture object. Once initialized, the texture object is associated with one of the eight active texture IDs using GXLoadTexObj.
[0078]
GXInitTexObjCI is used to initialize the texture object of the color index texture.
[0079]
When the mipmap flag is GX_TRUE, the texture is a mipmap and the texture is subjected to triple linear interpolation. When the mipmap flag is GX_FALSE, the texture is not a mipmap and the texture is subjected to double linear interpolation. To ignore filter mode and other mipmap controls, see GXInitTexObjLOD.
[0080]
<Argument>
[Table 3]
Figure 0004740476
[0081]
<GXInitTexObjLOD>
<C language specification>
[Insert 1]
Figure 0004740476
[0082]
<Description>
This function explicitly sets the texture detail level (LOD) control for the texture object. It is the application's responsibility to provide memory for the texture object. When a texture object is initialized using GXInitTexObj or GXInitTexObjCI, this information is set to a default value based on the mitt map flag. This function allows the programmer to override these defaults. Note that this function call must be after GXInitTexObj or GXInitTexObjCI for a particular texture object.
[0083]
The LOD calculated by the graphics hardware can be biased using the lod_bias parameter. This lod_bias is added to the calculated lod and the result is clamped between min_lod and max_lod. When bias_clamp is enabled, the effect of lod_bias decreases as the polygon becomes more perpendicular to the view direction. This prevents the texture in this state from becoming too clear, but allows LOD bias for diagonal polygons.
[0084]
<Argument>
[Table 4]
Figure 0004740476
[0085]
<GXInitTexPreLoadRegion>
<Description>
[0086]
This function initializes a texture memory (TMEM) region object so that it can be loaded in advance. This area can only be used by the application as a pre-loaded buffer allocated in TMEM. The cache area must be allocated using GXInitTexCacheRegion. For pre-assigned textures, the size of the region must match the size of the texture. Many area objects can be created by the application, and some of the area objects may overlap. However, two overlapping regions cannot be active at the same time.
[0087]
The maximum size of the area is 512K.
[0088]
GXInit does not create an area for preloading. Therefore, if pre-loading is required, the application must allocate an appropriate area. Moreover, it is necessary to create a cache area and its allocator using GXInitTexCacheRegion and GXSetTexRegionCallBack. This is because the new area may destroy the default texture memory configuration.
[0089]
<Argument>
[Table 5]
Figure 0004740476
[0090]
<Example of software-controlled processing to perform cartoon outlining>
The following program part can be used to control the graphics pipeline to produce a cartoon outlining effect.
[Insert 2]
Figure 0004740476
Figure 0004740476
[0091]
<Other compatible examples>
Some of the system components 50 described above may be implemented other than the home video game console described above. For example, software such as a graphics application written for the system 50 may be run on a platform using other configurations that emulate or are compatible with the system 50. If other platforms can successfully emulate, mimic and / or provide some or all of the hardware and software resources of system 50, the other platforms will be able to successfully execute the software. Let's go.
[0092]
As an example, the emulator may provide a hardware and / or software configuration (platform) that is different from the hardware and / or software configuration (platform) of the system 50. The emulator system may include hardware and / or software components that emulate some or all of the system hardware and / or software components to which application software is written. For example, the emulator system can comprise a general purpose digital computer such as a personal computer, which executes a software emulator program that mimics the hardware and / or firmware of the system 50.
[0093]
Some general-purpose digital computers (eg, IBM or Macintosh personal computers and compatibles) currently have 3D graphics cards that provide a graphics pipeline that supports DirectX3D and other standard graphics command APIs. There are also things. They may also have a stereo sound card that provides high quality stereo sound based on standard sound commands. A computer equipped with such multimedia hardware that runs emulator software may have sufficient performance to approximate the graphics and sound performance of the system 50. The emulator software controls the hardware resources on the personal computer platform and controls the processing performance, 3D graphics performance, sound performance, peripheral performance, etc. of the home video game game console platform to which game programmers write game software. To imitate.
[0094]
FIG. 27 shows an example of the entire emulation process, which uses the host platform 1201, the emulator component 1303, and game software that can execute the binary image provided on the storage medium 62. The host 1201 may be a general purpose or dedicated digital computing device, such as a platform with sufficient computing power, such as a personal computer or a video game console. The emulator 1303 may be software and / or hardware executed on the host platform 1201 and converts information from the storage medium 62 such as commands and data in real time into a format that can be processed by the host 1201. can do. For example, the emulator 1303 takes the “source” binary image program instructions that the system 50 is to execute from the storage medium 62 and converts the program instructions into an executable format or a format that can be processed by the host 1201.
[0095]
As an example, if the software is written to run on a platform using a specific processor such as IBM PowerPC and the host 1201 is a personal computer using a different (eg, Intel) processor, an emulator 1303 retrieves one or a sequence of binary image program instructions from the storage medium 1305 and converts these program instructions into those corresponding to Intel's binary image program instructions. In addition, the emulator 1303 can extract and / or generate graphics commands and voice commands to be processed by the graphics audio processor 114 and process them using hardware and / or software graphics and audio processing resources available on the host 1201. Convert these commands to the correct format. As an example, emulator 1303 translates these commands into commands that can be processed by specific graphics and / or sound hardware of host 1201 (eg, using DirectX, OpenGL, and / or sound APIs).
[0096]
The emulator 1303 or other platform that performs the outlining process of FIG. 25 may not have a recirculating shader, but instead uses a separate shading / blending stage pipeline to perform alpha comparison operations. You may implement. Similarly, in other embodiments, alpha and color information need not be stored in the same buffer, but instead this information may be stored in different frame buffers. For example, an alpha “image” giving an object ID may be stored as a map in the main memory. Post processing need not be performed by using texturing, but instead may be performed by a general purpose processor. The rendering of the contour line does not have to be performed in two passes. In other embodiments, the horizontal and vertical contours may be rendered in the same pass.
[0097]
An emulator 1303 used to provide some or all of the functions of the video game system described above includes a graphical user interface (GUI) that simplifies or automates the selection of various options and screen modes performed using the emulator. ) May be given. As an example, such an emulator 1303 may further include extended functions compared to the host platform that the software was originally intended for.
[0098]
FIG. 28 shows an emulation host system 1201 suitable for use with emulator 1303. The system 1201 includes a processing unit 1203 and a system memory 1205. A system bus 1207 couples various system components including the system memory 1205 to the processing unit 1203. The system 1207 may be any of several bus configurations, including those using any of a variety of bus architectures, such as a memory bus or memory controller, a peripheral bus, a local bus, and the like. The system memory 1207 includes a read only memory (ROM) 1252 and a random access memory (RAM) 1254. A basic input / output system (BIOS) 1256 includes basic routines that help to transfer information between elements within the personal computer system 1201 and is stored in ROM 1252. System 1201 further includes various drives and associated computer readable media. The hard disk drive 1209 performs reading from and writing to a magnetic hard disk 1211 (typically fixed). An additional (selectable) magnetic disk drive 1213 reads from and writes to a magnetic disk 1215 such as a removable “floppy”. The optional disk drive 1217 reads from or writes to a removable optical disk 1219 such as an optional medium such as a CDROM. The hard disk drive 1209 and the optical disk drive 1217 are connected to the system bus 1207 by a hard disk drive interface 1221 and an optical drive interface 1225, respectively. Data for the personal computer system 1201 such as instructions, data structures, program modules, and game programs that can be read by the computer is stored in a nonvolatile manner by a drive and a computer-readable medium associated therewith. In other configurations, other types of computer readable media may be used, such as media that can store data accessible by the computer (eg, magnetic cassette, flash memory card, digital video disk, Bernoulli cartridge). Random access memory (RAM), read only memory (ROM), etc.).
[0099]
Many program modules including emulator 1303 may be stored in hard disk 1211, removable magnetic disk 1215, optical disk 1219, and / or ROM 1252 and / or RAM 1254 in system memory 1205. Such program modules may include an operating system that provides graphics and sound APIs, one or more application programs, other program modules, program data, and game data. A user inputs commands and information to the personal computer system 1201 through input devices such as a keyboard 1227, a pointing device 1229, a microphone, a joystick, a game controller, a satellite antenna, and a scanner. Such an input device can be connected to the processing unit 1203 via a serial port interface 1231 coupled to the system bus 1207, but can be connected to a parallel port, a game port fire wire bus, or a universal serial bus ( USB) may be used for connection. A display device such as a monitor 1233 is also connected to the system bus 1207 via an interface such as a video adapter 1235.
[0100]
The system 1201 may also include network interface means, such as a modem 1154, for establishing communications over a network 1152, such as the Internet. The modem 1154 may be internal or external and is connected to the system bus 123 via the serial port interface 1231. Also, the local computing device 1150 (e.g., another network device 1150 (e.g., other communication path such as a wide area network 1152, dial-up, or other communication means) via the local area network 1158 may be used by the system 1201. A network interface 1156 may be provided so that it can communicate with the system 1201). System 1201 typically includes other peripheral output devices such as standard peripherals such as printers.
[0101]
In one example, the video adapter 1235 is a graphics spy that provides high-speed 3D graphics rendering in response to 3D graphics commands issued based on a standard 3D graphics application programmer interface, such as a version such as Microsoft's DirectxX 7.0. It may include a pipeline chipset. The stereo sound speaker set 1237 is also connected to the system bus 1207 via a sound generation interface such as a conventional “sound card”. Such an interface provides support for hardware or embedded software to generate high-quality stereophonic sounds based on sound commands provided from the bus 1207. Such hardware capabilities allow system 1201 to provide sufficient graphics and acoustic speed performance to execute software stored on storage medium 62.
[0102]
The entire contents of the above-mentioned patents, patent applications and other above-mentioned documents are expressly cited herein.
[0103]
Although the present invention has been described in connection with what is presently considered to be the most realistic and optimal embodiments, the present invention should not be construed as limited to the disclosed embodiments. For example, although the purpose of the illustrated embodiment was to provide an image with a cartoon outlining, the flexible alpha comparison operation described above can be used for many different image applications. Furthermore, although a double alpha comparison has been described above, the present application is not limited to just two alpha comparisons. Furthermore, in the preferred embodiment, a recirculating shader was used, but it is also possible to use a parallel scheme with multiple alpha comparators. Accordingly, the present invention is intended to cover various modifications and equivalent arrangements included within the scope of the appended claims.
[Brief description of the drawings]
FIG. 1 is a schematic diagram of an example of an interactive computer graphics system.
FIG. 2 is a block diagram of an example of the computer graphics system of FIG.
FIG. 3 is a block diagram of an example of the graphics and audio processor shown in FIG.
4 is a block diagram of an example of the 3D graphics processor shown in FIG.
FIG. 5 is an example of a logic flow diagram for the graphics and audio processor of FIG. 4;
FIG. 6 shows an example of a reusable recirculating shader.
FIG. 7 shows an example of a shading pipeline implemented using a recirculating shader.
FIG. 8 shows an example block diagram of a recirculating shader.
FIG. 9 shows an example of a recirculating shader input multiplier.
FIG. 10 shows an example of an operation block diagram of a recirculating shader.
FIG. 11 shows an example of a recirculating shader.
FIG. 12 shows an example of a color swap function.
FIG. 13 shows an example of a color swap function.
FIG. 14 illustrates an example of a cartoon outlining technique that encodes an object ID using alpha information.
FIG. 15 shows an example of a cartoon outlining technique that encodes an object ID using alpha information.
FIG. 16 shows an example of a cartoon outlining technique that encodes an object ID using alpha information.
FIG. 17 illustrates an example of a cartoon outlining technique that encodes an object ID using alpha information.
FIG. 18 illustrates an example of a cartoon outlining technique that encodes an object ID using alpha information.
FIG. 19 illustrates an example of a cartoon outlining technique that encodes an object ID using alpha information.
FIG. 20 shows an example of a cartoon outlining technique that encodes an object ID using alpha information.
FIG. 21 shows an example of a cartoon outlining technique that encodes an object ID using alpha information.
FIG. 22 illustrates an example of a cartoon outlining technique that encodes an object ID using alpha information.
FIG. 23 illustrates an example of a cartoon outlining technique that encodes an object ID using alpha information.
FIG. 24 illustrates an example of a cartoon outlining technique that encodes an object ID using alpha information.
FIG. 25 shows an example of a cartoon outlining process executed by the system 50;
FIG. 26 shows an example of a cartoon outlining pipeline implemented by the system 50.
FIG. 27 illustrates another alternative embodiment.
FIG. 28 illustrates another alternative embodiment.

Claims (14)

ハードウェアに基づく再循環シェーダを含むグラフィックスシステムにおいてグラフィックス画像を生成する方法であって、当該方法は、
(a)前記再循環シェーダが、画像化される面を表す情報を取得するステップであって、当該情報は、透明度・不透明度に係るアルファ情報を含む、ステップ;
(b)前記再循環シェーダが、前記アルファ情報に基づく複数のアルファ比較を、少なくとも部分的に実行して、対応する複数のアルファ比較結果を提供するステップ
(c)前記再循環シェーダが、前記複数のアルファ比較結果論理結合を行うステップ;および
(d)前記グラフィックスシステムは、当該論理結合に少なくとも部分的に基づ前記グラフィックス画像をレンダリングするステップを含み、
前記ハードウェアに基づく再循環シェーダは、複数の異なる入力を受け、その入力に戻されて供給され得る出力を生成するシェーダであって、M個のアルファ入力に対するN個の論理アルファ演算を提供することによって、プログラム可能なアルファ情報の演算を実行し得るシェーダであり、ここで、NおよびMは、1より大きい整数である、方法。
A method of generating a graphics image in a graphics system including a hardware-based recirculating shader , the method comprising:
(A) the recirculating shader acquiring information representing a surface to be imaged, the information including alpha information relating to transparency and opacity ;
(B) the recirculating shader, the step of providing said plurality of alpha comparison based on alpha information, running at least partially, a corresponding plurality of alpha comparison results;
(C) the recirculating shader, the plurality of result step performing logical combination of the alpha comparison; and (d) said graphics system, at least part component to said graphics image-out based on the logical combination Including the step of rendering ,
The hardware-based recirculating shader is a shader that receives a plurality of different inputs and produces an output that can be fed back to that input and provides N logical alpha operations on M alpha inputs. A shader that can perform operations on programmable alpha information, where N and M are integers greater than one .
記ステップ(d)は、前記論理結合に基づいてピクセルを処理対象から除くか否かを選択することを含む、請求項1に記載の方法。Before Kiss step (d) includes selecting whether excluded from the processing target pixel based on the logical combination method of claim 1. 記ステップ(d)は、前記論理結合に基づいて、前記グラフィックス画像に含まれるオブジェクトのシルエットの輪郭線または内部輪郭のカラーをブレンドするか否かを選択的に決定することを含む、請求項1に記載の方法。Before Kiss step (d) comprises said on the basis of the logical combination, selectively determining whether colors blend silhouette contour or inner contour of the objects included in the graphic image, The method of claim 1. 前記ステップ(b)および(c)は、その処理対象に含まれる2つのアルファ値の差の絶対値を求めること含む、請求項1に記載の方法。The method according to claim 1, wherein the steps (b) and (c) include determining an absolute value of a difference between two alpha values included in the processing target . ハードウェアに基づく再循環シェーダを含むリアルタイムレンダリングシステムにおいて、画像化される対象である1以上のオブジェクトまたは当該オブジェクトの部分構造のアウトライニングを実行するための方法であって、  A method for performing outlining of one or more objects or substructures of objects to be imaged in a real-time rendering system including a hardware-based recirculating shader comprising:
(a)前記再循環シェーダが、画像化される対象を表す情報を取得するステップであって、当該情報は、前記オブジェクトまたは当該オブジェクトの部分構造を識別するためのオブジェクト識別子をアルファチャンネルに含む、ステップ;  (A) the recirculating shader obtains information representing an object to be imaged, the information including an object identifier for identifying the object or a partial structure of the object in an alpha channel; Step;
(b)前記再循環シェーダが、前記画像化される対象を表す情報に基づく複数のアルファ比較を、少なくとも部分的に実行して、対応する複数のアルファ比較の結果を提供するステップ;  (B) the recirculating shader at least partially performing a plurality of alpha comparisons based on information representative of the imaged object to provide a corresponding plurality of alpha comparison results;
(c)前記再循環シェーダが、前記複数のアルファ比較の結果の論理結合を行うステップ;および  (C) the recirculating shader performs a logical combination of the results of the plurality of alpha comparisons; and
(d)前記リアルタイムレンダリングシステムが、当該論理結合に少なくとも部分的に基づき前記オブジェクトまたは当該オブジェクトの部分構造の輪郭線または内部輪郭線をフレームバッファに選択的に書き込むステップを含み、  (D) the real-time rendering system selectively writing a contour or an internal contour of the object or a substructure of the object to a frame buffer based at least in part on the logical combination;
前記ハードウェアに基づく再循環シェーダは、複数の異なる入力を受け、その入力に戻されて供給され得る出力を生成するシェーダであって、M個のアルファ入力に対するN個の論理アルファ演算を提供することによって、プログラム可能なアルファ情報の演算を実行し得るシェーダであり、ここで、NおよびMは、1より大きい整数である、方法。  The hardware-based recirculating shader is a shader that receives a plurality of different inputs and produces an output that can be fed back to that input and provides N logical alpha operations on M alpha inputs. A shader that can perform operations on programmable alpha information, where N and M are integers greater than one.
比較されている所与のピクセルのアルファ値をa0としその隣接ピクセルのアルファ値がa1である場合、前記再循環シェーダは、[a0−a1]の絶対値を計算する、請求項に記載の方法。 The alpha value of a given pixel being compared with a0, if the alpha value of its adjacent pixels are a1, the recirculating shader computes the absolute value of [a0-a1], according to claim 5 the method of. 前記再循環シェーダは、比較されている一方のアルファ値からもう一方のアルファ値減算して、そのクランプされていない結果を出力する、請求項に記載の方法。The recirculating shader subtracts the other alpha value from one of the alpha values being compared, and outputs the result of its non-clamped The method of claim 5. 前記再循環シェーダは、予め定めた閾値を超えるアルファ差分値を検出するように動作する、請求項に記載の方法。The recirculating shader operates to detect alpha difference value exceeds a predetermined threshold The method of claim 5. 前記再循環シェーダが、クランプされていない負の結果を生じると、当該結果は変換されて、上位ビットセットを有するアルファ値となる、請求項に記載の方法。6. The method of claim 5 , wherein when the recirculating shader produces an unclamped negative result , the result is transformed to an alpha value with the most significant bit set. 前記再循環シェーダは、複数のアルファ演算結果に基づいて、予め定めたカラー値にブレンドを行なう、請求項に記載の方法。6. The method of claim 5 , wherein the recirculating shader blends to a predetermined color value based on a plurality of alpha computation results. 前記再循環シェーダは、第1のパス内において第1の方向の輪郭線を書き込み、第2のパス内において第2の方向の輪郭線を書き込む、請求項に記載の方法。6. The method of claim 5 , wherein the recirculating shader writes a first direction contour in a first pass and writes a second direction contour in a second pass. 前記方法は、アルファチャンネルから得たテクスチャをマッピングして、当該テクスチャを用いてアルファ差分を前記再循環シェーダによる評価のために提供することをさらに含む、請求項に記載の方法。The method of claim 5 , further comprising mapping a texture obtained from an alpha channel and using the texture to provide an alpha difference for evaluation by the recirculating shader . グラフィックスシステムであって、
テクスチャ座標マトリックス乗算器を含むテクスチャ部と、
アルファチャンネルを含むハードウェアに基づく再循環シェーダと、
アルファ画像を記憶可能な組み込みフレームバッファと、
アルファ画像を前記フレームバッファからコピーして前記テクスチャ部がテクスチャとして利用できるようにする、コピーアウトパイプラインとを備え、
ここで、
(a)前記再循環シェーダは、画像化される面を表す情報を取得し;
(b)前記再循環シェーダは、前記アルファチャネルの値に基づく複数のアルファ比較を、少なくとも部分的に実行して、対応する複数のアルファ比較の結果を提供し;
(c)前記再循環シェーダは、前記複数のアルファ比較の結果の論理結合を行い;そして
(d)前記グラフィックスシステムは、当該論理結合に少なくとも部分的に基づきグラフィックス画像を、前記組み込みフレームバッファにレンダリングし、
ここで、前記再循環シェーダは、複数の異なる入力を受け、その入力に戻されて供給され得る出力を生成するシェーダであって、M個のアルファ入力に対するN個の論理アルファ演算を提供することによって、プログラム可能なアルファ値の演算を実行し得るシェーダであり、ここで、NおよびMは、1より大きい整数である、グラフィックスシステム。
A graphics system,
A texture portion including a texture coordinate matrix multiplier;
A hardware-based recirculating shader that includes an alpha channel;
A built-in frame buffer that can store alpha images;
A copy-out pipeline that copies an alpha image from the frame buffer and allows the texture portion to be used as a texture ;
here,
(A) the recirculating shader obtains information representing the surface to be imaged;
(B) the recirculating shader performs at least partially a plurality of alpha comparisons based on the value of the alpha channel to provide a corresponding plurality of alpha comparison results;
(C) the recirculating shader performs a logical combination of the results of the plurality of alpha comparisons; and
(D) the graphics system renders a graphics image in the embedded frame buffer based at least in part on the logical combination;
Here, the recirculating shader is a shader that receives a plurality of different inputs and produces an output that can be fed back to that input and provides N logical alpha operations on M alpha inputs. A graphics system in which N and M are integers greater than one.
前記再循環シェーダは、前記複数の論理的アルファ比較を論理的に結合し、前記結合結果に基づいて、所定のカラーをブレンドする、請求項13に記載のグラフィックスシステム。The graphics system of claim 13 , wherein the recirculating shader logically combines the plurality of logical alpha comparisons and blends a predetermined color based on the combined result.
JP2001163359A 2000-08-23 2001-05-30 Method and apparatus for providing a logical combination of N alpha operations in a graphics system Expired - Fee Related JP4740476B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US22691500P 2000-08-23 2000-08-23
US60/226915 2000-08-23

Publications (2)

Publication Number Publication Date
JP2002074385A JP2002074385A (en) 2002-03-15
JP4740476B2 true JP4740476B2 (en) 2011-08-03

Family

ID=22850962

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001163359A Expired - Fee Related JP4740476B2 (en) 2000-08-23 2001-05-30 Method and apparatus for providing a logical combination of N alpha operations in a graphics system

Country Status (1)

Country Link
JP (1) JP4740476B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7173631B2 (en) * 2004-09-23 2007-02-06 Qualcomm Incorporated Flexible antialiasing in embedded devices
JP4616167B2 (en) * 2005-12-28 2011-01-19 株式会社日立製作所 Drawing method, image data generation system, CAD system, and viewer system
CN102255930B (en) * 2010-05-21 2014-04-02 国际商业机器公司 Method and system for providing scene data of virtual world

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2270243B (en) * 1992-08-26 1996-02-28 Namco Ltd Image synthesizing system
US5748946A (en) * 1995-02-17 1998-05-05 International Business Machines Corporation Method and apparatus for improved graphics picking using auxiliary buffer information
JPH10161636A (en) * 1996-11-29 1998-06-19 Hitachi Ltd Graphics display device
US6496190B1 (en) * 1997-07-02 2002-12-17 Mental Images Gmbh & Co Kg. System and method for generating and using systems of cooperating and encapsulated shaders and shader DAGs for use in a computer graphics system
JP3043697B2 (en) * 1997-12-01 2000-05-22 静岡日本電気株式会社 Display device and display method of alpha blending image

Also Published As

Publication number Publication date
JP2002074385A (en) 2002-03-15

Similar Documents

Publication Publication Date Title
JP4698893B2 (en) Method, graphics system, and program for providing improved fog effects
JP4680412B2 (en) Method and apparatus for dynamically reconfiguring the order of hidden surface processing based on drawing mode
JP4790150B2 (en) Shadow mapping in low cost graphics systems
US6700586B1 (en) Low cost graphics with stitching processing hardware support for skeletal animation
US6707458B1 (en) Method and apparatus for texture tiling in a graphics system
JP5128276B2 (en) GAME DEVICE, GAME PROGRAM, COMPUTER-READABLE INFORMATION STORAGE MEDIUM, GAME SYSTEM, AND GAME PROCESSING METHOD
US7061502B1 (en) Method and apparatus for providing logical combination of N alpha operations within a graphics system
JP4863574B2 (en) Image generation method using Z texturing
US6618048B1 (en) 3D graphics rendering system for performing Z value clamping in near-Z range to maximize scene resolution of visually important Z components
JP4658378B2 (en) Method and apparatus for bump mapping that mirrors the environment in a graphics system
JP4731028B2 (en) Recirculating shade tree blender for graphics systems
JP4691273B2 (en) Graphics processing system and embossed bump mapping method
JP3705739B2 (en) Information storage medium and game device
JP4672072B2 (en) Method and apparatus for providing non-realistic cartoon outline in 3D video graphics system
JP2007226572A (en) Program, information storage medium and image creation system
JP4740476B2 (en) Method and apparatus for providing a logical combination of N alpha operations in a graphics system
JP2006323512A (en) Image generation system, program, and information storage medium
JP5253118B2 (en) Image generation system, program, and information storage medium
JP4683760B2 (en) Graphics system with embedded frame buffer having a reconfigurable pixel format
JP4740490B2 (en) Clamping Z values in the Z neighborhood to maximize the accuracy of visually important Z components in graphics rendering systems and avoid Z neighborhood clipping
EP1094421A2 (en) Method and apparatus for providing non-photorealistic cartoon outlining within a 3D videographics system
JP4698894B2 (en) Method, apparatus and program for texture tiling in a graphics system
JP3740109B2 (en) Information storage medium and game device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080519

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101018

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101022

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101217

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110405

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110502

R150 Certificate of patent or registration of utility model

Ref document number: 4740476

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140513

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees