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

Improve shader preprocessor whitespace handling #4249

Merged
merged 1 commit into from
May 16, 2022

Conversation

slimbuck
Copy link
Member

@slimbuck slimbuck commented May 16, 2022

The shader preprocessor fails sometimes depending on whitespace, presumably due to catastrophic back tracking.

Removing the whitespace capture group from the KEYWORD regex seems to fix the issue.

This PR also changes regexes to accept tabs as whitespace.

@slimbuck slimbuck added bug area: graphics Graphics related issue labels May 16, 2022
@slimbuck slimbuck requested a review from a team May 16, 2022 12:22
@slimbuck slimbuck self-assigned this May 16, 2022
Copy link
Contributor

@mvaligursky mvaligursky left a comment

Choose a reason for hiding this comment

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

looks great, thanks!

@slimbuck slimbuck merged commit 1d0a1d9 into playcanvas:main May 16, 2022
@slimbuck slimbuck deleted the preprocessor-update branch May 16, 2022 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants