Search Unity

[SOLVED] Issues with custom Terrain Shader created from Toony Colors Pro as Base

Discussion in 'Shaders' started by RighteousWeasel, Jun 20, 2019.

  1. RighteousWeasel

    RighteousWeasel

    Joined:
    Sep 7, 2013
    Posts:
    30
    [EDIT]
    I solved the issue, had to re-write the Specular Pass shader.
    -----

    Hey all!
    I'm having a rendering bug on my "toon terrain shader" that I created using 'Toony Colors Pro' as a base shader. It's been a long time since I've done shader programming so I figured I would start with a base and just convert it from there.
    https://assetstore.unity.com/packages/vfx/shaders/toony-colors-pro-2-8105

    [NOTE! I purposefully do not want an outline]
    It actually works beautifully, when rendering properly. But there's this odd issue where I get pitch black on some extreme geometric angles... The kicker is if I CLICK OFF OF OFF THE EDITOR, then click back in, the issue GOES AWAY....... the problem persists in Builds though... so I'm not sure if it's a Unity issue or a shader issue.

    Pics below show:

    A: Before clicking OUT of Unity Editor.
    screenshot_2.png
    B: After clicking OUT of Unity, then back in. screenshot_3.png

    You can even see way in the background of the first image, there's some pitch-black mountains.

    I've attached my own Shader for the terrain. I know it doesn't show the whole picture, but maybe one of you knows a popular problem that I don't. It seems to be an issue with specularity.

    Thanks in advance.
     

    Attached Files:

    Last edited: Jun 21, 2019