viewportSafeUV

Last modified: Feb 5, 2025

A special version of a screen uv function that involves a depth comparison when computing the final uvs. The function mitigates visual errors when using viewport texture nodes for refraction purposes. Without this function objects in front of a refractive surface might appear on the refractive surface which is incorrect.

ParameterTypeDefault Value
uvNode<vec2>

Returns

Node<vec2>