Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Engine: add support for non float vertex buffers in native #15107

Merged
merged 10 commits into from
May 21, 2024

Conversation

Popov72
Copy link
Contributor

@Popov72 Popov72 commented May 15, 2024

Let's hope it works in Native!

Note that the support has been added to WebGL2 (as it's what Native uses under the hood), but it is disabled for WebGL2 in Babylon.js because ANGLE is already doing the job

To reduce the footprint of thinEngine, the changes are only specific to Native and WebGPU. I had to create/update a number of things in the native engine without being able to test them... So don't be surprised if the tests fail!

@bjsplat
Copy link
Collaborator

bjsplat commented May 15, 2024

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
Copy link
Collaborator

bjsplat commented May 15, 2024

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
Copy link
Collaborator

bjsplat commented May 15, 2024

@bjsplat
Copy link
Collaborator

bjsplat commented May 15, 2024

@bjsplat
Copy link
Collaborator

bjsplat commented May 15, 2024

Visualization tests for WebGPU (Experimental)
Important - these might fail sporadically. This is an optional test.

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15107/merge/testResults/webgpuplaywright/index.html

@bjsplat
Copy link
Collaborator

bjsplat commented May 15, 2024

Visualization tests for WebGPU (Experimental)
Important - these might fail sporadically. This is an optional test.

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15107/merge/testResults/webgpuplaywright/index.html

@sebavan sebavan marked this pull request as draft May 15, 2024 20:17
@Popov72 Popov72 marked this pull request as ready for review May 15, 2024 21:35
@bjsplat
Copy link
Collaborator

bjsplat commented May 15, 2024

Visualization tests for WebGPU (Experimental)
Important - these might fail sporadically. This is an optional test.

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15107/merge/testResults/webgpuplaywright/index.html

@bghgary
Copy link
Contributor

bghgary commented May 16, 2024

I will test this in native, but it will be a bit before I do. Can we mark as draft until then?

@Popov72 Popov72 marked this pull request as draft May 16, 2024 16:27
@bghgary
Copy link
Contributor

bghgary commented May 21, 2024

I got everything working on Windows. Need to check macOS and iOS next.

@bghgary bghgary marked this pull request as ready for review May 21, 2024 17:25
@bghgary bghgary merged commit 0ea7a5b into BabylonJS:master May 21, 2024
11 checks passed
bghgary added a commit to BabylonJS/BabylonNative that referenced this pull request May 22, 2024
… buffers (#1382)

This is a replacement for #1376. The original thinking was that we will
promote the non-float attributes to float which was a complex and poor
performance solution. The better solution is to change the shader to
take non-float attributes. Fortunately, this shader processing is
already happening for WebGPU on the JS side. @Popov72 [factored out the
shader processor](BabylonJS/Babylon.js#15107) on
the JS side for WebGPU to also work with Babylon Native, which also
includes code that aligns the buffers to 4-byte boundaries. This native
PR ties everything together and removes all the promote to float logic
we had earlier to try to handle non-float attributes.

This change includes updating Babylon.js to 7.7.2. Using an older
version will result in a `console.error ` if non-normalized, non-float
vertex buffers are used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants