Babylon.js icon indicating copy to clipboard operation
Babylon.js copied to clipboard

Add option for HalfFloat in vertexAnimationBaker's textureFromBakedVertexData

Open knervous opened this issue 5 months ago • 15 comments

For devices that support it and animations whose precision is not affected by the precision of float16, using HalfFloat can cut down memory usage by 50%. Currently have a warning when the engine caps don't include HalfFloat - don't know if might make sense to return null instead since whatever happens down the line will not be supported, likely crazy polygon soup from the VAT shader.

knervous avatar Jun 13 '25 04:06 knervous

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). To prevent this PR from going to the changelog marked it with the "skip changelog" label.

bjsplat avatar Jun 13 '25 04:06 bjsplat

Snapshot stored with reference name: refs/pull/16750/merge

Test environment: https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/16750/merge/index.html

To test a playground add it to the URL, for example:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/16750/merge/index.html#WGZLGJ#4600

Links to test babylon tools with this snapshot:

https://playground.babylonjs.com/?snapshot=refs/pull/16750/merge https://sandbox.babylonjs.com/?snapshot=refs/pull/16750/merge https://gui.babylonjs.com/?snapshot=refs/pull/16750/merge https://nme.babylonjs.com/?snapshot=refs/pull/16750/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/16750/merge#BCU1XR#0

bjsplat avatar Jun 13 '25 04:06 bjsplat

WebGL2 visualization test reporter:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/16750/merge/testResults/webgl2playwright/index.html

bjsplat avatar Jun 13 '25 04:06 bjsplat

Visualization tests for WebGPU

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/16750/merge/testResults/webgpuplaywright/index.html

bjsplat avatar Jun 13 '25 04:06 bjsplat

@knervous I think you need to merge back master in for the half float changes :-)

sebavan avatar Jun 13 '25 20:06 sebavan

WebGL2 visualization test reporter:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/16750/merge/testResults/webgl2playwright/index.html

bjsplat avatar Jun 14 '25 05:06 bjsplat

Visualization tests for WebGPU

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/16750/merge/testResults/webgpuplaywright/index.html

bjsplat avatar Jun 14 '25 05:06 bjsplat

@knervous I think you need to merge back master in for the half float changes :-)

Ah that was from my other PR, merged in master now! Looks like CI is failing I will check this out soon and get things fixed up

knervous avatar Jun 14 '25 11:06 knervous

Visualization tests for WebGPU

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/16750/merge/testResults/webgpuplaywright/index.html

bjsplat avatar Jun 14 '25 14:06 bjsplat

WebGL2 visualization test reporter:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/16750/merge/testResults/webgl2playwright/index.html

bjsplat avatar Jun 14 '25 14:06 bjsplat

WebGL2 visualization test reporter:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/16750/merge/testResults/webgl2playwright/index.html

bjsplat avatar Jun 14 '25 19:06 bjsplat

Visualization tests for WebGPU

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/16750/merge/testResults/webgpuplaywright/index.html

bjsplat avatar Jun 14 '25 20:06 bjsplat

Visualization tests for WebGPU

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/16750/merge/testResults/webgpuplaywright/index.html

bjsplat avatar Jun 15 '25 10:06 bjsplat

WebGL2 visualization test reporter:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/16750/merge/testResults/webgl2playwright/index.html

bjsplat avatar Jun 15 '25 10:06 bjsplat

It is great like that!

Had to fix imports for es6 but looks like builds are passing--plan to update VAT docs with this as part of the PG as well once it's through :)

knervous avatar Jun 15 '25 12:06 knervous