Skip to content

WebGPURenderer: updateRanges are ignored when using instancing. #31814

@AndreyPrakhov

Description

@AndreyPrakhov

Description

When using WebGPURenderer({ forceWebGL: true }), partial buffer updates via InstancedBufferAttribute.updateRanges appear to be ignored. Calling attribute.clearUpdateRanges(); attribute.addUpdateRange(start, count); attribute.needsUpdate = true; results in the entire attribute buffer being re-uploaded each frame, instead of the specified range (this is true for both backends)

Reproduction steps

In the test example, the buffer is partially updated with a specified range (this can be toggled in the constants above). However, when checking the profiler, it becomes clear that even with the minimal value, the write time does not decrease.

Code

attr.clearUpdateRanges();                  
attr.addUpdateRange(floatOffset, floats);  
attr.needsUpdate = true;   

Maybe I am doing something wrong?

Live example

https://jsfiddle.net/1krcs5fh/3/

Screenshots

Image

Version

r179.1

Device

Desktop

Browser

Chrome

OS

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions