summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
AgeCommit message (Collapse)Author
2012-12-10PixelShaderGen: Drop some useless and potentially buggy code.NeoBrainX
Thanks to glennrics for noticing.
2012-12-10Clean up gcc/g++ compiler warnings that have accumulated.Glenn Rice
2012-09-27Revert "Partially revert revision d511b506120c."NeoBrainX
This reverts commit 08e06b22937fa79db165e5a31dfd4ccf67ef57db.
2012-08-10Revert the recent zcomploc changes including the Graphic_Fixes merge.NeoBrainX
Reason: - It's wrong, zcomploc can't be emulated perfectly in HW backends without severely impacting performance. - It provides virtually no advantages over the previous hack while introducing lots of code. - There is a better alternative: If people insist on having some sort of valid zcomploc emulation, I suggest rendering each primitive separately while using a _clean_ dual-pass approach to emulate zcomploc. This reverts commit 0efd4e5c29766ba5f5d22204339637ade9ccec83. This reverts commit b4ec836aca4392a86b864dc58b1030ca616fe0d5. This reverts commit bb4c9e2205d4117f48fd4ca50774ee56c28c92e4. This reverts commit 146b02615c07dd52dddaa18b7e23d09bc23b549e.
2012-08-06Skipped the ZCompLoc pass if the result can be determined at compile time. ↵skidau
Brings back the speed lost by r146b02615c07.
2012-06-29Removed the offset if the ZCompLoc GREATER or LESS function is used. Fixes ↵skidau
the invisible player in THPS3.
2012-06-02Fixed "Failed to compile pixel shader" error when Per-Pixel Lighting is ↵skidau
enabled. Thanks to slmpika for the fix.
2012-05-26Fix compilation errors with g++4.7Pierre Bourdon
2012-05-26Merge rodolfoosvaldobogado's zcomploc code (Graphic_Fixes branch)skidau
2012-04-07Fix compilation with g++ 4.7 and some warnings. Fixes issue 5347.Jordan Woyak
2012-04-03 more fixes. take in account when depth textures are used and alpha test ↵rodolfoosvaldobogado
fails :)( i really forgot that).
2012-04-03Fix for my last commit thanks to Lolaker for pointing the errorrodolfoosvaldobogado
2012-04-03Second Stage: re implement zcomplock and correct all the logic error in ↵rodolfoosvaldobogado
PixelShaderGen.cpp. i disable fastzcomlock for the moment to avoid confusions. please test for regressions
2012-03-30Revert Rodolfo's recent zcomploc commits until they actually work correctly.NeoBrainX
This reverts commit 402006a83a89bc0f790934096e915f0e8c23f808. This reverts commit 48d8d71391fc2cc40d85732680eb6421164bf87c. This reverts commit 450dcc9d2cd874f6ab40d4a339afc29f55751319.
2012-03-29more fixes to zcomplock and opengl implementationrodolfoosvaldobogado
2012-03-27As requested, this is my implementation of zcomploc using a multi-pass ↵rodolfoosvaldobogado
algorithm. My apologize to the others devs for committing in the main branch but is the only way to get this tested as soon as possible. please test for regressions, speed and for other issues fixed, as a example, the black color in water splash in super mario galaxy are fixed with this rev. please as soon as yo find a bug let me know.
2012-03-25long time no commits :)rodolfoosvaldobogado
a little code cleaning to avoid duplicated execution of AlphaPreTest and a little correction to some comments from the previous commits. this change must behave exactly like last revision, if something is broken please let me know
2012-03-24Merge branch 'master' into zcomploc-supportPierre Bourdon
2012-03-24Revert r41bcf657f89d, r3a9fed0ba285, r9adc119e3c2f and re58692653afd (all of ↵NeoBrainX
them are wrong).
2012-03-23Adjusted the DX9 offset of the Sampling address to more closely match what ↵skidau
we are seeing in games. Fixes issue 5305.
2012-03-22Add a comment before the zcomploc test explaining the implementation/hackPierre Bourdon
2012-03-22Merge branch 'master' into zcomploc-supportPierre Bourdon
Conflicts: Source/Core/VideoCommon/Src/PixelShaderGen.cpp
2012-03-22Disabled zcomploc while update_enable has been set in zmode. Fixes zcomploc ↵skidau
in F-Zero GX.
2012-03-03Fix some minor bugs pointed out by PVS Studio (thanks!)Henrik Rydgard
2012-02-21PixelShaderGen: Fix a bug introduced in revision 9adc119e3c2f.NeoBrainX
D3D11: Fix shader constant mapping.
2012-02-20PixelShaderGen: For custom textures and scaled EFB copies, use correct texel ↵NeoBrainX
to pixel mapping when sampling textures (D3D9 only) This is basically the same as revision e58692653afd, just for scaled textures and with a LOT more work...
2012-02-17PixelShaderGen: Use correct texel to pixel mapping when sampling texturesNeoBrainX
(D3D9 only) Fixes issue 2068. Fixes issue 5158.
2011-11-01Revert "Merge branch 'zcomploc-support'"Pierre Bourdon
This reverts commit 9dad9ebe899b4f2c36923c9721a09ff45b4e573c, reversing changes made to e76bc71efe8c3c724e14a2f741fe4f34669d1bea.
2011-10-04Merge branch 'zcomploc-support'Pierre Bourdon
zcomploc is a feature of the BP which switch depth test from before the alpha test to after the alpha test. This way, transparent fragments are written to the depth buffer too. The current implementation is quite hacky and does not cover all cases but is enough to fix problems in a lot of game. A complete implementation would require a multipass rendering method and is attempted in the zcomploc-experimental branch. According to testers feedback, fixes bugs in the following games: - Baten Kaitos - Baten Kaitos Origins - 007: Everything or Nothing - Ty the Tasmanian Tiger - Tony Hawk's Pro Skater 3 And probably other games too. Conflicts (because of new-shadercache-uids): Source/Core/VideoCommon/Src/PixelShaderGen.cpp
2011-09-29Clean up various things.NeoBrainX
2011-09-29Fixup line endings.NeoBrainX
2011-09-29Fix pixel lighting.NeoBrainX
2011-09-10- D3D9: pass the correct API type to ValidatePixelShaderIDsNeoBrainX
- don't load shader cache from disk in d3d9/11 if shader debugging is enabled (we won't have any info about the source shader code otherwise, etc) - dump shader source codes on safe UIDs mismatch Thanks to LordMark and [SS] for reporting those to me ;)
2011-09-09Small fix to the previous commit.NeoBrainX
2011-09-09Improve the shader UID debugging stuff and merge it to VideoCommon, ↵NeoBrainX
effectively enabling it in D3D9 and D3D11 as well.
2011-09-08Merge remote-tracking branch 'remotes/origin/master' into new-shadercache-uidsNeoBrainX
2011-09-08Various fixes and cleanups.NeoBrainX
2011-09-07Track alpha blending paramaters in the pixel shader UID.NeoBrainX
2011-09-07Add runtime checks to make sure we aren't overoptimizing the pixel shader cache.NeoBrainX
2011-09-07Added safe pixel shader UIDs for debugging purposes.NeoBrainX
2011-09-06Fix various pixel shader compilation errors caused by the Direct3D shader ↵NeoBrainX
compiler going nuts due to uninitialized (and unused) shader variables. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7693 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-09-04Include the zcomploc bit in the shader UIDPierre Bourdon
Fixes issues with switching zcomploc on/off during execution.
2011-09-04Proof of concept zcomploc implementationPierre Bourdon
Fixes a few depth related graphics bugs. Example in Baten Kaitos (GKBEAF): Before: http://i.imgur.com/EDdVA.png After: http://i.imgur.com/h6GuY.png Still a few bugs in this implementation: zcomploc switching is not yet implemented, and the color is wrong with this test: http://codepad.org/7GpxklOi (red on Dolphin, gray on Wii).
2011-09-04Clean up a bit the shader code generation for alpha test failsPierre Bourdon
2011-08-31Fix a critical bug which caused shaders to be redundantly recompiled when ↵NeoBrainX
disabling per-pixel depth. As a nice side effect, the number of redundant shader compilations is now next to zero ;)
2011-08-31Replace the pixel shader UID generation algorithm with a better one which ↵NeoBrainX
reduces the number of redundant shader compilations by around 30% (can be optimized even further though). This should help some games which suffer from heavy stuttering like e.g. F-Zero GX or Red Steel 2.
2011-08-31Partially revert revision d511b506120c.NeoBrainX
Slightly slows down emulation, but deobfuscates the pixel shader gen greatly...
2011-08-31Various cleanups and TODOs.NeoBrainX
2011-06-10just a little cleanup to maintain minimal interfacesRodolfo Osvaldo Bogado
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7591 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-06-04Allows DX9 shaders to be SM2 compatible again at the loss of accuracy. SM3 ↵Sonicadvance1
is recommended. Fixes issue 4546. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7585 8ced0084-cf51-0410-be5f-012b33b47a6e