Repository navigation
Conversation
…linear velocity prepass
TAARenderingPipeline requests PREPASS_VELOCITY_LINEAR, and instancesDeclaration declares previousWorld0..3 for it, but
PrepareAttributesForInstances only pushed those attributes for PREPASS_VELOCITY. With reprojectHistory, every instanced
mesh then made the velocity prepass pipeline invalid on WebGPU ("Vertex attribute slot ... is not present in the
VertexState", the frame is dropped) and got a wrong velocity on WebGL2. GeometryBufferRenderer already checks both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Popov72
left a comment
There was a problem hiding this comment.
Approve
Completed a full current-PR skeptical review. The shared instance-attribute helper now matches the existing GLSL/WGSL linear-velocity declarations, with focused hardware/thin-instance and legacy/no-velocity coverage. No actionable findings. This is a read-only code-review assessment, not a claim that tests or browser measurements were independently rerun.
|
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
|
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/19024/merge/index.html#WGZLGJ#4600 Links to test your changes to core in the published versions of the Babylon tools (does not contain changes you made to the tools themselves): https://playground.babylonjs.com/?snapshot=refs/pull/19024/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/19024/merge#BCU1XR#0 If you made changes to the sandbox or playground in this PR, additional comments will be generated soon containing links to the dev versions of those tools. |
Fixes #19023. Forum: 64212 #23-#25.
PrepareAttributesForInstancesnow requestspreviousWorld0..3forPREPASS_VELOCITY_LINEARas it already does forPREPASS_VELOCITY, which is whatinstancesDeclarationdeclares and whatGeometryBufferRendereralready does. Without it, TAA withreprojectHistoryrenders nothing on WebGPU as soon as a mesh is drawn with instances (the vertex state misses those attributes).Tests.
materialHelper.functions.test.tschecks the attribute list for hardware instances and thin instances withPREPASS_VELOCITY_LINEAR, withPREPASS_VELOCITY, and without a velocity prepass (world matrices only).Real velocity check (9.31.1, then 9.31.1 with this change; Chromium 147, RTX 3080 Laptop GPU, WebGPU). 25 boxes move every frame under an orbiting camera, drawn as regular meshes (reference), thin instances (with a
previousMatrixbuffer) andcreateInstance(). After 60 fixed frames the linear velocity target is read back and compared with the regular meshes, pixel by pixel:createInstance()With this change both instanced variants write exactly the velocities of the regular meshes, pixel by pixel (all 29,635 covered pixels move).
materialHelper.functions.test.tspasses, 21/21.🤖 Generated with Claude Code