KhronosGroup / Vulkan-Guide

One stop shop for getting started with the Vulkan API
Creative Commons Attribution 4.0 International
1.89k stars 164 forks source link

Using Vulkan > Vertex Input Data Processing > Component Assignment references missing portion of spec #272

Open ixchow opened 1 week ago

ixchow commented 1 week ago

In the section https://docs.vulkan.org/guide/latest/vertex_input_data_processing.html#_filling_in_components , the text quotes the specification as follows:

For the opposite case, the spec says:

If the format does not include G, B, or A components, then those are filled with (0,0,1) as needed (using either 1.0f or integer 1 based on the format) for attributes that are not 64-bit data types.

The quoted text does not appear in the specification, as far as I can tell. (Doing a google search for "format does not include G" with an "inurl:https://docs.vulkan.org/" restriction actually only returns the guide page; nothing from the spec at all!)


The correct reference is, unfortunately, a bit more cumbersome:

https://docs.vulkan.org/spec/latest/chapters/fxvertex.html#fxvertex-input-extraction says:

Attributes that are not 64-bit data types are expanded to four components in the same way as described in conversion to RGBA.

And the conversion to RGBA section uses a table to define the expansion.

I suggest that the guide might use similar language and then paraphrase the table to remain self-contained.

spencer-lunarg commented 1 week ago

moved over to a Vulkan-Guide issue, that quote is outdated (think VK_EXT_legacy_vertex_attributes and some other changes moved it around)

I will update the spec text, the diagram is still correct as the A format get 1 and the other will get 0