たれぱんのびぼーろく

わたしの備忘録、生物学とプログラミングが多いかも

HoloToolkitのシェーダーたち

HoloToolkitにはシェーダーも含まれている.
こいつらはなんだ? 解説記事が日英ともに全然ないぞ?
では調べるしかあるまい…

現時点での結論

Fast Configurable shaderを使えばええんでない?
以上.

状況

階層は Utilitiesの下. HoloToolkit-Unity/Assets/HoloToolkit/Utilities/Shaders at master · Microsoft/HoloToolkit-Unity · GitHub

.cginc含めて18ファイル, だが、実質7つのshaders. 他は共通部分を切り出したファイル.
2017-03-01現在、最終更新から1~11ヶ月経ってる. 他のツールより更新頻度は低そう,だが,大事な更新が2017-01にあった.
Wikiには記載なし!
ReadMeにワンラインの記載, こりゃ試す人少ないっすよ…
github.com

注意事項として、自分でpackagingしないと最新のシェーダーが入ってない (GetStarted.MD、1aにある.unitypackageは1月作製とかで割と古い)

シェーダーたち

2017-01に新世代のシェーダーが颯爽と現れた模様.
その経緯.
github.com

新世代シェーダー

  • FastConfigurable.shader

現役世代シェーダー

  • LambertianConfigurable[Transparent].shader
  • StandardFast.shader : Unity Standard Shaderのハイパフォーマンス互換
  • UnlitConfigurable[Transparent].shader
  • UnlitNoDepthTest.shader
  • VertexLitConfigurable[Transparent].shader
  • WindowOcclusion.shader

FastConfigurable.shader

Very fast shader that uses the Unity light system. Compiles down to only performing the operations you’re actually using. Uses material property drawers rather than a custom editor for ease of maintenance.

LambertianConfigurable[Transparent].shader

Feature configurable per-pixel lambertian [transparent] shader. Use when higher quality lighting [and transparency] is desired, but specular highlights are not needed.
ハイクオリティなシェーダー.
ランバート反射?
specular highlightは無し Specular highlight - Wikipedia

StandardFast.shader

Higher performance drop-in replacement for the Unity Standard Shader. Use when very high quality lighting (including reflections) is needed.
Unity Standard Shaderのハイパフォーマンス完全互換(!)シェーダー.
超ハイクオリティなシェーダー.

UnlitConfigurable[Transparent].shader

Feature configurable unlit [transparent] shader. Use when [transparency and] no lighting is[are] desired.
ライティングなし、テクスチャまんまのシェーダー.

UnlitNoDepthTest.shader

Render with a single texture but ignore depth test resuls so object always appears on top.
…?

VertexLitConfigurable[Transparent].shader

Feature configurable vertex lit [transparent] shader. Use when a higher performance but lower precision lighting trade-off is acceptable. [, and transparency is needed.]
ライティング精度を落とす代わりに、パフォーマンス向上、な感じ?

WindowOcclusion.shader

A simple occlusion shader that can be used to hide other objects. This prevents other objects from being rendered by drawing invisible ‘opaque’ pixels to the depth buffer. This shader differs from Occlusion.shader in that it doesn’t have any depth offset, so it should sort as expected with other objects adjacent to the window.

others

HoloToolkitCommon.cginc

Common shader functionality

macro.cginc

Preprocessor macros to support shaders