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

Shaders: Reintroduce the old Ascii-Art shader. #11690

Merged
merged 2 commits into from Mar 28, 2023

Conversation

degasus
Copy link
Member

@degasus degasus commented Mar 24, 2023

Shaders: Reintroduce the old Ascii-Art shader.

Dolphin had a nice but horrible slow ascii art shader.
Beside being slow, it used the font from dolphin's old OSD implementation.
So it was also broken after the VideoCommon redesign.

This patch reintroduces the (almost) identical method for the ascii art generation.
However with many improvements:

  • Inline definition of the font, so no external dependency any more
  • Optimized performance by partial unrolling with CSE'ing some memory loads
  • Shader subgroup instructions, so 32 times faster on desktop CPUs on Vulkan + OGL (no D3D support)
  • Option to select character size by internal or window resultion
  • Dropped the last row of pixels of each character (only modification of the outcome compared to the old implementation)

Dolphin had a nice but horrible slow asci art shader.
Beside being slow, it used the font from dolphin's old OSD implementation.
So it was also broken after the VideoCommon redesign.

This patch reintroduces the (almost) identical method for the asci art generation.
However with many improvements:
* Inline definition of the font, so no external dependency any more
* Optimized performance by partial unrolling with CSE'ing some memory loads
* Shader subgroup instructions, so 32 times faster on desktop CPUs on Vulkan + OGL (no D3D support)
* Option to select character size by internal or window resultion
* Dropped the last row of pixels of each character (only modification of the outcome)
It is used as workaround for the missing subgroupBroadcastDynamicId flag on SPIR-V < 1.5.
@degasus degasus changed the title Shaders: Reintroduce the old Asci-Art shader. Shaders: Reintroduce the old Ascii-Art shader. Mar 25, 2023
@delroth
Copy link
Member

delroth commented Mar 28, 2023

@MayImilae said she cares about it, so heh.

@delroth delroth merged commit d62838a into dolphin-emu:master Mar 28, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants