#Issues with Shader Normals in URP

1 messages · Page 1 of 1 (latest)

bitter fable
#

I'm experimenting with a new Shader asset and ran into an issue. I started applying new shaders to a material for my environments, which have reversed normals so I can see inside, and it went all black so now I can't see inside from the scene view unless I move into the environment. The Inside renders fine, but it's just the outside invisible normals that are now all blacked out. I know this has something to do with the shader, but I'm not exactly sure what nor am I knowledgeable enough in Shaders to know what do to about it. I also looked for a Render Face option, but it doesn't look like there is a spot in the shader for it.

Is there a way I can modify the shader so that it doesn't render/black-out the reverse mesh faces?

main atlas
#

That really depends on the shader

#

Just a guess it's an inverted hull outline shader, which will not work on inside-out meshes because it relies on an additional inverted mesh
At least not without some clever workarounds

pure oracle
#

what is the shader meant to do?

bitter fable
pure oracle
#

since those walls are rendering inside out, when the inverse-hull toon shader is applied to it, that that front face is culled, and then that black mesh is visible -- its not meant to be used for models like this.

if you only need it for your interior meshes, id add the material to those objects, and leave the walls alone.
Since the walls are flat planes, you might as well just alter the texture so it has outlines.

pure oracle
#

this is what i think is happening. if the walls having outlines cant be done in texture -- you can make a copy of that inverse hull shader,, wherever it multiplies the mesh normals, turn that into a divide to make it go the other direction maybe.. at least thats the theory.. I can test this out later if this interests you

if this is something you really want to do I can test it out later. but itll likely only work on inverse hull objects like your walls. if your walls and interiors objects are sharing the same material it wont work.

bitter fable
# pure oracle this is what i think is happening. if the walls having outlines cant be done in ...

Hi, so thanks for responding. If you don't mind looking into that, I would love to see if anything comes of it. Right now I'm making a game prototype and am using pre-made assets and a Unity toon shader I bought which I'm using for early level design and shader testing.

I did make a discovery though. I know VERY little about Shader code, but I look through the shader's code with a friend who said it seemed to have something to potentially do with the outline, which you are also saying. He theorized that even if the Outline isn't enabled it might still be applied. I messed around and discovered that if I remove the _OutlineColor is removed or altered, the shader works it should, with me being able to see outside the model due to the reversed normals while the inside looks perfectly fine. However... Doing anything of the sort causes Unity to throw a mountain of errors and says that the shader can no longer compile. Not sure what to do about that.

#

If you don't mind, I can DM you the shader file I've been editing to look at. Don't want to share it publicly since it is a paid asset.

fair stream
#

one of which draws the outline