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

Added shaders on GLSL 1.2 #187

Merged
merged 4 commits into from
Feb 20, 2021
Merged

Added shaders on GLSL 1.2 #187

merged 4 commits into from
Feb 20, 2021

Conversation

katyo
Copy link
Contributor

@katyo katyo commented Feb 20, 2021

  • Used glium::program to create shaders
  • Moved shaders code to its own sources and include it as str
  • Added shaders implementation on GLSL which allows run egui on old hardware
    (Raspberry Pi 1/zero in game again)

It should solve #79 #80.
Another shader versions (1.1, 1.3, 1.0 ES and etc.) still missing and can be added later.

- Used `glium::program` to create shaders
- Moved shaders code to its own sources and include it as str
- Added shaders implementation on GLSL which allows run egui on old hardware
  (Raspberry Pi 1/zero in game again)
@katyo
Copy link
Contributor Author

katyo commented Feb 20, 2021

I'm not an expert in GLSL dialects but seems the shader's code from webgl1 and webgl2 can be reused for GLSLES 1.0 and 3.0 respectively.

Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

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

Awesome, thank you! Please also add a line to egui_glium/CHANGELOG.md

@emilk emilk merged commit c9919da into emilk:master Feb 20, 2021
emilk added a commit that referenced this pull request Feb 28, 2021
Got broken in #187
@emilk
Copy link
Owner

emilk commented Jun 4, 2021

@katyo did you test both fragment_300es.glsl and fragment_100es.glsl ?

I ask because they seem to be carbon-copied of the WebGL shaders, including statements like "WebGL doesn't come with sRGBA textures" (but does GLES?) and "WebGL doesn't support linear blending in the framebuffer" (but does GLES?).

This is particularly relevant since I recently improved the WebGL shaders: effd3c7

@katyo
Copy link
Contributor Author

katyo commented Jun 5, 2021

@emilk Seems the version string is wrong for GLSL ES 1.00 shaders. According to specs it should be #version 100 without es at end. I forget to fix this.
I cannot test GLSL ES 3.0 version just now, but 1.00 works fine (with version fix).
This wiki page has tables with GLSL versions and corresponding version strings.

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.

None yet

2 participants