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. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

[Solved] Deferred projection decal and emission artifacts

Discussion in 'Shaders' started by xVergilx, Oct 15, 2018.

  1. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,292
    Short story, I'm trying to do a deferred projection decal with an emission, and it gets weird edge artifacts when camera is getting further away.

    The setup is basic cube for projection, and it seems like it gets self emission lit?

    Close up looks like this:
    noedge.PNG

    But when zoomed out:
    zoomedout.PNG

    You can clearly see edges on top / left side.

    When I enable cube gizmos, it seems like emission is litting top side of the cube, where shouldn't do it.
    gizmosenabled.PNG

    For the HDR effect, I'm using default Post Processing Stack v2. No LWRP / HDRP, default pipeline.
    Can't figure out why it happens though, or how to disable self emission.
     
  2. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    try to set your textures to clamp and not repeat. Could be mip maps sampling the bottom also.
     
    xVergilx likes this.
  3. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,292
    Wow, I really should get proper textures for testing. Thank you, that indeed was the case! :)