# is there any way to visualize float depthBuffer in VTK? copyToFrameBuffer seems cannot work.

**URL:** <https://discourse.vtk.org/t/is-there-any-way-to-visualize-float-depthbuffer-in-vtk-copytoframebuffer-seems-cannot-work/12192>\
**Category:** Support\
**Created:** [August 24, 2023, 2:14am UTC](https://discourse.vtk.org/t/is-there-any-way-to-visualize-float-depthbuffer-in-vtk-copytoframebuffer-seems-cannot-work/12192 "2023-08-24T02:14:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gpu](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/g/e47c2d/32.png) [@gpu](https://discourse.vtk.org/u/gpu)\
**Post date:** [August 24, 2023, 2:14am UTC](https://discourse.vtk.org/t/is-there-any-way-to-visualize-float-depthbuffer-in-vtk-copytoframebuffer-seems-cannot-work/12192/1 "2023-08-24T02:14:03Z")

</div>

is there any way to visualize float depthBuffer in VTK, copyToFrameBuffer seems cannot work.  
Thanks!

---

<div class="post-metadata">

**Author:** ![jaswantp](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jaswantp/32/10046_2.png) [@jaswantp](https://discourse.vtk.org/u/jaswantp)\
**Post date:** [August 26, 2023, 3:43pm UTC](https://discourse.vtk.org/t/is-there-any-way-to-visualize-float-depthbuffer-in-vtk-copytoframebuffer-seems-cannot-work/12192/2 "2023-08-26T15:43:31Z")

</div>

If you’re simply debugging, it’s not worth the trouble to capture the depth buffer via code. It can be error-prone and incorrect sometimes because of invalid formats and blit parameters.

The most simple method without writing any extra code in your application is to launch the application through Renderdoc and take a capture. You can visualize depth attachment in the FB output. See [Quick Start — RenderDoc documentation](https://renderdoc.org/docs/getting_started/quick_start.html#) for taking captures of graphics applications.

Ex - FBO color and depth attachments visualized for a cone.

 ![image](https://discourse.vtk.org/uploads/default/original/2X/a/a46f83ae7bcecf0b3a83926d503b73b8f67831e4.png)

---

<div class="post-metadata">

**Author:** ![gpu](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/g/e47c2d/32.png) [@gpu](https://discourse.vtk.org/u/gpu)\
**Post date:** [August 27, 2023, 2:25am UTC](https://discourse.vtk.org/t/is-there-any-way-to-visualize-float-depthbuffer-in-vtk-copytoframebuffer-seems-cannot-work/12192/3 "2023-08-27T02:25:10Z")

</div>

thanks! beside renderDoc. while doing this by ourselves, seems must write custom shader to visualize it.  
Thanks
