このページでは、シーンで Lighting Settings Asset を使用し、その Lighting Mode プロパティが Shadowmask に設定される場合の、シーンのすべての Mixed Lights (混合ライト) の動作について説明します。
Similar to Baked Indirect Lighting Mode, Shadowmask Lighting Mode combines real-time direct lighting with baked indirect lighting. However, Shadowmask Lighting Mode differs from Baked Indirect Lighting Mode in the way that it renders shadows. Shadowmask Lighting Mode makes it possible for Unity to combine baked and real-time shadows at runtime and render shadows in the far distance. It does this by using an additional lightmap texture known as a shadow mask, and by storing additional information in Light Probes. Unity generates Shadow masks and Light Probe occlusion data for baked shadows.
Shadowmask Lighting Mode provides the highest fidelity shadows among all the Lighting Modes, but has the highest performance cost and memory requirements. It’s suitable for rendering realistic scenes where distant GameObjects are visible, such as open worlds, on high-end or mid-range hardware.
レンダーパイプライン間での Shadowmask ライティングモードのサポートについては、レンダーパイプライン機能比較 を参照してください。
Use the Quality Settings panel to set the Shadowmask Mode Unity uses at runtime.
シーンのライティングモードを Shadowmask に設定し、プロジェクトが品質設定で Distance Shadowmask を使用する場合、混合ライトは以下のように動作します。
シーンのライティングモードを Shadowmask に設定し、プロジェクトが品質設定で Shadowmask を使用する場合、混合ライトは以下のように動作します。
ビルトインレンダーパイプラインでは以下を行います。
HD レンダーパイプラインでは以下を行います。
HDRP の Shadowmask ライティングモード ドキュメントを参照してください。
Shadow Distance プロパティを使用して、Unity がリアルタイムの影 (シャドウ) を描画するカメラからの距離制限を決定します。
ランタイムに、Unity はシャドウマスクを使用して、ピクセルを影にするかどうかを判断します。シャドウマスクのテクスチャには、ベイクしたライトに関するオクルージョン情報が含まれます。シャドウマスクは同じ UV レイアウトと解像度を対応するライトマップと共有します。シャドウマスクには、テクセルごとに最大 4 つのライトのオクルージョン情報が RGBA 形式で含まれます。
4 つ以上のライトが重なった場合、余分のライトはベイクしたライティングに代替処理されます。どのライトをベイクしたライトにするかはベイクのシステムによって決定され、重なっているライトの 1 つが変更されない限り、ベイク全体で一貫しています。ライトプローブも、最大 4 つのライトの同じ情報を取得します。
ライトの重なりは、影を受けるオブジェクトと無関係に計算されます。ですから、それらのライトのバウンディングボリュームが空間の点で重ならない限り、1 つのオブジェクトが、すべてが同じシャドウマスク/プローブのチャンネルから来る 10 の異なる混合ライトの効果を受けることが可能です。ライトが重なる場合は、より多くのチャンネルが使用されます。そして、4 チャンネルがすべてすでに割り当てられているときにライトが重なる場合は、そのライトは完全にベイクされるように代替処理されます。
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.