-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Version numbers and profile specifiers in shaders #587
Comments
Thanks for pointing this out, @MarcoHutter! I think there's a few components here:
This is potentially related to #236. Labeling this |
@lexaknyazev @MarcoHutter I think we have a few options here:
I am leaning towards pushing post 1.0.1 this since I think it needs to be considered more carefully along with API profiles in glTF. |
Deferring this to a later version is certainly OK. There are more pressing issues, and one must indeed be careful with selecting the right approach. (I ran into this issue from various directions, while playing with a Java based glTF viewer. There are interdependencies between GL profiles and GL API versions and the GLSL version and things like |
Thanks for the quick response, @MarcoHutter. @lexaknyazev do you agree with pushing? |
Support for non-ES versions will be important to Blender in the future. For internal shaders we use a mix of versions from 120 to 150 compatibility (always declared atop the GLSL), and are transitioning everything to GL 3.2 core profile and GLSL 150 soon. The ability to export these directly into glTF would be ✨ 👍 ✨ |
I'm for pushing this after 1.0.1. The issue is quite complicated and involves careful definition of |
Pushing post 1.0.1. Thanks all for the input. @significant-bit glTF will support non-ES versions, it just a matter of scope to finish 1.0.1 for SIGGRAPH. By the way, how is import/export glTF support coming in Blender? Is there a Google Summer of Code project? |
The version 120 specifier is not supported in current WebGL implementations. Non-GLES runtimes will have to cope with the missing version number (and the invalid matrix casts) anyhow. Related to KhronosGroup/glTF#587
Closing, this is currently obsolete in glTF 2.0. |
(This might be related to #405 )
Compiling the current shaders (e.g. from the "duck" example) on desktop (non-GLES) systems results in
The concerning thing is that the "matrix cast" warning may be considered as an error in some cases, and cause the compilation to fail. I'm not sooo familiar with the details, but know that this depends on the graphics card vendor / driver and potentially other factors (e.g. these "compatibility" and "core" settings...). At least, according to the GLSL ES Spec https://www.khronos.org/registry/gles/specs/3.2/GLSL_ES_Specification_3.20.pdf , Section 3.3, Version Declaration:
So I guess that the version number must be included (in the RFC2119 sense), unless the shader really targets GLSL 1.00.
I fixed this for my local tests, by adding
at the beginning of the shaders, but am not sure whether this an appropriate or generally applicable solution.
The text was updated successfully, but these errors were encountered: