No announcement yet.

DistanceToNearestSurface "snaps" brighter if camera is near

  • Filter
  • Time
  • Show
Clear All
new posts

    DistanceToNearestSurface "snaps" brighter if camera is near

    Hey there, I'm using the DistanceToNearestSurface for a material, but I encounter a weird problem. To show this, I hooked the distance field up directly to Base Color (my material is translucent, Opacity is not set here).

    How it should look (camera is more far away):

    If I move my camera a bit more towards the plane:
    alt text

    There's no transition, it instantly "snaps" to the bright version. In my full material, I multiple the distance field with some masks to overlay a grid, but the grid is getting much brighter if the camera is close, which looks weird. Any ideas?

    Edit: I tried disabling my exponential height fog, and the problem seems gone. However, I need the fog

    Thank you!
    Last edited by iUltimateLP; 07-11-2018, 10:45 AM.
    Hobby game developer from Germany Follow me on Twitter!
    Stuff I made:
    Steam Workshop Tutorial/Wiki
    Making a full working translation for your game and change it at runtime