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

Support for #includes in built-in GL shaders. #4505

Merged
merged 1 commit into from
May 2, 2016

Conversation

SaracenOne
Copy link
Member

@SaracenOne SaracenOne commented May 1, 2016

I've added support to the Python script responsible for scanning and exposing the data of the native GLSL into headers to be able to use the #include directive. Since this is a precompiler routine, there are no concerns over driver compatibility, and these additions should also provide protection from recursion or double inclusion. The reason I wanted to add this is thought that if the builtin shaders are going to grow in complexity in the future, it may be an idea to refactor into sets of more managable submodules. Currently, the ubershaders used are quite difficult to follow since composed almost entirely of #ifdefs. In future, I would also like to add similar functionality to user shaders too

@reduz
Copy link
Member

reduz commented May 1, 2016

oh wow this is really useful, will merge as soon as I can

On Sun, May 1, 2016 at 9:51 AM, SaracenOne [email protected] wrote:

I've added support to the Python script responsible for scanning and
exposing the data of the native GLSL to be able to use the #include
directive. Since this is a precompiler routine, there are no concerns over
driver compatibility, and these additions should also provide protection
from recursion or double inclusion. The reason I wanted to add this is
thought that if the builtin shaders are going to grow in complexity in the
future, it may be an idea to refactor into sets of more managable
submodules. Currently, the ubershaders used are quite difficult to follow
since composed almost entirely of #ifdefs. In future, I would also like to

add similar functionality to user shaders too

You can view, comment on, or merge this pull request online at:

#4505
Commit Summary

  • Support for #includes in built-in GL shaders.

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#4505

@SaracenOne
Copy link
Member Author

Hold on, I think there's a problem with this commit I've just discovered. I'm fixing it right now.

@akien-mga
Copy link
Member

Too late ;) But you can make a second PR, no problem.

@aaronfranke aaronfranke added this to the 2.1 milestone Jan 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants