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

GLES 3.0 Support on HW Renderer #856

Merged
merged 2 commits into from
Jul 8, 2022
Merged

GLES 3.0 Support on HW Renderer #856

merged 2 commits into from
Jul 8, 2022

Conversation

BinBashBanana
Copy link
Contributor

Overview:

The OpenGL renderer was lacking GLES 3.0 support, so I did my best to add it.

Colors are not 100% perfect on GLES3 due to it not including the 1555 ABGR color format. GLES3 uses 5551 RGBA instead.

  • example: loading screens on crash bandicoot are the wrong color

List of changes:

  • updated makefiles for:

    • android
    • ios
    • emscripten
    • rpi4
  • tested on emscripten, GLES3 must be explicitly enabled for android and ios

    • emscripten: link with -s TOTAL_MEMORY=536870912 -s FULL_ES3=1 -s MIN_WEBGL_VERSION=2 -s MAX_WEBGL_VERSION=2
  • fixed some things in glsm (libretro-common)

  • use 5551 RGBA on GLES (shaders now convert from 1555 to 5551)

updated makefiles for:
- android
- ios
- emscripten
- rpi4

tested on emscripten, GLES3 must be explicitly enabled for android and ios

fixed some things in glsm (libretro-common)

colors are not 100% perfect on GLES3 due to it not including the 1555 ABGR color format. GLES3 uses 5551 instead.
@BinBashBanana
Copy link
Contributor Author

Another thing I forgot, turning off dithering in GLES breaks it. This might be specific to emscripten, I'm not sure. WebGL complains about the vertex attribute not matching the type of the vertex shader input. This shouldn't really matter though. If all else fails, I can change the type from uint to float. (and the vertex attribute type)

@LibretroAdmin
Copy link
Contributor

Thanks very much for this!

@basharast
Copy link

basharast commented Feb 20, 2023

I was working on this implementation for UWP-ARM and mostly worked fine including shadows, colors..etc
I had to convert colors within the code because I don't understand how shaders work
below attached my changes,
I hope you already have it fixed but in case not, take look on my changes

PSX GLES: rsx-.zip

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

4 participants