summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/UberShaderPixel.cpp
AgeCommit message (Collapse)Author
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
2021-11-17VideoCommon: Provide raw texdims to shadersPokechu22
2021-11-17VideoCommon: Allow BitfieldExtract in specialized shadersPokechu22
2021-10-13VideoCommon: Fix color channel logic when per-pixel lighting is in usePokechu22
This was broken in #10012 (specifically by 06579e4d53844e5a45ae18f8eda6c4ee69ebad2c and c3dec343918ff44e90886daf71a6bf0c49033de1).
2021-08-01UberShaderPixel: Rename ApiType to api_typePokechu22
2021-07-08Fix indirect textures when format is not ITF_8Pokechu22
2021-07-05treewide: convert GPLv2+ license info to SPDX tagsPierre Bourdon
SPDX standardizes how source code conveys its copyright and licensing information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX tags are adopted in many large projects, including things like the Linux kernel.
2021-06-21UberShaderPixel: always set tevcoord, even if the stage has no texturePokechu22
This fixes NES game graphics when UberShaders are in use.
2021-05-27Skip indirect operation for out of bounds indirect stagesPokechu22
This fixes rendering issues in Viewtiful Joe (https://bugs.dolphin-emu.org/issues/12525), but it is not entirely hardware accurate, as hardware testing showed other, more complex behavior in this case. However, it should be good enough for our purposes.