summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexShaderManager.cpp
AgeCommit message (Collapse)Author
2025-10-31VideoCommon: move global variables out of BPFunctionsiwubcode
2025-07-21Vulkan: Add support for unrestricted depth range.CrossVR
2025-03-11VertexShaderManager: Eliminate unnecessary m_viewport_correction member.Jordan Woyak
2025-03-09VideoCommon: Move backend_info out of VideoConfig struct.Jordan Woyak
2024-10-05Merge pull request #12208 from PatrickFerry/add-vertex-depth-range-caseJules Blok
Use Vertex Depth Range when zRange Exceeds farZ
2023-11-26VideoCommon: move xf state management to its own class, so changes can be ↵iwubcode
detected in places other than VertexShaderManager
2023-09-28Use Vertex Depth Range when zRange Exceeds farZPatrick Ferry
When the inverted depth range is unsupported and zRange is greater than farZ then min_depth becomes a negative value and far_depth will then exceed a depth of 1.0 (which is outside the scope of most backends and greater than GX_MAX_DEPTH of the console). This happens when the backend supports depth clamping the min_depth is not clamped to zero.
2023-07-02VideoCommon: don't do pointer copies during graphics mod callback iterationiwubcode
2023-03-20VideoCommon:VertexShaderManager: Inline SetVertexFormat & UpdateValue/OffsetRobin Kertels
2023-02-09Lint fixesScott Mansell
2023-02-09Cleanup headersScott Mansell
2023-02-09Move UseVertexDepthRange() out of RendererScott Mansell
There wasn't really a good place for it, but this will do
2023-02-09Lint fixesScott Mansell
2023-02-09Move xfb tracking and IR scaling out of RenderBaseScott Mansell
2023-01-31Move GraphicsMod out of RenderBaseScott Mansell
2023-01-25VideoCommon: Add class for quickly transforming and culling vertices on the CPUTellowKrinkle
2022-12-28VideoCommon/VertexShaderManager: Rename private variables.Admiral H. Curtiss
2022-12-28VideoCommon: De-globalize VertexShaderManager class.Admiral H. Curtiss
2022-10-09VideoCommon: add structures to graphics mods to allow for future adding or ↵iwubcode
removing parameters with less code overhead
2022-09-19VideoCommon: Use std::array in PortableVertexDeclarationTellowKrinkle
2022-09-19VideoCommon: Add dynamic vertex loader to ubershadersTellowKrinkle
2022-08-04Sanitize and use increased precision when normalizing light directionsPokechu22
This normalization was added in 02ac5e95c84a1d9a46df1dc4102342fb653e36ee, and changed to use floats in 4bf031c0646e91b35777f1ba4e2b0328063bb666. The conversion to floats means that sometimes there is insufficient precision for the normalization process, which results in values of NaN or infinity. Performing the whole process with doubles prevents that, but games also sometimes set the values to NaN or infinity directly (possibly accidentally due to the values not being initialized due to them not being used in the current configuration?). The version of Mesa currently in use on FifoCI (20.3.5) has issues with NaN. Although this bug has been fixed (https://gitlab.freedesktop.org/mesa/mesa/-/commit/b3f3287eac066eae16dce0e47aad3229dcff8257 in 21.2.0), FifoCI is stuck with the older version. This change may or may not be incorrect, but it should result in the same behavior as already present in Dolphin, while working around the Mesa bug.
2022-06-29VideoCommon: fix projection graphics mod affecting more than the intended ↵iwubcode
draw call
2022-06-27VideoCommon: trigger mod calls in TextureCacheBase (efb/xfb calls), ↵iwubcode
VertexManagerBase (draw calls), and VertexShaderManager (projection calls)
2022-05-25Common: Refactor PointerWrapDentomologist
2022-04-16Implement ImGui window for scissor rectanglesPokechu22
This is mainly for debugging, and is only exposed by manually editing the configuration.
2022-04-16VideoCommon: Rework scissor handlingPokechu22
This increases accuracy, fixing the white rendering in Major Minor's Majestic March. However, the hardware backends can only have one viewport and scissor rectangle at a time, while sometimes multiple are needed to accurately emulate what is happening. If possible, this will need to be fixed later.
2022-04-16VideoCommon: Remove bSupportsOversizedViewportsPokechu22
I think this is a relic of D3D9. D3D11 and D3D12 seem to work fine without it. Plus, ViewportCorrectionMatrix just didn't work correctly (at least with the viewports being generated by the new scissor code).
2022-04-08VertexShaderManager: Use g_ActiveConfig.UseVertexRounding()Pokechu22
2021-12-18VideoCommon: Move VertexLoaderManager logic out of CPStatePokechu22
2021-10-08VideoCommon: update Free Look camera's 'FieldOfView' function to ↵iwubcode
'FieldOfViewMultiplier' to better reflect usage
2021-10-08Core / VideoCommon: refactor FreeLookCamera to have the underlying ↵iwubcode
controller handle all the logic (field-of-view, movement, etc)
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-09Hack to hide debug cubes in Super Mario SunshinePokechu22
... while not breaking other games.
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).
2021-03-06Convert CPMemory to BitField and enum classPokechu22
Additionally, VCacheEnhance has been added to UVAT_group1. According to YAGCD, this field is always 1. TVtxDesc also now has separate low and high fields whose hex values correspond with the proper registers, instead of having one 33-bit value. This change was made in a way that should be backwards-compatible.
2020-12-24VideoCommon: Add 'Active' state to FreelookCamera to future proof if we ever ↵iwubcode
add multiple cameras
2020-12-24Core / VideoCommon: Remove old Free Look configiwubcode
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-17VideoCommon: Migrate over to fmtLioncash
Migrates off the printf-based formatting where applicable.
2020-07-04Merge pull request #8884 from iwubcode/freelook_performance_fixConnor McLaughlin
VertexShaderManager: Only look for freelook config changes if we're using freelook
2020-07-02VertexShaderManager: Avoid accessing freelook control type configuration ↵iwubcode
each call which caused a performance hit, move check to RenderBase where it is checked when config changes
2020-06-25VideoCommon: Use freelook field of view to change the perspective of the cameraiwubcode
2020-06-17VideoCommon: Clean freelook camera dirty state when getting the new viewiwubcode
2020-05-03VideoCommon: remove VertexShaderManager functions instead preferring the ↵iwubcode
direct freelook camera methods
2019-07-10VideoCommon/Statistics: Rename stats global to g_statsLioncash
Makes the global variable follow our convention of prefixing g_ on global variables to make it obvious in surrounding code that it's not a local variable.
2019-06-20VideoCommon/VertexShaderManager: Use std::array where applicableLioncash
We can use this to shorten up the initialization code a little bit. Despite being saved to savestates, this is a non-breaking change.
2019-06-20VideoCommon/Statistics: Use std::array for projection valuesLioncash
Makes the members within the interface much nicer to look at, and also makes copying them over much nicer too.
2019-06-01Common/CommonFuncs: Remove now-unneccessary ArraySize functionLioncash
Since C++17, non-member std::size() is present in the standard library which also operates on regular C arrays. Given that, we can just replace usages of ArraySize with that where applicable. In many cases, we can just change the actual C array ArraySize() was called on into a std::array and just use its .size() member function instead. In some other cases, we can collapse the loops they were used in, into a ranged-for loop, eliminating the need for en explicit bounds query.
2019-04-17VideoCommon: Change free-look's middle-mouse action to roll the camera.Jordan Woyak