通常のレンダリングでは、ピクセルの赤、緑、青は 0 から 1 の範囲の小数点数により表現され、0 は強度 0 であり、1 はディスプレイデバイスの最大の強度を意味します。これを使用するのは簡単ですが、現実世界の場面でのライティングの働きを正確に反映しません。人間の目は、近隣のライティング条件に合わせようとするため、もし暗く照らされた部屋で白く見えるものでも、昼間の明るい光で灰色に見えるものほどに実際は明るくない場面があります。さらに目はレンジの低いほうが高い方よりも明るさの差に敏感です。
ピクセル値の範囲が現実世界のライトレベルをより正確に反映するようにレンダリングを適合させると、より説得力のあるビジュアルエフェクトを得られるようになります。値をディスプレイデバイスで利用可能な範囲にマッピングしなおす必要はありますが、中間的な演算( Unity のイメージエフェクトのような)では、よりリアルな結果が得られるようになります。グラフィックスの内部表現で 0 ~ 1 範囲外の値を使えるようにすることは High Dynamic Range (HDR) レンダリングの根本的な要素です。
HDR はカメラコンポーネントの設定を使用して各カメラで別々に有効化します。
When HDR is active, the scene is rendered into an HDR image buffer which can accommodate pixel values outside the 0..1 range. This buffer is then used by post-processing effects such as the Bloom effect in the Post-processing stack. The HDR image is then converted into the standard low dynamic range (LDR) image to be sent for display. This is usually done via Tonemapping, part of the Color Grading pipeline. The conversion to LDR must be applied at some point in the post-process pipeline but it need not be the final step if LDR-only post-processing effects are to be applied afterwards. For convenience, some post-processing effects can automatically convert to LDR after applying an HDR effect (see Scripting below).
Tonemapping is the process of mapping HDR values back into the LDR range. There are many different techniques, and what is good for one project may not be the best for another. A variety of tonemapping techniques have been included in the Post-processing stack. To use them you can download the Post-processing stack from the Asset Store. A detailed description of the tonemapping types can be found in the Color Grading documentation.
フォワードレンダリングモードでは、HDR はポストプロセシングエフェクトが有効である場合にのみサポートされます。これはパフォーマンス上の理由によるものです。ポストプロセシングエフェクトが行われない場合、トーンマッピングは存在せず強度の切り捨てが発生します。このような状況では、シーンは HDR がサポートされていないバックバッファーに直接レンダリングされます。
HDR モードでは、ライティングバッファーも浮動小数点バッファーとして割り当てられます。 これにより、、ライティングバッファー内の縞模様が減少します。ポストプロセシングエフェクトが行われない場合でも、HDR はデファードレンダリングでサポートされます。
The ImageEffectTransformsToLDR attribute can be added to a post-processing effect script to indicate that the target buffer should be in LDR instead of HDR. Essentially, this means that a script can automatically convert to LDR after applying its HDR post-processing effect. See Writing Custom Effects in the Post Processing package for more details.
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.