-
'[...dataA,...dataB,...dataC]' would like to deliver the attribute values of 'instanceA', 'instanceB', and 'instanceC' offset, strade. In the case of v8.5.20 version, the value was possible through 'accessor'. https://github.com/visgl/luma.gl/blob/v8.5.20/modules/webgl/src/classes/vertex-array.js#L334-L336 However, as it was changed to 9.0.0 version, the model changed to request to pipeline. https://github.com/visgl/luma.gl/blob/v9.0.0-alpha.21/modules/engine/src/lib/model.ts#L131-L135 However, the 'setAttribute' method in the pipeline sets the value based on the buffer type variable provided without referencing or verifying the accessor value in the buffer provided, and sets the offset value to the default value of 0. How can I pass the offset value to pipeline to vertex array object? Is it right for the user to access the pipeline directly and set up a buffer to use it? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@Seungup If I understand your question correctly, it is about how to specify an offset into the buffer when using it as an attribute. It is true that the Accessor concept is being removed in v9. The main motivation for this change is that WebGPU does not have the same flexibility as WebGL (where attribute parameters can be specified after pipeline creation) and since luma.gl 9.0 API is intended to support both APIs it must observe this limitation, and the accessor concept basically became superfluous. There is a new type Also there is a Note to self: |
Beta Was this translation helpful? Give feedback.
@Seungup If I understand your question correctly, it is about how to specify an offset into the buffer when using it as an attribute.
It is true that the Accessor concept is being removed in v9. The main motivation for this change is that WebGPU does not have the same flexibility as WebGL (where attribute parameters can be specified after pipeline creation) and since luma.gl 9.0 API is intended to support both APIs it must observe this limitation, and the accessor concept basically became superfluous.
There is a new type
ShaderLayout
that contains much of the information that was previously encoded in accessors. work in progress documentation here: https://github.com/visgl/luma.gl/blob/ma…