summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/UberShaderPixel.cpp
AgeCommit message (Collapse)Author
2026-01-31Merge pull request #14204 from Geotale/update-commentDentomologist
Update Comments Based On Hardware Test
2026-01-25Remove unused importsMartino Fontana
Yellow squiggly lines begone! Done automatically on .cpp files through `run-clang-tidy`, with manual corrections to the mistakes. If an import is directly used, but is technically unnecessary since it's recursively imported by something else, it is *not* removed. The tool doesn't touch .h files, so I did some of them by hand while fixing errors due to old recursive imports. Not everything is removed, but the cleanup should be substantial enough. Because this done on Linux, code that isn't used on it is mostly untouched. (Hopefully no open PR is depending on these imports...)
2026-01-17Fix various typos and spelling mistakesSintendo
2025-12-10Update Comments Based On Hardware TestNuh Uh
Checked on hardware that this bias was not added because I had assumed the other way around would be true, forgot to ask about making a PR for this when I initially had done so
2025-08-23VideoBackends / VideoCommon: rename member variables in RenderState to be ↵iwubcode
consistent
2025-03-22VideoCommon: move to a 'process_fragment()' function to simplify custom ↵iwubcode
shaders and provide a direct override of the tev stage logic
2025-03-16VideoCommon: initialize uninitialized state value in pixel ubershader to ↵iwubcode
prevent error on directx in some games
2025-02-25UberShaderPixel: use unswapped texture samples for depthTillmann Karras
2025-02-11VideoCommon: simplify dither calculationTillmann Karras
This saves three instructions on AMD GPUs. Dunno about Nvidia.
2024-04-28VideoCommon: allow custom shaders to set the alpha value for use when ↵iwubcode
blending is enabled
2024-02-07VideoCommon: Don't use indexed output for fbfetchTellowKrinkle
A nonzero index makes no sense, and Mesa doesn't like it when you supply an index
2024-01-23VideoCommon: fix compilation error in uber pixel shaders when pixel shader ↵iwubcode
lighting isn't set for custom shaders
2024-01-23VideoCommon: fix uber shader pixel compilation error that happens when uint ↵iwubcode
output is defined
2023-12-12VideoCommon: prepare graphics mods for custom shader material dataiwubcode
2023-08-28VideoCommon: Fix GLSL uint handling in UberShaderPixelJosJuice
2023-08-20VideoCommon: add milliseconds elapsed time value to pixel shaders as a ↵iwubcode
uniform to be able to support animation effects in custom shaders
2023-08-20VideoCommon: uber pixel shader gen changes needed to support custom pixel ↵iwubcode
shaders in graphics mods
2023-08-15Remove out-dated hack of AMD driver issue WRT dual-source blending output index.takayhan-AMD
2023-02-14VideoCommon: Fix stereoscopic 3D on OpenGL < 4.3 (macOS)TellowKrinkle
2023-01-30VideoCommon: Better logic op invert approximationTellowKrinkle
2022-10-18Merge pull request #10836 from iwubcode/d3d_uint_fixJMC47
VideoCommon: fix uint shader compiler error when using d3d
2022-08-29UberShaderPixel: Fix typoPokechu22
2022-08-29BPMemory: Make TevKSel more clearPokechu22
It stores both the konst selection value for alpha and color channels (for two tev stages per ksel), and half of a swap table row (there are 4 total swap tables, which can be used for swizzling the rasterized color and the texture color, and indices selecting which tables to use are stored per tev stage in the alpha combiner). Since these are indexed very differently, the old code was hard to follow.
2022-08-29BPMemory: Use even/odd in TwoTevStageOrders instead of 0/1Pokechu22
2022-08-06VideoCommon: update ubershader pixel to not enforce d3d when writing color ↵iwubcode
output that has been defined as uints
2022-07-21VideoBackends: Add Metal rendererTellowKrinkle
2022-07-17Merge pull request #10747 from tellowkrinkle/LateUIDFixupJMC47
Add a post-cache shader UID fixup pass
2022-07-15VideoCommon: Always use fbfetch in ubershaders if availableTellowKrinkle
Reduce the number of different pipelines needed. Also works around drivers that break when you combine fbfetch with dual source blending
2022-07-13VideoCommon: Better driver bug handlingTellowKrinkle
Adds a pass to process driver deficiencies between UID caching and use, allowing a full view of the whole pipeline, since some bugs/workarounds involve interactions between blend modes and the pixel shader
2022-07-13VideoCommon: Properly mask fbfetch logic op emulationTellowKrinkle
2022-07-10Merge pull request #10749 from tellowkrinkle/IntelUbershadersJMC47
VideoCommon: Fix ubershaders on MoltenVK Intel
2022-07-08Merge pull request #10819 from Dentomologist/fix_shader_compilation_warningsJMC47
VideoCommon: Fix D3D shader compilation warnings
2022-07-08VideoCommon: Fix D3D shader warning X4000 (uninitialized variables)Dentomologist
Initialize alpha_A and alpha_B. They were previously only initialized in cases where they were used, but D3D isn't able to figure that out.
2022-06-24VideoCommon: fix support of stereoscopic rendering after moving d3d to SPIRV ↵iwubcode
generation
2022-06-24VideoCommon: update UberShaderPixel to properly support logic ops, matching ↵iwubcode
the specialized shader
2022-06-24D3D / VideoCommon: generate HLSL from SPIRViwubcode
2022-06-16VideoCommon: Name ubershadersTellowKrinkle
2022-06-14VideoCommon: Don't pass State by inoutTellowKrinkle
Spirv-cross's MSL codegen makes the amazing choice of compiling calls to inout functions as `State temp = s; call_function(temp); s = temp`. Not all Metal backends handle this mess well. In particular, it causes register spills on Intel, losing about 5% in performance.
2022-04-20DriverDetails: Add broken discard with early-Z bug on Apple Silicon GPUsOatmealDome
2022-04-19UberShaderPixel: Add support for non-dual source shader blendingOatmealDome
2022-04-10MoltenVK: Fix pixel shader typoJosJuice
2022-02-28Shadergen: Use real_ocol0 workaround for shader logic opsJosJuice
Previously we were using this workaround when using framebuffer fetch to emulate dual source blending, but it seems like we also need to use it when using framebuffer fetch to emulate logic ops, otherwise some Adreno devices get a crash when compiling OpenGL ES ubershaders. Using the workaround in specialized shaders doesn't seem to be necessary, but I've made the same change there for consistency. This gets us closer to fixing https://bugs.dolphin-emu.org/issues/12791 but doesn't actually fix it.
2022-02-08Treat alpha as 0 if alpha is 1 for blendingPokechu22
This removes the white box in fortune street again, without causing Mario Kart Wii to regress.
2022-02-08Use the same logic for lerp bias for color and alphaPokechu22
It doesn't make sense for alpha to add the bias ONLY when dividing by 2, while color doesn't apply the bias for divide by 2 only; hardware testing indicates that alpha should have the bias. This fixes the menus in Mario Kart Wii (https://bugs.dolphin-emu.org/issues/11909) but reintroduces the white rectangle in Fortune Street. This reverts commit 5aaa5141ed76acc3fffc70561a6b6e7fe3b9b470 (and several other matching changes elsewhere).
2022-01-26UberShaderPixel: Fix typo in fog calculationPokechu22
2021-12-22Merge pull request #10215 from OatmealDome/shader-logic-opsJMC47
VideoCommon: Support shader logic ops on Metal (Apple GPUs) and OpenGL ES
2021-12-18UberShaderPixel: Convert to EnumMapPokechu22
2021-12-06UberShaderPixel: Add shader logic ops support on OpenGL ESOatmealDome
2021-12-06UberShaderPixel: Add shader logic ops support on MetalOatmealDome
2021-11-17VideoCommon: Manually handle texture wrapping and samplingPokechu22