Download

Distance To Nearest Surface flickers

Hi
I am triying to figure out what cause this issue with Distance To Nearest Surface node
This issue occurs very randomly, sometimes it can be seen from far away but it also happens up close too

Here is material
d8fed2058e783a84054f71e179d2ca83807d3e6e.jpeg

You’ll likely want to clamp that value or do something that does an approximation vs taking the raw calculation.

Using a power of 5 on an HDR value could be the culprit. Could be essentially going out of range and creating a NaN.

I concur with the previous poster. Try getting the value into the 0-1 range and clamping before the power.

Thanks for the coment, I`ve tried what you suggested, but issue is still there
48f1dac8949bf652717d2d0fa73dc7f1df5546b2.jpeg

For some reasone this issue ocurrs only in Play mode

I’m experiencing this issue as well - using distance to nearest surface for custom AO, and I see the flickering in Play mode, but not in editor. Does anyone have more insight on this?