-
Notifications
You must be signed in to change notification settings - Fork 426
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
bugfix: decrease minimum required GL version for most shaders #2117
Conversation
Can we not do this just for mac? |
We could if we wanted to, the current shaders work fine on my Mac, so it's not a problem with all Macs apparently. Also it's not an issue since these shaders don't use any 4+ GL features (except maybe the PTex Shader). |
Actually, I'm getting a cast error in my PBR work if I use 3.30 instead of 4.1 |
Ah, interesting... Could you post the full cast error? |
implicit cast uint to int. Easy enough/painless to address, I'm only concerned about how we may be hindering ourselves in the future just because Apple is trying to force folks to Metal. I have insufficient expertise to say with impunity that 330 will always be sufficient. For example, does this mean that cubemap array textures only became available in 4.0? Will we wish to use those? I don't know. |
This is a @mosra question :) |
It does seem like folks are able to use 4.1 on some macs. Could this be a configuration/setup issue for the user? |
Going with GLSL 3.30 is a good thing because it gets you closer to the syntax WebGL 2 expects, so this is a good change. Anything from newer versions can be opted in via extensions (you can look at code of Magnum's builtin shaders if you're interested, they're also mostly just on GLSL 3.30 or even earlier). So if you fix that one casting issue that popped up, I think this PR is good to go. It might be good to have the shader code validated for WebGL 2 as well. I'll see if I can provide you the tools to do that without having to compile & run the whole Emscripten build. But even without that, the PR already fixes something, so it could get merged even without the shaders being valid for WebGL 2.
Some older Macs have only GL 3.3 IIRC, and those Macs don't even have Metal, just GL. Another possible case is older GPUs, GL 4.0 requires certain features such as 64-bit integers and floats in shaders that older architectures don't have any support for. |
Cool, ok! Has my vote then :). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@Skylion007 Probably want to add PTex shader too, no? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTex shader
I don't think it's worth modifying that one. Its test coverage is very low (if any at all), no current dataset uses PTex, and so if you accidentally break it you may not even know. Leave it at 4.1.
This still needs to fix that cast error though you mentioned, so no approval yet -- John, can you say what to change and where?
Should we remove that support then? There's so much custom ptex stuff, if we're not going to support it anymore then we should consider removing it, I think.
I'll make the changes that I found and add them here. |
One potential confllict.
@jturner65 Whoops, accidentally removed your approval. |
One thing that needs to be tested that I did not get to is the various texture queries for ID - not sure if that will cause the cast complaint. I'll check it tomorrow if nobody else has by then :). |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oof i knew that. sorry, forgot.
LGTM
Motivation and Context
How Has This Been Tested
Types of changes
Checklist