Commit Graph

137 Commits

Author SHA1 Message Date
Ryan Houdek c72a244809 Make sure to support everything even if GPU doesn't. 2011-12-10 14:35:37 -06:00
Ryan Houdek 5925feb6e0 yay, UBOs work 100% now. 2011-12-10 08:07:13 -06:00
Ryan Houdek 7ab38cff68 UBO works for Pixel Shaders if Binding for UBO is zero, otherwise fails. Probably why Vertex shader UBO is failing. Too tired to investigate right now. 2011-12-10 07:38:30 -06:00
Ryan Houdek 126dfa073b Firin ma lazer 2011-12-10 01:56:37 -06:00
Ryan Houdek 54a90d08ce Fix one error. 2011-12-09 21:15:15 -06:00
Ryan Houdek e8087aa1a9 Remove bSupportsGLSLLocation since it won't work how I expect it. 2011-12-09 19:14:02 -06:00
Ryan Houdek 8e5bb59cb6 Add in UBOs, doesn't work yet. Still debugging here. 2011-12-09 17:30:05 -06:00
Ryan Houdek c89c484dd0 Few compiler errors that got exposed once I got Dual Source Blending working. Seems it isn't working quite 100% either. Good chance I missed something anyway. 2011-12-08 05:32:17 -06:00
Ryan Houdek 0ccba2b581 Support Dual Source Blending in OGL plugin with GLSL. 2011-12-08 05:09:48 -06:00
Ryan Houdek cecc3c3873 Bit of cleanup. Clean up my massive hack in the ShaderManagerFiles. Almost feature parity with Nvidia CG now I think. Just need to do Alpha test with Dual source blending now. 2011-12-08 03:20:31 -06:00
Ryan Houdek 1201988fe4 Add support for GL_ARB_shading_language_420pack so we don't have to binding sampler locations. Also add support for GL_ARB_separate_shader_objects which doesn't currently work for some reason....investigating. 2011-12-08 01:51:08 -06:00
Ryan Houdek bf4ef054d3 Shader Compile fixes. Played SMS for two shines. 2011-12-07 22:47:13 -06:00
Ryan Houdek 33c24f0a15 Almost there. 2011-12-07 22:04:34 -06:00
Ryan Houdek 804938e9fc More stuff 2011-12-02 20:17:26 -06:00
Ryan Houdek b20176b74f Add in GLSL setting again.
PS and VS making. Untested and won't work for now.

Add in program shader cache files.

Readd NativeVertexFormat stuffs.

Add in PS and VS cache things.

SetShaders in places.

Fixed EFB cache index computations in OpenGL renderer.

The previous computation was very likely to go out of array bounds,
which could result in crashes on EFB access.

Also, the cache size was rounded down instead of up. This is a problem
since EFB_HEIGHT (528) is not a multiple of EFB_CACHE_RECT_SIZE (64).
2011-11-30 22:02:25 -06:00
Pierre Bourdon 8f31968466 Revert "Merge branch 'zcomploc-support'"
This reverts commit 9dad9ebe89, reversing
changes made to e76bc71efe.
2011-11-01 01:37:54 +01:00
Pierre Bourdon 9dad9ebe89 Merge branch 'zcomploc-support'
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-10-04 07:56:13 +02:00
NeoBrainX 81c614fa07 Clean up various things. 2011-09-29 23:32:39 +02:00
NeoBrainX ddfe219293 Fixup line endings. 2011-09-29 23:32:39 +02:00
NeoBrainX ca7e8a9e88 Fix pixel lighting. 2011-09-29 23:32:39 +02:00
NeoBrainX 5d075ce507 - D3D9: pass the correct API type to ValidatePixelShaderIDs
- 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-10 03:10:28 +02:00
NeoBrainX a021dd7b79 Small fix to the previous commit. 2011-09-09 21:45:11 +02:00
NeoBrainX b28348066e Improve the shader UID debugging stuff and merge it to VideoCommon, effectively enabling it in D3D9 and D3D11 as well. 2011-09-09 00:32:04 +02:00
NeoBrainX 349a3ae91d Merge remote-tracking branch 'remotes/origin/master' into new-shadercache-uids 2011-09-08 02:14:18 +02:00
NeoBrainX 6c7bda6851 Various fixes and cleanups. 2011-09-08 02:09:44 +02:00
NeoBrainX 98b62d8362 Track alpha blending paramaters in the pixel shader UID. 2011-09-07 21:15:14 +02:00
NeoBrainX 3939f9595a Add runtime checks to make sure we aren't overoptimizing the pixel shader cache. 2011-09-07 21:15:09 +02:00
NeoBrainX 4702de591e Added safe pixel shader UIDs for debugging purposes. 2011-09-07 21:10:06 +02:00
NeoBrainX df4e337ac9 Fix various pixel shader compilation errors caused by the Direct3D shader 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-06 18:37:01 +02:00
Pierre Bourdon d3ecf98213 Include the zcomploc bit in the shader UID
Fixes issues with switching zcomploc on/off during execution.
2011-09-04 05:38:32 +02:00
Pierre Bourdon 0bdf8646f0 Proof of concept zcomploc implementation
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-04 05:08:09 +02:00
Pierre Bourdon d710eda0c5 Clean up a bit the shader code generation for alpha test fails 2011-09-04 04:44:50 +02:00
NeoBrainX 4137f287fd Fix a critical bug which caused shaders to be redundantly recompiled when disabling per-pixel depth.
As a nice side effect, the number of redundant shader compilations is now next to zero ;)
2011-08-31 19:45:28 +02:00
NeoBrainX 7f01139d13 Replace the pixel shader UID generation algorithm with a better one which 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-31 18:03:33 +02:00
NeoBrainX 08e06b2293 Partially revert revision d511b50612.
Slightly slows down emulation, but deobfuscates the pixel shader gen greatly...
2011-08-31 16:09:54 +02:00
NeoBrainX 8a17e15943 Various cleanups and TODOs. 2011-08-31 16:09:46 +02:00
Rodolfo Osvaldo Bogado e5210de9d5 just a little cleanup to maintain minimal interfaces
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7591 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-06-10 19:16:09 +00:00
Sonicadvance1 db0c2bca5b Allows DX9 shaders to be SM2 compatible again at the loss of accuracy. SM3 is recommended. Fixes issue 4546.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7585 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-06-04 19:56:18 +00:00
skidau 4079523346 Game-specific video settings:
* Moved the config validity check to reflect the emulator enforced settings at the config dialog
* Removed some obsolete validity checks
* Corrected "EnablePixelLighting" typo in the ini files

Fixes issue 4277.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7374 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-19 00:50:34 +00:00
donkopunchstania 35edf1b236 Split shader code generation for lighting into a separate file.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7088 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-02-05 23:57:12 +00:00
donkopunchstania c36ed08cfc Rework XF register loading a bit and change how registers are arranged in memory. This removes the assumption that all data for a viewport or projection matrix will be available when index 0 is loaded. Fixes issue 3688 and probably breaks old save states (sorry).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7083 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-02-05 18:25:34 +00:00
donkopunchstania d5e5730fef If perspective divide is enabled and texture coordinate Z is 0 then leave texture coordinates alone. Fixes issue 3676.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6964 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-29 08:34:57 +00:00
Rodolfo Osvaldo Bogado 4c58c7ea03 initial implementation of fog range adjust, I don't think is correct or work right but is a start.
some tweaks and fixes.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6957 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-29 04:31:56 +00:00
Soren Jorvang 955e3abe9e Clean out the long since bit-rotted video profiling code.
Profiler.{cpp,h} also happened to be the only dupliated
filenames left in Source, the absence of which should make
link-time optimization easier to get working.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6935 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-27 21:57:36 +00:00
Rodolfo Osvaldo Bogado 4c704be0ed second try, a compilable :) fix for issue 3976 and some optimizations to color loading that will not mess with colors.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6917 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-25 22:30:15 +00:00
Shawn Hoffman efa9e81ca0 buildfix
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6912 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-25 05:57:49 +00:00
Rodolfo Osvaldo Bogado 4c47fd0d49 revert my optimizations until i fix some errors and really fix issue 3976
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6911 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-25 03:45:44 +00:00
Rodolfo Osvaldo Bogado 470ed118f5 little fix for issue 3976.
some optimization for vertex color loading, please test  for any change in game color, this is a optimization so nothing should change :)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6908 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-24 21:26:39 +00:00
Rodolfo Osvaldo Bogado d47d2a05d2 some little optimizations and some cleaning.
now lighting should be fully functional again in SM 2.0 cards

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6794 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-09 14:13:24 +00:00
Rodolfo Osvaldo Bogado 9d30d1348e fix Issue 3539
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6622 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-19 22:24:19 +00:00