Submit Search
Upload
トゥーンシェーダーを 作った話
•
4 likes
•
2,034 views
notargs
Follow
【年末だよ】Unity お・と・な のLT大会 2017【ポロりしてもいいのよ】で発表した資料です。
Read less
Read more
Engineering
Report
Share
Report
Share
1 of 30
Download now
Download to read offline
Recommended
Hololens2 hackday 2020 in Tokyo
Hololens2 hackday 2020 in Tokyo
Holo Mon
UE4セミナー 資料
UE4セミナー 資料
ka-punn
[UE4] Material Effect
[UE4] Material Effect
ka-punn
OSC福岡 : 航空機写真撮影入門 in FUKUOKA
OSC福岡 : 航空機写真撮影入門 in FUKUOKA
Masataka Kondo
写真の撮り方
写真の撮り方
YanoLabLT
つぶやきGLSLのススメ
つぶやきGLSLのススメ
notargs
板ポリだけで めちゃカッコいい グラフィックスを出す!
板ポリだけで めちゃカッコいい グラフィックスを出す!
notargs
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Recommended
Hololens2 hackday 2020 in Tokyo
Hololens2 hackday 2020 in Tokyo
Holo Mon
UE4セミナー 資料
UE4セミナー 資料
ka-punn
[UE4] Material Effect
[UE4] Material Effect
ka-punn
OSC福岡 : 航空機写真撮影入門 in FUKUOKA
OSC福岡 : 航空機写真撮影入門 in FUKUOKA
Masataka Kondo
写真の撮り方
写真の撮り方
YanoLabLT
つぶやきGLSLのススメ
つぶやきGLSLのススメ
notargs
板ポリだけで めちゃカッコいい グラフィックスを出す!
板ポリだけで めちゃカッコいい グラフィックスを出す!
notargs
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
More Related Content
Featured
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
Featured
(20)
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
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...
トゥーンシェーダーを 作った話
1.
とある プロジェクトで トゥーン シェーダーを 作った話
2.
自己紹介
3.
クラスター株式会社について VRの会社 毎週木曜日にポーカー リモートワーク推進
4.
資料は公開します
5.
今回の トゥーンシェーダーで 目指したもの
6.
あらゆる環境下で破綻しない堅牢性
7.
デザイナーによる豊富なカスタマイズ性
8.
スマートフォン/VRでも軽快に動作する軽量さ
9.
実装した機能
10.
仕様/制約 一つのシェーダーで全てを表現 単一のDirectionalLightのみサポート Ambient Lightも乗る
11.
主線の描画 背面法 線の太さはテクスチャで指定可能 主線も法線を無視してライティング
12.
影色の計算 テクスチャ/単色による色指定可能 ボケ幅、影の占める領域を指定可能 落ち影対応
13.
落ち影の対応 通常通りShaodwMap/Shadow Attenuationを計算 ライト色に乗算はしない(全方向からの光と見なす) アルベドカラーとして影色を載せる
14.
GlowHighlight / Highlight 天使の輪の表現 Matcapによるグラデーション、減衰表現に対応
15.
Additional Matcap リムライト的な表現をするために追加 Matcapで強制的に光らせる箇所を指定
16.
軽量化
17.
Forward Rendering アウトライン、サーフェースの2Passでレンダリング Deffered RenderingはまだモバイルやVRではつらい
18.
Multi-Compile if文は結構なコスト #ifdef で切り分け、条件分岐ごとに別のシェーダーを生成する
19.
Multi-Compile それぞれのモジュールがmulti_compileに対応
20.
Vertex/Fragment Shader Surface Shader コード量が減る 思ったよりは色々出来るが、痒い所に手が届かない Vertex/Fragment
Shader コード量が増える カスタマイズできる Unity標準のレンダリングを再現しようとすると結構大変
21.
エディタ拡張
22.
エディタ拡張が無いと… 使いにくい どこが何に対応しているのかがわからない
23.
エディタ拡張があると わかりやすい 気軽にいじれる雰囲気
24.
各モジュールのヘッダの実装 PostProcessingStackのコードから拝借 ShurikenのヘッダのStyleにToggleを重ねる
25.
マテリアルのパラメーターを表示するUtility - マテリアルから値を取り出す/設定する方法 - フィールドの表示の仕方 を渡すと、自動で -
Undoの登録 - 複数マテリアル対応 まで実行してくれるメソッド
26.
例: スライダを表示する
27.
各モジュールの定義 かなりスッキリ
28.
よかったこと 一つのシェーダーに集約したことで、メンテナンスコストが下がった 使いやすいと言ってもらえた
29.
まとめ 表現に応じてシェーダーを作ろう 使いにくさを感じたらエディタ拡張を作ろう ポーカーはいいぞ
30.
おわり
Download now