Too many texture interpolators would be used for ForwardBase pass

Unityのシェーダーで

Shader error in '':
Too many texture interpolators would be used for ForwardBase pass (11 out of max 10) at line xx

のようなエラーが出る場合は

#pragma target 4.0

を追加すると動くようになることがあるみたいです。

リンク

Terrain Transparency – Too many text interpolators – Unity Answers
https://answers.unity.com/questions/1077032/terrain-transparency-too-many-text-interpolators.html

関連記事

UnityでFake Rim Lighting
UnityでFake Rim Lightingを実装したShaderです。 CG Shaders - Fake Rim Lighting - Artistic Experimentshttp://www.artisticexperiments.com/cg-shaders/cg-shaders-fake-3-point-lighting Sphereに適用してみたサンプル ...

Unityでshaderを書くときに参考になる公式リンク
Surface Shaderのサンプル集 Unity - Manual: Surface Shader exampleshttps://docs.unity3d.com/Manual/SL-SurfaceShaderExamples.html SurfaceOutput、SurfaceOutputStandardの定義と#pragma surfaceディレクティブに書けるキーワード ...

シェーダーを書くときのfloat/half/fixedの使い分け
シェーダーを書くときのfloat、half、fixedの使い分けについて float 通常のプログラミング言語のfloatと同じ32ビット ワールド空間の位置テクスチャ座標 half 一般に16ビット ベクトルオブジェクト空間位置HDRカラー fixed 一般的に11ビット テクスチャデータ 十分な精度になっているかどうかの検証は実機上...

Shader内でTiling/Offset値の取得方法
UnityのShaderプログラム内で「Tiling」や「Offset」の値を知りたい場合は{TextureName}_STの値を参照すると良いそうです。 sampler2D _MainTex; float4 _MainTex_ST; _MainTex_ST.x; // Tilingのxの値 _MainTex_ST.y; // Tilingのyの値 _MainTex_ST.z; //...

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です