Suche senden
Hochladen
LWRPのパス拡張について
•
Als PPTX, PDF herunterladen
•
2 gefällt mir
•
1,587 views
Kazuki Ito
Folgen
LWRPのパス拡張とカメラスタッキングの有効化について
Weniger lesen
Mehr lesen
Ingenieurwesen
Diashow-Anzeige
Melden
Teilen
Diashow-Anzeige
Melden
Teilen
1 von 65
Jetzt herunterladen
Empfohlen
常識の壁を打ち破れ(VMware ThinApp でWindowsを仮想化)
常識の壁を打ち破れ(VMware ThinApp でWindowsを仮想化)
tunemicky
ライブストリーミング低遅延化の取り組み @ DeNA
ライブストリーミング低遅延化の取り組み @ DeNA
akirahiguchi
Try new transport protocol SRT (ver. 2)
Try new transport protocol SRT (ver. 2)
Tetsuyuki Kobayashi
rpi_handson_2
rpi_handson_2
teruyaono1
AmplifyShaderEditorを使ったLWRP対応について
AmplifyShaderEditorを使ったLWRP対応について
Kazuki Ito
Asset Bundleちょっと理解した( )
Asset Bundleちょっと理解した( )
Kazuki Ito
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Empfohlen
常識の壁を打ち破れ(VMware ThinApp でWindowsを仮想化)
常識の壁を打ち破れ(VMware ThinApp でWindowsを仮想化)
tunemicky
ライブストリーミング低遅延化の取り組み @ DeNA
ライブストリーミング低遅延化の取り組み @ DeNA
akirahiguchi
Try new transport protocol SRT (ver. 2)
Try new transport protocol SRT (ver. 2)
Tetsuyuki Kobayashi
rpi_handson_2
rpi_handson_2
teruyaono1
AmplifyShaderEditorを使ったLWRP対応について
AmplifyShaderEditorを使ったLWRP対応について
Kazuki Ito
Asset Bundleちょっと理解した( )
Asset Bundleちょっと理解した( )
Kazuki Ito
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
Weitere ähnliche Inhalte
Empfohlen
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
Empfohlen
(20)
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
LWRPのパス拡張について
1.
LWRPのパス拡張について 伊藤 和樹
2.
プロフィール 伊藤 和樹
某スマホゲーム会社にて新規タイトルの開発中 主な仕事は LWRPの子守(verUP・保守・拡張) シェーダをゴニョゴニョする 1
3.
アジェンダ LWRPのパス拡張(v3.0.0~v3.2.0) LWRPのパス拡張(v3.3.0~)
カメラスタッキングが使えない!?ならば改造すれば良いじゃない 2
4.
みなさんご存知かとは思いますが、、 3
5.
LWRPはフォワード1パスしか描けない 4
6.
5
7.
とはいえ、 v4番台までPreview版なので 文句は言えない、、 6
8.
大人しく拡張していきましょう 7
9.
今回の検証に使うシェーダ 8 検証には R
-> G -> B の順で単色を表示するだけのシェーダを使用
10.
91パス目
11.
102パス目
12.
113パス目
13.
LWRPに手を加えずに表示 12 1パス目のRedのみ描画
14.
LWRPのパス拡張(v3.0.0~v3.2.0) 追加するパス セットアップクラス 13 必要なもの
15.
追加するパス ScriptableRenderPassを継承したクラスを実装 Runtime/Passes以下にあるクラスをみて参考にすると良い 14
16.
15
17.
16 ScriptableRenderPass を継承し、描画時に実行される Execute
を実装する ※赤線が出てますがUnity上ではエラーは出ず問題なく動作します。
18.
MonoBehaviourを継承&IRendererSetupインターフェイスを 実装したクラスを用意する 17 セットアップクラス
19.
18 Setupメソッドを実装 (LWRPのDefualtRendererSetupをコピー&ペーストしてSetupメソッド改造した方が良いです) ※Setupメソッドはカメラ毎に呼び出されます
20.
19 カメラに作成したRendererSetupをアタッチ
21.
拡張後の表示 20 3パス目のBlueまで描画
22.
LWRPのパス拡張(v3.3.0~) 21 必要なもの 追加するパス
パスを差し込むコンポーネント
23.
追加するパス 22 V3.0.0〜v3.2.0で紹介した内容と同じの為割愛します。
24.
パスを差し込むコンポーネント 実装するインターフェイスによって差し込まれるタイミングが変わります IBeforeCameraRender IAfterDepthPrePass
IAfterOpaquePass IAfterOpaquePostProcess IAfterSkyboxPass IAfterTransparentPass IAfterRender 23
25.
24 Pipeline標準のRenderTexure設定情報と 描画内容を読み書き出来るハンドルがColorとDepthで引数に渡されます。 ※IAfterRenderのみ引数は無く描画内容の取得・書き込みが出来ません (CommandBufferの代わりくらいの感覚で大丈夫かと思います)
26.
25 GetPassToEnqueueメソッド内で自作したパスのインスタンスの作成と初期化をし、 戻り値として返却。
27.
26 カメラに作成したコンポーネントをアタッチ
28.
拡張後の表示 27 3パス目のBlueまで描画
29.
パスを追加する上での注意点 LWRPではサポートしているUnlitの旧シェーダ以外、 パスの記述順は考慮されません。 LWRP向けシェーダではLightModeで判別をしている為、 パスの描画順がランダムになったり 1シェーダ内に同一LightModeが複数ある場合描画を行わなかったりします。 (バージョンによってどちらかの挙動します) 28
30.
ここからは カメラスタッキング についてお話しします 29
31.
30ワールドカメラ + UIカメラ UIにフグ・ワールドにCubeを置いています
32.
カメラスタッキングが使えない!? ならば改造すれば良いじゃない 31
33.
32
34.
33
35.
とはいえ、 どうしても使いたい時ありますよね…? 34
36.
35 まずクリアフラグを改造 クリアフラグの置換
37.
36 カメラのクリア設定をLWRPのクリアフラグに変換するメソッド実装
38.
37 実装したメソッドに差し替え
39.
38Opaqueの最初のパスの改造 パスクラス内にあるExecuteメソッドで描画の対象のRenderTextureを設定してしる箇所がある
40.
39 ClearFlagからColorのRenderTextureを返すメソッドを実装
41.
40 ColorとDepthのRenderTextureの読み込みオプションを書き換え
42.
RendererSetupを改造 41 DefualtRendererSetupをコピー&ペーストして適当なクラス名やネームスペースを切る (既に独自のSetupクラスを実装済みの場合以外)
43.
42 作成したパスに置き換え
44.
43 ワールドカメラの内容も無事表示されました
45.
これで終わり 44
46.
…ではありません 45
47.
カメラスタッキングを使う すべてのカメラにSetupをアタッチするの めんどくさくないですか? 46 (それに今回はMonoBehaviour継承してない)
48.
すべてのカメラでスタッキングを有効化する為、 PipelineAssetも改造しましょう 47
49.
PipelineAssetの改造 48 LightweightRenerPipelineAssetを継承したクラスを作成し、 InternalCreatePipelineメソッドをオーバーライド
50.
49 PipelineAsset作成周りのメソッドを実装
51.
50 Actionメソッドを改造したPipelineAssetを生成するように変更
52.
51 CreateLightweightPipelineメソッドのMenuItemを適当なメニュー名に変更し、 生成するインスタンスを改造したAssetに変更
53.
52 LoadResourceFileメソッドはLightweightRenderPipeAssetのものをコピー&ペースト
54.
PipelineAssetEditor 53 LinghtweightRenderPipelineAssetEditorを継承し、 CustomEditorの対象を改造したAssetクラスに変更
55.
54 標準のLightweightRenderPipelineAssetと同じ見た目になり設定しやすく
56.
CameraEditor & LightEditor
55 PipelineAssetに設定したHDR・MSAA・Depth Texture・Opaque Textureの値が利用出来るように
57.
56 PipelineAssetに設定したShadow Biasの値が利用出来るように
58.
57 LightweightRenderPipelineCameraEditorと LightweightRenderPipelineLightEditorをコピー&ペーストし、 CustomEditorForRenderPipelineの対象を改造したAssetに変更
59.
おまけ 58
60.
開発中プロジェクトのLWRP移行について 59 移行の際、既存のシェーダの対応作業が発生すると思いますが、 念の為既存のシェーダを残して LWRP対応シェーダを作成する事をおすすめします
61.
60 マテリアル数が多い場合シェーダ差し替えはツールを使うと楽です。 https://github.com/Itoen/ShaderReplacer
62.
デザイナーがShade Forgeを使用している場合、 LWRP非対応のためAmplify Shader
Editorに移行しましょう 61シェーダのビジュアルスクリプティングツールについて
63.
Amplify Shaderの標準LWRPテンプレート 62 PBRとUnitのシェーダテンプレートが用意されてます
64.
Amplify Shader軽量LWRP対応テンプレート 63 https://github.com/Itoen/ASE-LWRP シャドウ以外のライティング処理を省いたテンプレートを用意してます
65.
ご静聴ありがとうございました 64
Hinweis der Redaktion
InternalCreatePipelineが呼ばれた直後にPipelineが生成されるのでs_DefaultRenderSetupをReflectionで書き換えておく
LightweightRenderPipelineAssetのm_ResourcesAssetはprivateなのでReflectionで書き込みます
※ダイレクトマーケティングです
※こちらもダイレクトマーケティング
Jetzt herunterladen