For a vision research experiment, I have a monitor that supports 10bit/channel (=30bit color). I want to render a triangle mesh in a simple scene that uses the full bit depth, and I want to save this rendering as a .png file. The rendering is just for single, static images, and doesn't need to happen lightning fast.

For the triangle mesh, I have:

  • List of vertices in xyz coordinates
  • List of triangles containing the indices of the vertices
  • List of the vertex normals
  • List of the triangle/face normals

My hardware includes (possibly irrelevant)

  • Dell UP3218K monitor - 8k and 10bits/channel
  • GeForce RTX 2080 Super (but can get a better one if needed)

I tried using the pyrender library, but it outputs the rendered scene as uint8 (limiting it to 8bit).

I can't find any code examples of OpenGL or PyOpenGL rendering meshes at 10bits or higher. With the increasing popularity of >8bit monitors, surely this is possible?

What can I use to render a mesh at 10 bit/channel depth?

  • 2
    $\begingroup$ This should work when using a framebuffer object (FBO) and put a texture and depthbuffer with the desired channel depth in it. You can also use RGB32f. $\endgroup$
    – Thomas
    Feb 22, 2021 at 22:37
  • $\begingroup$ You need to make sure your system is set up properly to support 10bit graphics. Check your driver to make certain that 10bit hdr support is enabled. Check windows to make certain support is enabled and available. Then, to use 10bit color in openg gl, the wgl context needs to be created that supports either RGB30, or RGB30A2 formats. Once you have the context, you can start rendering in your desired framebuffer format. Here is a link to a discussion about creating a wgl context but it is a bit dated:community.khronos.org/t/10-bit-rendering/74816/2 $\endgroup$
    – pmw1234
    Feb 23, 2021 at 3:30


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.