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

Cache modelMaterialsCommon results #5157

Closed
lilleyse opened this issue Mar 27, 2017 · 2 comments
Closed

Cache modelMaterialsCommon results #5157

lilleyse opened this issue Mar 27, 2017 · 2 comments

Comments

@lilleyse
Copy link
Contributor

For #3241

@rahwang

Brought up on the forum: https://groups.google.com/forum/#!topic/cesium-dev/laA723va6gI

This applies to both Models and 3D Tiles. For models that use the khr_materials_common extension the same shader construction logic will occur every time.

Instead, the materials going through here can be stringified and act as keys to the generated gltf sections - techniques, shaders, and programs. I imagine gltf 2.0 will benefit from a similar strategy.

Most of the code changes will actually belong in https://github.com/AnalyticalGraphicsInc/gltf-pipeline since modelMaterialsCommon is built from there: https://github.com/AnalyticalGraphicsInc/gltf-pipeline#building-for-cesium-integration.

@pjcozzi
Copy link
Contributor

pjcozzi commented Mar 27, 2017

Are we sure this is worth it? I suspect it is not. The shaders will still be in the shader cache and this will be almost completely irrelevant and an extra thing to deal with when we add PBR for glTF 2.0 and potentially separate materials for sharing across many tiles in a future version of 3D Tiles.

@lilleyse
Copy link
Contributor Author

Ok, it may not be worth it in a glTF 2.0 world. Closing.

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

No branches or pull requests

2 participants