0

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.

tsogzark
  • 5
  • 2

1 Answers1

0

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.

mateeeeeee
  • 885
  • 1
  • 6
  • 15
  • There is no brackets in the buffer contents tab (renderdoc version 1.25).But there is a big window named "Format" at bottom left of the tab and a window titled "Saved formats" at the bottom right.I write the struct in the format window and then save it as "xxx" and double click "xxx". Finally the buffer display in float. Thanks for your reminding. – tsogzark Mar 09 '23 at 09:28
  • @tsogzark yes, for buffers in general there is no brackets icon, it's how you said. Just fyi, you dont have to save it, you can just press apply in the lower part of that window afaik – mateeeeeee Mar 09 '23 at 11:47