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
- 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.
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.
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.