summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexShaderGen.cpp
AgeCommit message (Collapse)Author
2017-02-01ShaderGenCommon: Remove unnecessary includesLioncash
2017-01-13VertexShaderGen: Remove the need for an extra UID.Jules Blok
2016-12-27Update commentsJules Blok
2016-12-27VideoCommon: Don't process the depth range in the vertex shader if it's not ↵Jules Blok
oversized.
2016-10-16VideoCommon: Fix GetInterpolationQualifier callsVincent Duvert
Commit 4969415 modified calls to GetInterpolationQualifier, but mistakenly changed the order of some boolean parameters: GetInterpolationQualifier(true, false) was changed to GetInterpolationQualifier(…, false, true). Should fix #9783.
2016-10-04LightingShader: Drop xfmem usage.degasus
Our shaders must only depend on the UID, not on any global state.
2016-10-01VideoCommon: Add APIType entry for VulkanStenzek
2016-10-01ShaderGen: posmtx should be a 4-component unsigned byteStenzek
This is a global change across backends, so should be tested for regressions.
2016-10-01ShaderGen: Specify attribute/output locations/bindings explicitlyStenzek
This also shifts the SSBO index from index 3 to index 0.
2016-09-01Merge pull request #4164 from Armada651/sonic-clippingJules Blok
VertexShaderGen: Move the sonic epsilon hack to the vertex shader.
2016-09-01VertexShaderGen: Fix D3D X3014 compile errorEmptyChaos
float2 requires 2 parameters in HLSL apparently.
2016-09-01VertexShaderGen: Move the sonic epsilon hack to the vertex shader.Jules Blok
In the vertex shader we have control over the depth clipping planes, so we don't have to offset every floating point value and lose accuracy.
2016-08-31CommentsPreston Smith
2016-08-30Hardware renderer fixPreston Smith
2016-08-16Improve documentation.Jules Blok
2016-08-15Cosmetics.Jules Blok
2016-08-15VertexShaderGen: Fix far clipping.Jules Blok
We should only check whether z > 0, we don't care about w.
2016-08-15VideoCommon: Add a user-defined far clipping plane.Jules Blok
2016-08-15OGL: Check for GL_DEPTH_CLAMP support.Jules Blok
It's not available in OpenGL ES and officially it's not supported on OpenGL 3.0/3.1. Fallback to old depth range code if there is no method to disable depth clipping. It's more important to have correct clipping than to have accurate depth values. Inaccurate depth values can be fixed by slow depth.
2016-08-15VertexShaderGen: Use reversed depth range.Jules Blok
2016-08-15VideoBackends: Enable depth clamping.Jules Blok
2016-08-15VertexShaderGen: Clip z using user-defined clipping planes.Jules Blok
2016-08-15VertexShaderGen: Clamp to the console depth range.Jules Blok
This fixes the Mii Channel among others.
2016-08-15VideoCommon: Implement depth range equation in vertex shader.Jules Blok
2016-07-29VideoCommon: Make API_TYPE an enum classLioncash
Allows for forward declarations in most places, which prevents dumping unrelated VideoCommon.h contents directly into headers.
2016-06-26Multithreadded Shadergen: Second Pass over vertex/lighting ShadergensScott Mansell
As much as possible, the asserts have been moved out of the GetUID function. But there are some places where asserts depend on variables that aren't stored in the shader UID.
2016-06-26Remove global refrences from common code.Scott Mansell
Bug Fix: Previously vertex shaders and geometery shaders didn't track antialaising state in their UIDs, which could cause AA bugs on directx.
2016-06-26Multithreadded Shadergen: First Pass over vertex/lighting ShadergensScott Mansell
The only code which touches xfmem is code which writes directly into uid_data. All the rest now read their parameters out of uid_data. I also simplified the lighting code so it always generated seperate codepaths for alpha and color channels instead of trying to combine them on the off-chance that the same equation works for all 4 channels. As modern (post 2008) GPUs generally don't calcualte all 4 channels in a single vector, this optimisation is pointless. The shader compiler will undo it during the GLSL/HLSL to IR step. Bug Fix: The about optimisation was also broken, applying the color light equation to the alpha light channel instead of the alpha light euqation. But doesn't look like anything trigged this bug.
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2016-03-30ShaderGen: Only specify storage qualifier in interface block when neededStenzek
Drivers that don't support GL_ARB_shading_language_420pack require that the storage qualifier be specified even when inside an interface block. AMD's driver throws a compile error when "centroid in/out" is used within an interface block. Our previous behavior was to include the storage qualifier regardless, but this wasn't working on AMD, therefore we should check for the presence of the extension and include based on this, instead.
2016-03-26Merge pull request #3719 from Sonicadvance1/workaround_osx_video_driversPierre Bourdon
Workaround OS X video driver bug #24983074
2016-03-17Merge pull request #3684 from Sonicadvance1/fix_vertexshadergen_assertsPierre Bourdon
Fix a few asserts in the VertexShaderGen.
2016-03-09Workaround OS X video driver bug #24983074Ryan Houdek
OS X's shader compiler has a bug with interface blocks where interface block members don't properly inherit the layout qualifier from the interface block. Work around this limitation by explicitly stating the layout qualifier on both the interface block and every single member inside of that block.
2016-02-29Remove two more asserts in VertexShaderGen.Ryan Houdek
As confirmed by a hardware test if we are using the texgen type of COLOR_STRGBC0/STRGBC1 then it sets the texture coordinates to those values regardless of what the input form or source row is. Thanks to Ornox for testing again
2016-02-29Confirm with hardware test that the high bit of the input form is ignored.Ryan Houdek
Thanks to Ornox for testing
2016-02-29Fix a few asserts in the VertexShaderGen.Ryan Houdek
Removes a couple asserts in the vertex shader gen when dealing with the input form. Typically input form ABC1 is used, so it'll pull in the first three elements and always set the fourth to 1.0 The other input form available is AB11, which sets the last two components to 1.0 (Theoretically). No titles actually use this input form that we know of except for Project M, but it can have some fairly drastic visual differences. Confirmed correct by hardware test
2016-02-29Revert "Merge pull request #3578 from Armada651/forced-slow-depth"Jules Blok
This reverts commit e2a1a085b6a9f36b23128872de85da727d231882, reversing changes made to 2aea549eef85ba165672c8355d0e90781d805efd.
2016-02-22Merge pull request #3578 from Armada651/forced-slow-depthJules Blok
VideoConfig: Replace FastDepthCalc by ForcedSlowDepth.
2016-02-20VertexShaderGen: turn pseudo-mod into a simple andTillmann Karras
The type of posmtx has changed over time: half -> float -> int. I assume this is supposed to be a modulo.
2016-02-08VideoConfig: Replace FastDepthCalc by ForcedSlowDepth.Jules Blok
Fast depth is now more accurate than slow depth and should always be used. The option will be kept in a different form as it is still used as a hack to fix some games. Also, the slow depth code path will still be relied upon by cards that don't support GL_ARB_clip_control.
2016-01-17VideoCommon: Header cleanupLioncash
Also remedies places where the video backends and core rely on things being indirectly included.
2016-01-02ShaderGen: Remove virtual methods from ShaderGeneratorInterface, move string ↵Stenzek
buffer to ShaderCode This fixes the crashes occuring at startup with a non-empty shader cache. Because LinearDiskCache reads/writes to the storage of ShaderUid, ShaderUid must be trivially copyable. Additionally, adds a static assert to LinearDiskCache to ensure this doesn't happen in the future. The initialization of ShaderUid data has been moved to the code generation functions, so the above condition holds true.
2015-12-28Merge pull request #3400 from lioncash/shadergenMarkus Wick
ShaderGen: Get rid of static buffers
2015-12-26ShaderGenerators: Remove unnecessary inline keywordsLioncash
Static by itself is sufficient
2015-12-26ShaderGeneration: Get rid of static buffersLioncash
2015-12-27Revert "ShaderGen: Toggle value of uninitialized color."Scott Mansell
2015-12-06ShaderGen: Toggle value of uninitialized color.degasus
SMS seems to need 0, no regressions either.
2015-11-03VideoCommon: return code/uid from shader gensTillmann Karras
rather than passing in non-const references
2015-11-01VideoCommon: flush vertex manager if components changeTillmann Karras
2015-10-29ShaderCaches: remove unneeded typedefsTillmann Karras