I expect to see a gradient from black to white, where things closer to the camera is darker and farther to the camera is whiter. But I actually only see all objects are black and the background is white, which means it only gives me 0 and 1 (tried with float x = fract(depth.r) and showing all black, meaning there’s no float in between).
I am using the new Edge and chrome.
In case other readers encounter the same thing, FYI:
The camera minZ, maxZ: Camera | Babylon.js Documentation (babylonjs.com)
They define the near and far clipping plane of the camera.
By default (the doc doesn’t say it, but I test it in the playground), minZ is 1, maxZ is 10000.
The depth buffer will map that to a r value of 0 to 1 (the g b a values are just 1).