solve Unity3d Scene Color not work in HDRP/URP

solve Unity3d Scene Color not work in HDRP/URP

HDRP

To make Scene Color work in HDRP,
First you will need to make sure the Edit > Project Settings > HDRP Default Settings >..
make sure Opaque Objects & Transparent Objects are checked..

and then, create your new HDRP > Shader > Unlit Shader Graph

Create new Unlit Shader Graph
  • in order to access camera data, you’ll need to change Surface Type intto “Transparent
  • Add Scene Color and add it to Fragment Base Color, PS: “Scene Color” equal to “_CameraOpaqueTexture” in the old day.

in general this is how you did it in Shader, but in HDRP you will saw the following result.
the mesh which contain the material you just did will become extremely bright.

extremely bright object in the scene

For some reason it become a super white object, and the booming make it extremely bright.
to fix this we need to…

  • Use a “Exposure” node and Multiply with “Scene Color”

So as you can see with the simple setup like this will able to access the camera information and display you our objects.
another option for this is “HD Scene color” but you will need to toggle on the “Exposure” option. it dose the same as above graph.

URP

In URP the setup to make things work are different.
your will need to enable “Opaque Texture” in your pipe line.

  • go to EDIT > Project Settings > Quality > Rendering click on the reference to locate your URP setting.
  • in this cases High, Medium, Low
  • Find them and toggle on the “Opaque Texture” in the inspector.

One more thing to go.
The camera in your scene also require to toggle on “Opaque Texture” option, or “Use Pipeline Settings” – depend on above step.

at this moment if we create a scene color in shader graph you may notice the following issue.

It’s because Surface Type set to “Transparent”, and in case you needed, “Two Sided” can also be selected.

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

*

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料