Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Shading glitch after migrating to LWRP and Shader Graph

Discussion in 'Shader Graph' started by adamwilks, Jul 30, 2019.

  1. adamwilks

    adamwilks

    Joined:
    Apr 3, 2017
    Posts:
    23
    Yesterday I decided to port a small project over to LWRP so that I could try out shader graph as it seemed potentially beneficial for someone like myself with very little shader experience. After doing so however I am experiencing a glitch with just one of the graphs and could really use some advice as I am not even sure what search terms to throw at Google.

    Most of my shaders are currently using vertex color information from the mesh to shade surfaces and work well except for one which is supposed to render a semi-transparent colored grid. The problem is that it has this great big stripe across the output which roams around the surface as the camera moves / zooms.

    The only clue I have is that it appears to be specifically related to the texture because if I detach the sampler and just render vertex colors the glitch goes away entirely. I have attached some example screenshots of it in action with the alpha channel disconnected in the graph to make it easier to see. Also attached a screenshot of the graph.

    I'm still pretty new to game dev in general, so any advice appreciated.

    Unity version 2019.1.12f1
    LWRP version 5.7.2
     

    Attached Files:

    Last edited: Jul 30, 2019
  2. adamwilks

    adamwilks

    Joined:
    Apr 3, 2017
    Posts:
    23
    So I just tried throwing away my shader and mesh, and instead created just an ordinary plane and material using the built in LWRP Lit shader with my square grid texture set to tile... and I appear to get the same artefact.

    Is this going to be something to do with the general LWRP quality settings or am I just doing something silly? (which feels more likely)
     

    Attached Files:

  3. adamwilks

    adamwilks

    Joined:
    Apr 3, 2017
    Posts:
    23
    After some experimentation I went into Project Settings > Quality clicked the little config icon in the top right and hit Reset to restore the current editor defaults. This seems to have fixed the issue but I'm not sure which setting was responsible.