-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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 the option vertexShaderCommon to prepend the custom vertexshader … #12327
base: main
Are you sure you want to change the base?
Conversation
Thank you for the pull request, @mickae1! Welcome to the Cesium community! In order for us to review your PR, please complete the following steps:
Review Pull Request Guidelines to make sure your PR gets accepted quickly. |
…with the PolylineCommon.glsl file
I've made what is needed : sign the CLA & edit the file CONTRIBUTORS.md |
Hi @mickae1, thank you for the proposal! We'll review this shortly. |
Thanks for the PR @mickae1!
|
I checked of what you said, PolylineCommon is not that small, it's about 177 lines, which is tiresome to include in custom shader. Also it's boring, to go at the bottom of your custom shader to find the interesting part of your shader, because before there is 177 lines that are needed by cesium. it's best for us ( in my opinion ), to see only our shader code, and let cesium prepend whatever functions it need to make the shader work. And it's what you actually do, the main function is transformed, you add other line in the shader before sending it to the opengl |
When you want to set a custom shader, you have to include yourself all the content of the file PolylineCommon.glsl
Now with this option you can include it automatically when cesium is building the geometry.
By default the option is not activated and I've tested it with a developper tools in chrome.
It's very usefull because now I've only my code in the custom vertex shader.
Please review it, let me know if i've to change something.
Micka,