Commit graph

48 commits

Author SHA1 Message Date
Ameer J
822348997d emit_glsl_image: Use inlined texelFetch offsets 2023-12-20 19:24:11 -05:00
Ameer J
abd400e04f shader_recompiler: Fix spelling of "derivate" (#12067) 2023-11-18 13:39:47 +01:00
Liam
024fb4fae9 shader_recompiler: fix emulation of 3D textureGrad 2023-09-01 22:41:01 -04:00
Fernando Sahmkow
01858648d1 Shader Recomnpiler: implement textuzreGrad 3D emulation constant propagation 2023-08-18 22:17:02 -04:00
Wollnashorn
45fb154f0d 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).
2023-04-08 16:12:30 +02:00
ameerj
2a98e88a3a emit_glsl_image: Implement TXQ with MSAA textures
Also fixes for texture buffers, which do not have mips eithers.
2023-01-29 13:31:47 -05:00
liamwhite
a5bc2444d2 Merge pull request #9694 from ameerj/txq-mips
shader_recompiler: TXQ: Skip QueryLevels when possible
2023-01-29 12:27:26 -05:00
ameerj
2d2558797c shader_recompiler: TXQ: Skip QueryLevels when possible 2023-01-28 16:25:18 -05:00
ameerj
f68ef5b15a emit_glsl_image: Fix ImageFetch for MSAA textures 2023-01-28 14:39:27 -05:00
FengChen
98656c14a8 video_code: support rectangle texture 2022-08-25 12:45:58 +08:00
Morph
2b87305d31 general: Convert source file copyright comments over to SPDX
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2022-04-23 05:55:32 -04:00
ameerj
efd428c747 shader_recompiler: Adjust emit_context includes 2021-12-05 18:11:19 -05:00
ReinUsesLisp
d04e2dac6c shader: Properly scale image reads and add GL SPIR-V support
Thanks for everything!
2021-11-16 22:11:29 +01:00
ReinUsesLisp
0d12e498ab glsl/glasm: Pass and use scaling parameters in shaders 2021-11-16 22:11:29 +01:00
ReinUsesLisp
7f88938d72 shader: Add IsTextureScaled opcode 2021-11-16 22:11:28 +01:00
ameerj
d344489b5b glsl: Add Shader_GLSL logging 2021-07-22 21:51:38 -04:00
ameerj
b33af69513 glsl: Add stubs for sparse queries and variable aoffi when not supported 2021-07-22 21:51:38 -04:00
ameerj
67cc50be47 glsl: Minor cleanup 2021-07-22 21:51:38 -04:00
ameerj
7bf5c1164e glsl: Address more feedback. Implement indexed texture reads 2021-07-22 21:51:38 -04:00
ameerj
8ab7780015 glsl: Reorganize backend code, remove unneeded [[maybe_unused]] 2021-07-22 21:51:37 -04:00
ameerj
b3a46a3746 glsl: Implement image atomics and set layer
along with some more cleanup/oversight fixes
2021-07-22 21:51:37 -04:00
ameerj
d01344c008 glsl: Fix image gather logic 2021-07-22 21:51:37 -04:00
ameerj
8c9d420fa5 glsl: Use textureGrad fallback when EXT_texture_shadow_lod is unsupported 2021-07-22 21:51:37 -04:00
ameerj
f56a276e79 emit_glsl_image: Use immediate offsets when possible 2021-07-22 21:51:37 -04:00
ameerj
4534294b7b glsl: Cleanup and address feedback 2021-07-22 21:51:37 -04:00
ameerj
2e8da9d3be glsl: Implement Load/WriteGlobal
along with some other misc changes and fixes
2021-07-22 21:51:37 -04:00
ameerj
d19a49485a glsl: Implement Images 2021-07-22 21:51:37 -04:00
ameerj
5c73bf453c glsl: Implement ImageGradient and other texture function variants 2021-07-22 21:51:37 -04:00
ameerj
43426d170c glsl: Use NotImplemented macro with function name output 2021-07-22 21:51:37 -04:00
ameerj
aa06d8fa05 glsl: Implement gl_ViewportIndex
SSBU now working
2021-07-22 21:51:37 -04:00
ameerj
8185a5ab34 glsl: Rework variable allocator to allow for variable reuse 2021-07-22 21:51:37 -04:00
ameerj
3795c56db6 glsl: Implement more instructions used by SMO 2021-07-22 21:51:36 -04:00
ameerj
8a7d7d16c8 glsl: minor cleanup 2021-07-22 21:51:36 -04:00
ameerj
0b8e65125a glsl: Implement TXQ and other misc changes 2021-07-22 21:51:36 -04:00
ameerj
5a4af6cf14 glsl: TLD4 implementation 2021-07-22 21:51:36 -04:00
ameerj
81c2595a33 glsl: Implement TLD instruction 2021-07-22 21:51:36 -04:00
ameerj
db039e6271 glsl: Implement TEXS 2021-07-22 21:51:36 -04:00
ameerj
b3253f6f44 glsl: Cleanup texture functions 2021-07-22 21:51:36 -04:00
lat9nq
fc7edccbc1 shader_recompiler: GCC fixes 2021-07-22 21:51:36 -04:00
ameerj
08935e289f glsl: Implement TEX depth functions 2021-07-22 21:51:36 -04:00
ameerj
b055e4a91e glsl: Implement TEX ImageSample functions 2021-07-22 21:51:36 -04:00
ameerj
54778aa10a glsl: SSBO access fixes and wip SampleExplicitLod implementation. 2021-07-22 21:51:36 -04:00
ameerj
c797a0c5a5 glsl: Fix bindings, add some CC ops 2021-07-22 21:51:36 -04:00
ameerj
e6a0f0f384 glsl: remove unused headers 2021-07-22 21:51:36 -04:00
ameerj
b96d76fa7e glsl: Implement derivatives and YDirection
plus some other misc additions/changed
2021-07-22 21:51:36 -04:00
ameerj
2328b0b2a8 glsl: textures wip 2021-07-22 21:51:36 -04:00
ameerj
32328acc39 glsl: Implement some attribute getters and setters 2021-07-22 21:51:36 -04:00
ameerj
fda83fe3c5 glsl: Initial backend 2021-07-22 21:51:35 -04:00