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

Fix undeclared identifier error in NodeMaterial shader #14484

Merged
merged 1 commit into from Nov 1, 2023

Conversation

Starryi
Copy link
Contributor

@Starryi Starryi commented Nov 1, 2023

this playground can reproduce the bug
the crash info as follow
截屏2023-11-01 21 00 29

in this commit, vPositionW is removed from shadowsFragmentFunctions.fx and used by lightFragment.fx
But PBRMetallicRoughnessBlock still only replaces 'vPositionW' in shadowsFragmentFunctions.fx.

So, if a mesh use nodematerial using PBRBlock and receiveShadows, the final shader code will have 'vPositionW' , then
the error reported.

@bjsplat
Copy link
Collaborator

bjsplat commented Nov 1, 2023

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 Nov 1, 2023

Copy link
Contributor

@Popov72 Popov72 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@bjsplat
Copy link
Collaborator

bjsplat commented Nov 1, 2023

Visualization tests for webgl1 have failed. If some tests failed because the snapshots do not match, the report can be found at

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

If tests were successful afterwards, this report might not be available anymore.

@bjsplat
Copy link
Collaborator

bjsplat commented Nov 1, 2023

Visualization tests for webgl2 have failed. If some tests failed because the snapshots do not match, the report can be found at

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

If tests were successful afterwards, this report might not be available anymore.

@bjsplat
Copy link
Collaborator

bjsplat commented Nov 1, 2023

Visualization tests for webgl1 have failed. If some tests failed because the snapshots do not match, the report can be found at

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

If tests were successful afterwards, this report might not be available anymore.

@bjsplat
Copy link
Collaborator

bjsplat commented Nov 1, 2023

Visualization tests for webgl2 have failed. If some tests failed because the snapshots do not match, the report can be found at

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

If tests were successful afterwards, this report might not be available anymore.

@sebavan
Copy link
Member

sebavan commented Nov 1, 2023

@Starryi this breaks quite the automated tests. It looks good but there are probably some unhandled cases there.

@Starryi
Copy link
Contributor Author

Starryi commented Nov 1, 2023

because lightBlock.ts also be fix, i think the commit message and pr title should also be updated

@Starryi Starryi changed the title fix undeclared identifier error in pbrMetallicRoughnessBlock Fix undeclared identifier error in NodeMaterial shader Nov 1, 2023
@sebavan sebavan merged commit daece25 into BabylonJS:master Nov 1, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants