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

Update programlib #4363

Merged
merged 5 commits into from
Jun 23, 2022
Merged

Update programlib #4363

merged 5 commits into from
Jun 23, 2022

Conversation

slimbuck
Copy link
Member

This PR:

@slimbuck slimbuck added bug area: graphics Graphics related issue labels Jun 23, 2022
@slimbuck slimbuck requested a review from a team June 23, 2022 10:09
@slimbuck slimbuck self-assigned this Jun 23, 2022
@mvaligursky
Copy link
Contributor

I think a first step we should take is consider moving /program-lib folder outside of the graphics. It this it should standalone, one level up from graphics, on the same level as the /scene. Currently it is in graphics, but uses many constants and even few modules the scene. And consider how this works out after that. I'm not convinced the GraphicsDevice should own the builders library. Graphics device should be a user of generated shaders, but don't be part of the generation itself.

@slimbuck
Copy link
Member Author

I think a first step we should take is consider moving /program-lib folder outside of the graphics. It this it should standalone, one level up from graphics, on the same level as the /scene. Currently it is in graphics, but uses many constants and even few modules the scene. And consider how this works out after that. I'm not convinced the GraphicsDevice should own the builders library. Graphics device should be a user of generated shaders, but don't be part of the generation itself.

Yep totally agree. Also Device owns ProgramLibrary and ProgramLibrary keeps device :(

What this PR is doing is -not- registering random shader chunks as programs (by not using programlib for this) without potentially breaking existing projects.

@slimbuck slimbuck merged commit 6677ae0 into playcanvas:main Jun 23, 2022
@slimbuck slimbuck deleted the program-lib-fix-v2 branch June 23, 2022 11:44
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