So there is this really simple setup to just read the distance field and write it to Emissive colour.
No custom node
What I would like to do is acces this same information inside of a custom node.
float3 GlobalUV = ComputeGlobalUV(WorldPosition, 0); float DistanceToSurface = 0; DistanceToSurface = Texture3DSampleLevel(GlobalDistanceFieldTexture0, SharedGlobalDistanceFieldSampler0, GlobalUV, 0).x; return DistanceToSurface;
This works, but only partially.
The results show up in preview viewports, and in the global distance field, and mesh distance field visualisation modes, but not in the main viewport.
SDF Visualisation mode
If anyone has any ideas, that would be super appreciated.