Update shader compilation to GLSL 1.50 #10
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a partial fix for #8
The main change is enforcing the minimum GLSL version to be 150 (the
--qt6
flag defaults to...quite a fair bit lower versions).The motivator behind this is that it seems lots of the advanced shaders (and also as seen in the included footer/header in this repo), use
texelFetch
Full support for this has only been added in 150: https://docs.gl/sl4/texelFetch
As no machine running Plasma6 should be limited to versions of GLSL this old, I think it is fair to apply this? Ultimately the judgement is up to you of course :)
Also requires a slight patch to the shaders to remove
#version
. I wonder if this should just be automated (remove all#version
statements from shader, add one at the top that is the highest version requested? Fail if we detect a difference?)This does make a lot of the other shaders "just work". See one of the examples:
![image](https://private-user-images.githubusercontent.com/631409/365458631-eddb1e24-5294-4291-ba94-fc7562a132bb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNjMyMTAsIm5iZiI6MTczOTI2MjkxMCwicGF0aCI6Ii82MzE0MDkvMzY1NDU4NjMxLWVkZGIxZTI0LTUyOTQtNDI5MS1iYTk0LWZjNzU2MmExMzJiYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQwODM1MTBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zYzcwOWNjZmE1ZDkzMzQzNzI5OWJkM2U2YjhmZWZkZmE2ZjVjNDA4YzJjMzgyYjY3MzdiZWYzY2NjYjkxZDUxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.zVMxDTiQxBNipwulzodJqOerVLN09V5oEzO2-3EMcnA)