Browse Source
shader_recompiler: Add subpixel offset for correct rounding at `ImageGather`
shader_recompiler: Add subpixel offset for correct rounding at `ImageGather`
On AMD a subpixel offset of 1/512 of the texel size is applied to the texture coordinates at a ImageGather call to ensure the rounding at the texel centers is done the same way as in Maxwell or other Nvidia architectures. See https://www.reedbeta.com/blog/texture-gathers-and-coordinate-precision/ for more details why this might be necessary. This should fix shadow artifacts at object edges in Zelda: Breath of the Wild (#9957, #6956).nce_cpp
9 changed files with 86 additions and 0 deletions
-
29src/shader_recompiler/backend/glsl/emit_glsl_image.cpp
-
39src/shader_recompiler/backend/spirv/emit_spirv_image.cpp
-
4src/shader_recompiler/profile.h
-
1src/video_core/renderer_opengl/gl_device.cpp
-
5src/video_core/renderer_opengl/gl_device.h
-
1src/video_core/renderer_opengl/gl_shader_cache.cpp
-
1src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
-
1src/video_core/vulkan_common/vulkan_device.cpp
-
5src/video_core/vulkan_common/vulkan_device.h
Write
Preview
Loading…
Cancel
Save
Reference in new issue