Commit Graph

12 Commits

Author SHA1 Message Date
degasus 57088ebb82 Shaders: Add error message for asciiart shader if shader_subgroup is missing.
This extension is currently required to get good performance.
So instead of maybe triggering a GPU hang, let's just disable the shader and show a warning instead.

Sadly our postprocessing framework does not support reporting a warning, so the way to display the warning is a bit hacky.
But this is an ascii-art shader, we already have a font in the shader, so let's use it.
2023-03-29 23:12:50 +02:00
degasus 4780953172 Shaders: Clang-format
With no modification.
2023-03-29 23:12:50 +02:00
degasus 196c684ac1 Vulkan: Enable subgroupShuffle.
It is used as workaround for the missing subgroupBroadcastDynamicId flag on SPIR-V < 1.5.
2023-03-24 21:53:23 +01:00
degasus 1571098783 Shaders: Reintroduce the old Asci-Art shader.
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)
2023-03-24 21:43:19 +01:00
G 62bd79e70d
Remove AsciiArt shader
This shader has been rendered nonfunctional due to the removal of the function SampleFontLocation, which was never implemented in VideoCommon. The last reference to SampleFontLocation was located in the OGL video backend. It was removed in this commit: f039149198 (diff-24125a6c968a8aca9cadd977d4b9d68f), where many functions were moved to video common, among other things.

This shader should be removed so it does not confuse users with the error that it causes. Alternatively, it could be rewritten so it is compatible with modern versions of Dolphin. I am not familiar with GLSL, so this is currently beyond my skill set.
2020-10-05 21:44:56 -07:00
Ryan Houdek 32fe37d834 Change all the post processing shaders to the new system.
Removes the README.txt file in favour of a new wiki page I'm going to generate.
2014-08-13 01:05:15 -05:00
Ryan Houdek bc9ef95643 Support Sampler binding in the shader.
In the cases where we support the binding layout keyword, use it for more than binding UBO location.
This changes it so it is supported for samplers as well.

Instances when this is enabled is if a device supports GL_ARB_shading_language_420pack, or if it supports GLES 3.10.
2014-07-18 17:04:03 -05:00
myownfriend c2e5e030b0 Update asciiart.glsl 2014-05-21 15:15:48 -04:00
myownfriend f59c7f25da Update asciiart.glsl 2014-05-21 00:05:13 -04:00
myownfriend a26673163f Update asciiart.glsl 2014-05-20 23:39:48 -04:00
Ryan Houdek 34bc14e75d Fixes our post processing shaders so they work under OpenGL ES 3.0
Most of our shaders relied on implicit int->float conversions.
This fixes the assumption that this is allowed
2014-05-05 15:59:49 -05:00
Pierre Bourdon e7213ca4b1 Overlay the user Shaders/ over the shared one to avoid copying files 2013-09-14 06:08:30 +02:00