Commit graph

88 commits

Author SHA1 Message Date
degasus
ff889c0e65 use attrib pointers in nativeVertexFormat 2013-01-14 22:59:08 +01:00
degasus
b38b62afc6 remove glsl binding support. convert every shader to version 130 2013-01-02 16:56:08 +01:00
degasus
48ede4dd30 switch to glsl 130, more than OpenGL 3.1 isn't needed 2012-12-28 16:05:14 +01:00
Ryan Houdek
7d93834cd8 Bit more cleanup from removing Nvidia CG 2012-12-27 22:53:07 -06:00
degasus
85ac76e8e2 fix gcc compilation 2012-12-19 23:42:22 +01:00
Ryan Houdek
3f0d7312fa A couple missed lines on the rebase. 2012-10-13 12:43:00 -05:00
Ryan Houdek
10666a9b87 More 'stuff' 2012-10-09 23:56:00 -05:00
Ryan Houdek
eb7a0c485a More "stuff" for SS, also a small fix in the program shader cache cache setup." 2012-10-09 23:56:00 -05:00
Ryan Houdek
71f6b1eec6 Change 'stuff' 2012-10-09 23:56:00 -05:00
Shawn Hoffman
31a8424bcc fix formatting uglies introduced in glsl-master branch 2012-10-09 23:54:17 -05:00
Ryan Houdek
9996f27120 Give OSX users more of a chance of supporting Single pass DSB in the future. 2012-10-09 23:42:41 -05:00
Ryan Houdek
5bcbf92f43 Make sure to support everything even if GPU doesn't. 2012-10-09 23:41:06 -05:00
Ryan Houdek
d4a80ca3ec yay, UBOs work 100% now. 2012-10-09 23:41:05 -05:00
Ryan Houdek
1f75ee49bf 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. 2012-10-09 23:41:05 -05:00
Ryan Houdek
b105d70339 Firin ma lazer 2012-10-09 23:41:05 -05:00
Ryan Houdek
c82b92bfc2 Fix one error. 2012-10-09 23:41:05 -05:00
Ryan Houdek
2fbca145cb Remove bSupportsGLSLLocation since it won't work how I expect it. 2012-10-09 23:41:05 -05:00
Ryan Houdek
4a84c6f742 Add in UBOs, doesn't work yet. Still debugging here. 2012-10-09 23:41:05 -05:00
Ryan Houdek
76e5766a1b Put Vertex Uniforms in to the correct places to get ready for UBOs. 2012-10-09 23:41:04 -05:00
Ryan Houdek
eff019442f Playing through SSBM story made me find this. 2012-10-09 23:37:52 -05:00
Ryan Houdek
b24990ca28 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. 2012-10-09 23:37:52 -05:00
Ryan Houdek
cf68cc0c61 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. 2012-10-09 23:37:52 -05:00
Ryan Houdek
7cec31dbf3 Almost there. 2012-10-09 23:33:02 -05:00
Ryan Houdek
0fc755c4df More stuff 2012-10-09 23:31:31 -05:00
Ryan Houdek
3943840d5c Now CG plays nice with this new stuff. 2012-10-09 23:27:59 -05:00
Ryan Houdek
a357c77257 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).
2012-10-09 23:23:37 -05:00
Jordan Woyak
722480cb2e Fix compilation with g++ 4.7 and some warnings. Fixes issue 5347. 2012-04-07 15:45:32 -05:00
NeoBrainX
7a1744575d D3D9: Fix texel to pixel mapping when sampling textures properly. 2012-03-24 17:23:03 +01: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
231c13d6ce Added safe vertex shader UIDs for debugging purposes. 2011-09-07 21:03:10 +02:00
NeoBrainX
bcb8d11c1b Reduced the number of redundant vertex shader compilations (possibly to zero).
That one was almost too easy ;P
2011-08-31 20:46:03 +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
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
Nolan Check
7c536b8f15 DX11: Support thick lines and large points with geometry shaders. Lines still aren't drawn with correct thickness, see Twilight Princess map. But the map corners are drawn with correct shadow "blobs" for the first time!
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7340 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-14 09:38:29 +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
fec3daf713 Create valid vertex shader when using emboss mapping and binormals and tangents are missing. Fixes issue 2867.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6944 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-28 04:13:46 +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
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
donkopunchstania
f91ac92895 Change comparison in specular light function. Fixes issue 1258.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6505 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-01 04:50:25 +00:00
pierre
91036ae160 Slightly adjust z-values calculated in the vertex shader so OGL does not clip the
final rendering of (at least) Sonic Unleashed.

This should be (nearly) invisible in Z16 depth copies and in games, but there is
some chance that it collides with other such border cases. There probably is some
room to decrease the adjustment but 9999999/10000000 is not enough. A static offset 
may be an option, too. I don't know if the game can/does set something like that.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6225 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-23 19:38:49 +00:00
Rodolfo Osvaldo Bogado
e641323de2 i know still a lot to fix and much work to do but sometimes experiments are fun :)
for all the plugins implemented per pixel lighting, this will make games that uses lighting  a lot nice. (just look at mario sunshine and compare :))
for dx9: implemented temporal anaglyph stereo: just grab your red-cyan glasses  and enjoy.
stereo calibration: use stereo separation ( distance of the point from you are looking) and Focal Angle: the angle necessary to focus in one particular object.
this settings are different in every games as they use different depth ranges.
please for any regression and bug introduced by this commit.
if you ask why i did not implement stereo in dx11 and opengl the reason is one: they don't work right when i have more time will try to find a way to make them work.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6224 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-09-23 02:17:48 +00:00
Soren Jorvang
1d05290be7 Include "Hash.h" rather than "hash.h" for case-sensitive file systems.
Fix some compiler warnings.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6141 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-28 15:53:01 +00:00
Rodolfo Osvaldo Bogado
9b0357b5e2 sometimes to advance you have to make a step back.
use plain vertex arrays instead of VBOs to render in Opengl plugin as the nature of the data make VBOs slower. This must bring, depending on the implementation, a good speedup in opengl.
in my system now opengl and d3d9 have a difference of 1 to 5 fps depending of the game.
some cleanup and a little work pointing to future improvements in the way of rendering.
please test and check for any errors.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6139 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-28 15:09:42 +00:00
Rodolfo Osvaldo Bogado
8e4df07353 sorry for the last one, please test this one :)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6125 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-25 11:18:46 +00:00