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

Use glslang to translate GLSL 1.x postshaders to GLSL 3.0 or later #10369

Merged
merged 3 commits into from
Dec 8, 2017

Conversation

hrydgard
Copy link
Owner

@hrydgard hrydgard commented Dec 7, 2017

To appease strict GL Core drivers. Should fix #10362

@hrydgard
Copy link
Owner Author

hrydgard commented Dec 7, 2017

That doesn't work because we need to switch STL to libc++ first... I'll do that separately.

@hrydgard hrydgard merged commit 2afb671 into master Dec 8, 2017
@hrydgard hrydgard deleted the shader-translate-gl-core branch December 8, 2017 10:31
if (gl_extensions.ver[0] >= 4) {
options.version = 400;
} else {
options.version = 300;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had an issue on Mac where I had to specify exactly the same version. Maybe I was mistaken and it was only the major version, but it seemed to need 1:1.

That's what motivated this code:

version = StringFromFormat("#version %d%d0\n", gl_extensions.ver[0], gl_extensions.ver[1]);

I'm also pretty sure 3.1 and 3.2 needed those specific versions too (you can test by hardcoding versions in PCMain iirc.)

-[Unknown]

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems odd that it would be that strict about version, especially if we specify just the major version... but maybe worth doing. Should be noted that GLSL language versions are distinct from GL versions although they did synchronize them after 3.0 I think?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right - this path is only non-ES right?

-[Unknown]

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In practice mostly yeah - it's not used on Android. Though, I guess there's Raspberry Pi and things like that, and iOS... Should probably tighten it up a little.

@unknownbrackets unknownbrackets added this to the v1.6.0 milestone Dec 11, 2017
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

Successfully merging this pull request may close these issues.

Postprocessing shaders don't work with GL Core contexts (affects mac, windows, linux?)
2 participants