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

Refine pixel formats manipulate #240

Merged
merged 2 commits into from
Oct 21, 2020
Merged

Refine pixel formats manipulate #240

merged 2 commits into from
Oct 21, 2020

Conversation

halx99
Copy link
Collaborator

@halx99 halx99 commented Oct 20, 2020

  • a. make RGB565, RGB5A1 identical between GL and MTL backend
  • b. make texture internal format compatible on GLES-2.0 ONLY GPU devices

Notes: Metal backend doesn't support RGB8, so it looks same with RGBA8

�a. make RGB565, RGB5A1 identical between GL and MTL backend
b. make texture internal format compatible on GLES-2.0 ONLY GPU devices
@halx99 halx99 changed the title Refine pixel format Refine pixel formats manipulate Oct 20, 2020
@halx99 halx99 added this to the 1.0 milestone Oct 20, 2020
@halx99 halx99 added bug Something isn't working enhancement New feature or request labels Oct 20, 2020
@halx99
Copy link
Collaborator Author

halx99 commented Oct 20, 2020

  • Metal renderer backend on iphone7:
    image

  • Desktop GL windows 10 (NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2)
    image

  • GLES2.0 ONLY device Android 5.1 (mali400MP)
    image

@halx99
Copy link
Collaborator Author

halx99 commented Oct 21, 2020

From above tests, the RGBA4,RGBA565,RGB5A1 can be implemented by GL and Metal render backends identically without pixel format convert

  • GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4 === MTLPixelFormatABGR4Unorm
  • GL_RGB, GL_UNSIGNED_SHORT_5_6_5 === MTLPixelFormatB5G6R5Unorm
  • GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1 === MTLPixelFormatA1BGR5Unormd

@halx99 halx99 merged commit 151c9c7 into axmolengine:master Oct 21, 2020
@halx99 halx99 deleted the refine-pixelformats2 branch October 26, 2020 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant