QuentinKing / OuterWildsBlackHole

Remake of the black hole shader from Outer Wild's Brittle Hollow planet
GNU General Public License v3.0
14 stars 2 forks source link

Not working in Unity 2022.3.11f1 #1

Closed tylerlov closed 9 months ago

tylerlov commented 10 months ago

Tried this in 2022 LTS and though no errors are flagged, nothing happens. Sphere is invisible and changing properties on the shader has no effect.

There are new 2022.3.* versions at the time of this issue but changes should not affect this outcome. Seems to be a 2022.3 issue.

QuentinKing commented 9 months ago

Yeah, it's cause of URP changes which makes the shader incompatible. Just as a note, I am probably not going to maintain this repo with new versions of Unity, mainly just wanted to get it out there as a reference if anyone was curious.

But I'll describe how to fix the shader if you're interested! You basically just need to go to the Assets/Shaders/SG_BlackHole.shadergraph asset and view the generated shader. This is the shadergraph I build up throughout the video. Copy and paste that text into the Assets/Shaders/S_BlackHole.shader file which is the one that the mesh in the scene is actually using. In that shader you need to change the lightmode of the Universal Forward pass to "UseColorTexture", it should look something like this:

Name "Universal Forward"
Tags
{
    "LightMode" = "UseColorTexture"
}

It's annoying but because I'm using that grab pass renderer feature you need to change the lightmode which I don't think was possible in the Unity version I was using.