Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit3bb1da2647

README.md

sceneDistance

zero_scene_metres(uv, depth) -> f32 — a scene-depth sample as distance in metres from the camera drawing the current render.

A material is shared by every view at once: the live viewport, offscreen captures, render-to-texture cameras. Each renders with its own camera, and each binds the engine uniform block carrying THAT camera's inverse view-projection and position. This helper decodes a depth sample against those, so a depth-measuring material reads correctly in every view — where a decode parameterised on one camera's near/far planes reads correctly in one view and lies in the rest.

Material shaders only; a post-process or compute pass does not bind the engine uniform block this reads.