英文:
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.
英文:
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.
答案1
得分: 0
你可以指定常量缓冲区的自定义格式。它的图标是两个花括号(像这样:{}
)。
您将获得一个窗口,可以在其中编写您的自定义格式。在您的情况下,您可以编写无限制的浮点数组,如下所示:
struct Ubo
{
float arr[];
};
请注意,您可以对其他类型的缓冲区使用相同的自定义格式说明符。
英文:
You can specify the custom format for a constant buffer. Its icon is two curly brackets (like this: {}
).
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论