eden-miror/src/video_core/host_shaders
lizzie b66adfe04c
[vulkan] add native cubic filtering (#88)
Co-authored-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/88

This implements the use of VK_FILTER_CUBIC_EXT as a replacement for the software-based bicubic window adapting filter, used primarily for texture sampling in upscaled or downscaled surfaces such as UI, transparency effects, and screen-space elements in Unreal Engine 4 titles.

The Vulkan cubic filter is now conditionally enabled if the following are satisfied:

The device supports VK_EXT_filter_cubic

The format used supports VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT

This change improves visual quality while reducing GPU workload by offloading cubic filtering to the driver instead of running custom sampling code in shaders. On supported hardware (e.g. desktop GPUs or high-end Adreno/AMD devices), it results in smoother transitions, improved transparency sampling, and better fidelity with lower shader complexity.

Fallback to the original software bicubic logic remains in place for devices lacking the extension or format capability.

Tested on several UE4 titles and confirmed to preserve or enhance visual output, especially in alpha-blended and UI-heavy scenes.
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
2025-07-22 20:49:00 +02:00
..
astc_decoder.comp Fix typos in video_core 2024-01-07 22:44:55 +00:00
blit_color_float.frag video_core: Implement maxwell3d draw texture method 2023-01-05 12:41:28 +08:00
block_linear_unswizzle_2d.comp general: Convert source file copyright comments over to SPDX 2022-04-23 05:55:32 -04:00
block_linear_unswizzle_3d.comp general: Convert source file copyright comments over to SPDX 2022-04-23 05:55:32 -04:00
CMakeLists.txt renderer: add area sampling scaling method (#201) 2025-06-21 13:35:04 +00:00
convert_abgr8_srgb_to_d24s8.frag [vulkan] add native cubic filtering (#88) 2025-07-22 20:49:00 +02:00
convert_abgr8_to_d24s8.frag general: Convert source file copyright comments over to SPDX 2022-04-23 05:55:32 -04:00
convert_abgr8_to_d32f.frag Changes based on hardware tests 2023-10-17 02:42:40 +11:00
convert_astc_hdr_to_rgba16f.comp video_core: Add new shader format conversion pipelines 2025-04-11 17:05:30 -03:00
convert_bc7_to_rgba8.comp video_core: Add new shader format conversion pipelines 2025-04-11 17:05:30 -03:00
convert_d24s8_to_abgr8.frag video_core: Fix d24r8/s8d24 convert shader build error in moltenvk 2023-09-07 18:01:36 +08:00
convert_d32f_to_abgr8.frag use texelfetch instead of texturelod 2023-10-16 04:20:45 +11:00
convert_depth_to_float.frag general: Convert source file copyright comments over to SPDX 2022-04-23 05:55:32 -04:00
convert_float_to_depth.frag general: Convert source file copyright comments over to SPDX 2022-04-23 05:55:32 -04:00
convert_msaa_to_non_msaa.comp host_shaders: More proper handling of x2 MSAA copies 2023-09-25 09:20:32 -04:00
convert_non_msaa_to_msaa.comp host_shaders: More proper handling of x2 MSAA copies 2023-09-25 09:20:32 -04:00
convert_rgb_to_yuv420.comp video_core: Add new shader format conversion pipelines 2025-04-11 17:05:30 -03:00
convert_rgba8_to_bgra8.frag video_core: Add new shader format conversion pipelines 2025-04-11 17:05:30 -03:00
convert_rgba16f_to_rgba8.frag video_core: Add new shader format conversion pipelines 2025-04-11 17:05:30 -03:00
convert_s8d24_to_abgr8.frag video_core: Fix d24r8/s8d24 convert shader build error in moltenvk 2023-09-07 18:01:36 +08:00
convert_yuv420_to_rgb.comp video_core: Add new shader format conversion pipelines 2025-04-11 17:05:30 -03:00
dither_temporal.frag video_core: Add new shader format conversion pipelines 2025-04-11 17:05:30 -03:00
dynamic_resolution_scale.comp video_core: Add new shader format conversion pipelines 2025-04-11 17:05:30 -03:00
fidelityfx_fsr.frag nvnflinger/gpu: implement blending 2024-02-09 09:20:53 -05:00
full_screen_triangle.vert Address feedback 2023-01-16 10:27:57 +08:00
fxaa.frag nvnflinger/gpu: implement blending 2024-02-09 09:20:53 -05:00
fxaa.vert renderer_opengl: split out FXAA 2024-01-31 11:27:20 -05:00
opengl_convert_s8d24.comp general: Convert source file copyright comments over to SPDX 2022-04-23 05:55:32 -04:00
opengl_copy_bc4.comp general: Convert source file copyright comments over to SPDX 2022-04-23 05:55:32 -04:00
opengl_fidelityfx_fsr.frag nvnflinger/gpu: implement blending 2024-02-09 09:20:53 -05:00
opengl_fidelityfx_fsr_easu.frag video_core/opengl: Add FSR upscaling filter to the OpenGL renderer 2023-01-26 21:43:33 +01:00
opengl_fidelityfx_fsr_rcas.frag video_core/opengl: Add FSR upscaling filter to the OpenGL renderer 2023-01-26 21:43:33 +01:00
opengl_lmem_warmup.comp OpenGL: Add Local Memory warmup shader 2023-06-25 18:43:23 -04:00
opengl_present.frag nvnflinger/gpu: implement blending 2024-02-09 09:20:53 -05:00
opengl_present.vert general: Convert source file copyright comments over to SPDX 2022-04-23 05:55:32 -04:00
opengl_present_scaleforce.frag renderer_vulkan: implement layer stack composition 2024-01-31 11:27:21 -05:00
opengl_smaa.glsl general: fix spelling mistakes 2023-03-12 11:33:01 -04:00
pitch_unswizzle.comp general: Convert source file copyright comments over to SPDX 2022-04-23 05:55:32 -04:00
present_area.frag renderer: add area sampling scaling method (#201) 2025-06-21 13:35:04 +00:00
present_bicubic.frag nvnflinger/gpu: implement blending 2024-02-09 09:20:53 -05:00
present_gaussian.frag nvnflinger/gpu: implement blending 2024-02-09 09:20:53 -05:00
queries_prefix_scan_sum.comp Query Cache: Fix Prefix Sums 2023-09-23 23:05:30 +02:00
queries_prefix_scan_sum_nosubgroups.comp Query Cache: Fix Prefix Sums 2023-09-23 23:05:30 +02:00
resolve_conditional_render.comp Query Cachge: Fully rework Vulkan's query cache 2023-09-23 23:05:29 +02:00
smaa_blending_weight_calculation.frag video_core: Integrate SMAA 2022-12-08 17:17:45 -05:00
smaa_blending_weight_calculation.vert video_core: Integrate SMAA 2022-12-08 17:17:45 -05:00
smaa_edge_detection.frag video_core: Integrate SMAA 2022-12-08 17:17:45 -05:00
smaa_edge_detection.vert video_core: Integrate SMAA 2022-12-08 17:17:45 -05:00
smaa_neighborhood_blending.frag video_core: Integrate SMAA 2022-12-08 17:17:45 -05:00
smaa_neighborhood_blending.vert video_core: Integrate SMAA 2022-12-08 17:17:45 -05:00
source_shader.h.in chore: make yuzu REUSE compliant 2022-07-27 12:53:49 +02:00
StringShaderHeader.cmake video_core: Integrate SMAA 2022-12-08 17:17:45 -05:00
vulkan_blit_depth_stencil.frag general: Convert source file copyright comments over to SPDX 2022-04-23 05:55:32 -04:00
vulkan_color_clear.frag video_core: Implement vulkan clear specified channel 2023-01-28 12:53:05 +08:00
vulkan_color_clear.vert video_core: Implement vulkan clear specified channel 2023-01-28 12:53:05 +08:00
vulkan_depthstencil_clear.frag Masked depthstencil clears 2023-08-19 03:29:46 +01:00
vulkan_fidelityfx_fsr.vert renderer_vulkan: convert FSR to graphics pipeline 2024-01-31 11:27:21 -05:00
vulkan_fidelityfx_fsr_easu_fp16.frag nvnflinger/gpu: implement blending 2024-02-09 09:20:53 -05:00
vulkan_fidelityfx_fsr_easu_fp32.frag nvnflinger/gpu: implement blending 2024-02-09 09:20:53 -05:00
vulkan_fidelityfx_fsr_rcas_fp16.frag nvnflinger/gpu: implement blending 2024-02-09 09:20:53 -05:00
vulkan_fidelityfx_fsr_rcas_fp32.frag nvnflinger/gpu: implement blending 2024-02-09 09:20:53 -05:00
vulkan_present.frag renderer_vulkan: implement layer stack composition 2024-01-31 11:27:21 -05:00
vulkan_present.vert host_shaders: add vendor workaround for adreno drivers 2024-02-10 12:02:37 -05:00
vulkan_present_scaleforce_fp16.frag nvnflinger/gpu: implement blending 2024-02-09 09:20:53 -05:00
vulkan_present_scaleforce_fp32.frag nvnflinger/gpu: implement blending 2024-02-09 09:20:53 -05:00
vulkan_quad_indexed.comp video_core: Implement vulkan QuadStrip topology 2022-12-26 11:37:34 +08:00
vulkan_turbo_mode.comp vulkan: implement 'turbo mode' clock booster 2023-01-04 22:22:01 -05:00
vulkan_uint8.comp general: Convert source file copyright comments over to SPDX 2022-04-23 05:55:32 -04:00