Search code examples
vulkanrenderdoc

Is there any way to display buffer contents in float by renderdoc?


I am learning vulkan and I passed a ubo to shader. When I look over the buffer contents of that ubo by renderdoc, I get the contents in hexadecimal. hexadecimal image. This is the ubo.

layout(binding=0) uniform Ubo
{
    vec4 color;
    mat4 scale;
} ubo;

Is there any way to display buffer contents in float?

I have checked almost every option of renderdoc and searched the answer by google and AI but no solution. I wonder if there is an option I ignored or any other way to solve this problem.

Sorry for poor english.


Solution

  • You can specify the custom format for a constant buffer. Its icon is two curly brackets (like this: {}).

    enter image description here

    You will get a window where you can write your custom format. In your case you would write unbounded float array like this:

    struct Ubo
    {
        float arr[];
    };
    

    Note you have the same custom format specifier for other types of buffers, not just constant ones.