-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Add type to shader material constructor #14908
Conversation
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
One CI failure is from Babylon.js/packages/dev/core/src/Materials/shadowDepthWrapper.ts Lines 302 to 307 in c05e7f0
vertexToken is being used there, and I have no idea if that's intentional or if it's a bug.The property was undocumented. |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Yes, this is intentional, it's a way of uniquely identifying a vertex+fragment shader regardless of its defines list (normally, a vertex+fragment shader pair is uniquely defined by the defines list it uses). I think you can document it as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!
You will also have to update the WebGPUEngine.createEffect
method.
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
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://babylonsnapshots.z22.web.core.windows.net/refs/pull/14908/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/14908/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/14908/merge#BCU1XR#0 |
Visualization tests for WebGPU (Experimental) |
WebGL2 visualization test reporter: |
@Popov72 if vertexToken/fragmentToken are intended to be internal only, would it make sense to leave them out of |
Good idea @ryantrem! |
Good idea, I changed it to While I was at it, I noticed that the same sort of type could be added to the compute shaders. So I introduced a |
Visualization tests for WebGPU (Experimental) |
Fix https://forum.babylonjs.com/t/shadermaterial-constructor-type-safety/49030