No announcement yet.

Scene colour UV and World Displacement artifacts

  • Filter
  • Time
  • Show
Clear All
new posts

    Scene colour UV and World Displacement artifacts

    Hi people!

    I've been working on an ocean shader recently and I'm happy with the results so far except I'm getting a couple of artifacts that I'm wondering if anyone can help resolve.

    I'm using a lerp between scene colour and ocean colour to simulate opacity, and distorting the scene UV's to simulate refraction. This works great except I'm getting a fringe around submerged objects between the depth test and the distorted scene UV's (see 1st screenshot). I understand why this is occurring I'm just not sure how to work around it.
    Click image for larger version

Name:	Ocean_2.jpg
Views:	156
Size:	509.2 KB
ID:	1652397
    My second issue is that World Displacement is pushing off-screen non-tessellated faces into view, causing a seam close to the camera between the tessellated and non-tessellated faces (see 2nd screenshot). Playing with the tessellation multiplier and a camera distance solution doesn't seem to fix this, I thought I could fix it by forcing faces close to the camera to always be tessellated, or just try forcing max tessellation all the time to see if that would work. However I think this goes a bit deeper than that, as I imagine the faces out of view will not be considered for tessellation at all.
    Click image for larger version

Name:	Ocean_1.jpg
Views:	112
Size:	502.7 KB
ID:	1652398
    Any help with this will be much appreciated!

    This screenshot better illustrates the tessellation issue.
    Click image for larger version

Name:	Ocean_3.jpg
Views:	110
Size:	534.4 KB
ID:	1652406


      Regarding first issue, the solution is simple. Do not use refraction. Or at least do not try to drive it with depth fade.
      As for the second, you can use adaptive tess with max displacement. Setting max displacement right will ensure sufficient margin and no faces would disappear from view.


        Thank you Deathrey for pointing out the max displacement! this fixed the tessellation issue.

        The fringing was actually a simple fix as well, I just needed to distort the SceneDepth UV's as well as the SceneColor UV's to make sure they match up. A silly oversight on my part!

        Click image for larger version

Name:	Ocean4.jpg
Views:	116
Size:	491.5 KB
ID:	1652969