Home > OS >  Unity3d - Create Skybox Material with Shader graph
Unity3d - Create Skybox Material with Shader graph

Time:01-26

i created a material with shadergraph and want to assign it as skybox material. Now i got the problem, that, if i assign it to the environment -> skybox material in the light settings, it is assigned to one side of a cubical skybox (light gray color in the picture). Iam not sure why and how to change it to a spherical skybox, so that youre basically surrounded by the skybox material (as expected).

Is this a Unity3d setting or a problem with the material itself? I could not figure out how to fix this problem.

enter image description here

CodePudding user response:

Update: Allright, after playing around, i created a new shader graph (Lit shader graph - before it was a unlit shader graph), which is necessary for skybox materials with the exact same nodes i copied from my other SG.

The weird fact: of course it woun't work, if you let the lit setting inside the graph inspector active, but i changed it to unlit.

The result: It worked! Weird. Seems to be a shader graph thing.

The skybox is now a total procedural gradient material i wanted.

enter image description here

Cheers!

CodePudding user response:

I just ran in to this myself. Was able to narrow it down to the "Cast Shadows" toggle in the Graph Inspector. My Unlit shader graph wouldn't work as a skybox unless "Cast Shadows" was turned on... Even though I definitely don't want it casting shadows.

And following your steps in creating a new lit shadergraph then turning it unlit, it will stop working if "Cast Shadows" is turned off. Odd.

  • Related