Hi all,
I’ve been taking time today to learn about the shader graph, but I’m having trouble adding it to my GameObjects. They render as black, even though it seems that the material is attached.
Thanks for any help!
Hi all,
I’ve been taking time today to learn about the shader graph, but I’m having trouble adding it to my GameObjects. They render as black, even though it seems that the material is attached.
Thanks for any help!
Hi,
Create a new material, then select a shader for it, which is your shader graph you created. Then it should show up on the material. Apply the material to your object. That’s all that’s required. Try first with as simple graph as possilbe, just use only the Master node and change the diffuse/albedo color, save the shader asset (that top bar button), and see if the color changes on your object. Then you know that your shader is actually doing something.
Hi Olmi, thank you for your time, I appreciate it. I created a new shader and material, but unfortunately the Cube is still rendering as black :(. Do I need to add any extra lighting or render in a certain way?
EDIT: Started a new project and it’s working now (not sure why :p). Thank you again, your steps worked!
Perhaps your scene did not have HDRP Scene Root, but the “classic” scene root instead?
And when you created new HD project it created empty scene for you with HDRP root
If You made this using brackeys tutrorial. In shader graph make the color mode to default. Make color node as property. That worked for me
When using HDRP make sure you notice that the Emission output expects an HDR color, HDRP SG also has an emission node you can use to convert a regular LDR color into an emission color with exposure controls.
The shadergraph preview may show your emission but if your scene lights are at 100k lux, what you have in the graph there wouldn’t even register as a light source really.