summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/UberShaderCommon.cpp
AgeCommit message (Collapse)Author
2026-01-09c++23: Replace Common::ToUnderlying with std::to_underlyingJoshua Vandaƫle
Requires at least GCC 11, Clang 13, MSVC 19.30 (VS2022 17.0), or AppleClang 13.1.6 (XCode 13.3).
2023-06-17EnumUtils: Add Common::ToUnderlyingget
Mirrors the C++23 <utility> function, std::to_underlying
2022-11-23Fix build errors related to formatting non-scoped enumsPokechu22
2022-06-24D3D / VideoCommon: generate HLSL from SPIRViwubcode
2021-12-10Treewide: Adjust order of includesPokechu22
2021-11-17VideoCommon: Allow BitfieldExtract in specialized shadersPokechu22
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-05-07Change BitfieldExtract to use a pointer to the bitfield memberPokechu22
2021-03-06Convert XFMemory to BitField and enum classPokechu22
Additionally a new ClipDisable union has been added (though it is not currently used by Dolphin).
2020-11-20LightingShaderGen: Always calculate lighting for both color channelsStenzek
Cel-damage depends on lighting being calculated for the first channel even though there is no color in the vertex format (defaults to the material color). If lighting for the channel is not enabled, the vertex will use the default color as before. The default value of the color is determined by the number of elements in the vertex format. This fixes the grey cubes in Super Mario Sunshine. If the color channel count is zero, we set the color to black before the end of the vertex shader. It's possible that this would be undefined behavior on hardware if a vertex color index that was greater than the channel count was used within TEV.
2020-11-09ShaderGenCommon: Rename WriteFmt() to Write()Lioncash
Now that we've converted all of the shader generators over to using fmt, we can drop the old Write() member function and perform a rename operation on the WriteFmt() to turn it into the new Write() function. All changes within this are the removal of a <cstdarg> header, since the previous printf-based Write() required it, and renaming. No functional changes are made at all.
2020-10-20UberShaderCommon: Migrate over to fmtLioncash
Continues migration of the shader generators over to fmt.
2020-05-25VideoCommon/ShaderGenCommon: Make template functions regular functionsLioncash
These are only ever used with ShaderCode instances and nothing else. Given that, we can convert these helper functions to expect that type of object as an argument and remove the need for templates, improving compiler throughput a marginal amount, as the template instantiation process doesn't need to be performed. We can also move the definitions of these functions into the cpp file, which allows us to remove a few inclusions from the ShaderGenCommon header. This uncovered a few instances of indirect inclusions being relied upon in other source files. One other benefit is this allows changes to be made to the definitions of the functions without needing to recompile all translation units that make use of these functions, making change testing a little quicker. Moving the definitions into the cpp file also allows us to completely hide DefineOutputMember() from external view, given it's only ever used inside of GenerateVSOutputMembers().
2019-05-06Reformat repo to clang-format 7.0 rulesTechjar
2017-12-10Fix an invalid (uint < int) comparison in GLES with ubershadersJonathan Hamilton
2017-11-22LightingShaderGen: Always calculate lighting for both color channelsStenzek
Cel-damage uses the color from the lighting stage of the vertex pipeline as texture coordinates, but sets numColorChans to zero. We now calculate the colors in all cases, but override the color before writing it from the vertex shader if numColorChans is set to a lower value.
2017-07-30Ubershaders: Support per-pixel lightingStenzek
2017-07-30ShaderGen: Implement vertex ubershadersStenzek
2017-07-30ShaderGen: Implement pixel ubershadersStenzek