Upgrade to Pro — share decks privately, control downloads, hide ads and more …

画像処理から始めるコンピュートシェーダ / Introduction to Image Processing using Compute Shader

sotanmochi
September 23, 2019

画像処理から始めるコンピュートシェーダ / Introduction to Image Processing using Compute Shader

UniteEve2のLT登壇資料

sotanmochi

September 23, 2019
Tweet

More Decks by sotanmochi

Other Decks in Technology

Transcript

  1. コンピュートシェーダの並列処理のモデル 画像出典: Direct Compute – Bring GPU Computing to the

    Mainstream https://www.nvidia.com/content/GTC/documents/1015_GTC09.pdf 14 1つのグループにつき THREADS_X × THREADS_Y の並列数で 実行される(並列数の上限はデバイスによる)
  2. コンピュートシェーダで画像処理を実装する 全体の処理の流れはCPU側(C#スクリプト)で実装 15 バイラテラルフィルタ エッジ検出(ソーベルフィルタ) 乗算(BF and エッジ) コントラスト調整(トーンカーブ) Thread

    Groups X = 80 Thread Groups Y = 45 指定したスレッドグループ数でコンピュートシェーダ(カーネル)を実行する 1つのグループにつき16x16=256並列で実行される時 ・X方向のスレッド数:16 ・Y方向のスレッド数:16   1280x720の解像度の画像全体を処理するために必要な グループ数 ・X方向:1280 / 16 = 80 ・Y方向: 720 / 16 = 45
  3. コンピュートシェーダを始めるための参考資料 Unity Graphics Programming vol.1 第2章 ComputeShader入門 https://indievisuallab.stores.jp/items/59edf11ac8f22c0152002588 Hello, DirectCompute

    https://www.slideshare.net/dasyprocta/hello-direct-compute Direct Compute – Bring GPU Computing to the Mainstream https://www.nvidia.com/content/GTC/documents/1015_GTC09.pdf Compute Shader Magic ~あなたの描画エンジンでコンピュートシェーダを活用するアイデア(CEDEC 2013) https://cedil.cesa.or.jp/cedil_sessions/view/1002 23
  4. END