Hello everyone,
As depth renderer is binding with the scene camera, the depthmap texture retrieved using getDepthMap
is dynamic, I want to save the depthmap from depth renderer at some moments to a Texture. I am now coding like below to implement this:
// at some moment
var depth_arr = await depth_renderer.getDepthMap().readPixels(); // a float32 array
var depth_texture = RawTexture.CreateRTexture(depth_arr, 1920, 1080, this.scene, false, false, Texture.BILINEAR_SAMPLINGMODE, Engine.TEXTURETYPE_FLOAT);
the depth_texture constructed by CreateRTexture is strange:
Is there something wrong with my code?
Thanks for your help in advance!