8dcb05802b
ShaderManagers: Use aggregate initialization for some variables.
...
These provide the same semantics, however aggregate initialization
doesn't force the structs to be trivially copyable. memset, on the other
hand, does.
2016-12-10 17:33:51 -05:00
c9e6b05ce9
Core: Remove double newlines at the end of *_LOG messages.
2016-11-02 02:09:33 +00:00
376cadb862
VertexShaderManager: Explicitly use floating-point variant of abs.
...
Some compilers don't have an automatic abs() overload for floats.
Doesn't really matter if they use the integer variant here, but
it's better to be explicit about the fact that we're using floats.
2016-09-01 17:23:07 +02:00
debaf63fe8
VertexShaderGen: Move the sonic epsilon hack to the vertex shader.
...
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-09-01 01:14:14 +02:00
a8a9348913
OGL: Handle cases where reversed depth is already used.
2016-08-23 15:54:04 +02:00
1392efa91d
VertexManagerBase: Get rid of static behavior
2016-08-21 23:30:38 -04:00
7078216b61
Improve documentation.
2016-08-16 21:09:58 +02:00
4582853af4
VertexShaderGen: Use reversed depth range.
2016-08-15 13:11:26 +02:00
92aa7669b5
VertexShaderManager: Use a more accurate depth range.
...
This fixes the gxtest_depth hwtest.
2016-08-15 13:11:24 +02:00
c223bd47b9
VideoCommon: Implement depth range equation in vertex shader.
2016-08-15 13:11:23 +02:00
7833ff25df
VideoBackends: Merge Initialize and Shutdown functions.
2016-06-26 12:34:59 +02:00
3570c7f03a
Reformat all the things. Have fun with merge conflicts.
2016-06-24 10:43:46 +02:00
51a36f27e0
Merge pull request #3448 from Armada651/depth-epsilon
...
VertexShaderManager: Add an epsilon hack to the perspective projection.
2016-01-18 20:56:18 +01:00
d9fec92628
VideoCommon: Header cleanup
...
Also remedies places where the video backends and core rely on things
being indirectly included.
2016-01-17 20:11:45 -05:00
358e458a93
VertexShaderManager: Add an epsilon hack to the perspective projection.
2016-01-05 01:24:54 +01:00
c52c73f762
VideoCommon: VertexManager -> VertexManagerBase
...
It may be a bit weird to see calls to static functions in
VertexManagerBase now, but at least it's easier to see what's going on.
2015-11-02 11:53:54 +01:00
c756025902
Core: Move a global into a namespace
2015-10-16 22:52:41 -04:00
419fed3952
VertexShaderManager: Get rid of other magic constants
2015-10-15 23:41:42 -04:00
b5b304cff2
VertexShaderManager: Get rid of float pointer casts
2015-10-15 23:34:54 -04:00
8ce04f9a65
General: Replace GC_ALIGN macros with alignas
...
Standard supported alignment -> out with compiler-specific.
2015-09-06 12:53:51 -04:00
0e41b973c7
VertexShaderManager: Remove unused parameter
2015-08-16 21:07:10 -04:00
a1df1f5ae4
Widescreen Heuristic: Cleanup code.
2015-08-01 14:39:34 +12:00
615e5db0cb
Make the GameCube game widescreen heuristic smarter.
...
The last heuristic wasn't quite smart enough and had a few
false positives in Mario Kart: Double Dash and Metroid prime 2.
Now we only activate if the game is rendering a 16:9
projection to a 4:3 viewport.
2015-08-01 13:21:53 +12:00
bb60bcc42d
Heuristic to detect if a gamecube game is rendering 16:9 widescreen.
...
Someone suggested on IRC that we should make a database of memory
locations in GameCube games which contain the 'Widescreen' setting
so we can automatically detect if the game is in 4:3 or 16:9 mode.
But that's hardly optimal, when the game actually tells the gpu
what aspect ratio to render in. 10 min and 6 lines of code later,
this is the result. Not only does it detect the correct aspect ratio
it does so on the fly.
I'm a little suprised nobody thought about doing this before.
2015-07-27 10:40:41 +12:00
30ebb2459e
Set copyright year to when a file was created
2015-05-25 13:22:31 +02:00
cefcb0ace9
Update license headers to GPLv2+
2015-05-25 13:22:31 +02:00
93b16a4a2d
Formatting/Whitespace Cleanup
...
Various fixes to formatting and whitespace
2015-02-25 10:48:21 -05:00
ff4127cf50
VertexShaderManager: Turn the epsilon hack back on for 3D Vision.
...
The bug is fixed in version 347.52 of the drivers.
2015-02-21 12:09:49 +01:00
9cdfe889af
Coding style cleanup from the zfreeze merge
2015-01-24 15:16:48 -05:00
5510c86b81
Move Zfreeze code out individual backends into videoCommon
...
Also:
* Implement support for per-vertex PosMatrixIndex
* Only update zslope constant once when zfreeze is activated.
* Added a bunch of comments.
2015-01-24 03:22:27 +13:00
e88c02dece
Ensure that ZSlopes save/restore state correctly.
...
Had to re-do *ShaderManager so they saved their constant arrays
instead of completly rebuilding them on restore state.
2015-01-23 03:32:31 +13:00
add59b3bea
Fixes Mario Tennis Gimmick Courts and adds support for FastDepthCalc
...
- Calculate ZSlope every flush but only set PixelShader Constant on Reset Buffer when zfreeze
- Fixed another Pixel Shader bug in D3D that was giving me grief
2015-01-23 03:32:31 +13:00
937844b9e3
Initial port of zfreeze branch (3.5-1729)
...
Initial port of original zfreeze branch (3.5-1729) by neobrain into
most recent build of Dolphin.
Makes Rogue Squadron 2 very playable at full speed thanks to recent core
speedups made to Dolphin. Works on DirectX Video plugin only for now.
Enjoy! and Merry Xmas!!
2015-01-23 03:31:54 +13:00
b474c4229d
VertexShaderManager: Turn off the epsilon hack for Nvidia 3D Vision.
2014-12-29 17:05:39 +01:00
b406e4e1f2
VideoCommon: Add a separate constants buffer for the geometry shader.
2014-12-14 21:23:13 +01:00
f00ad2e65c
Merge pull request #1656 from kayru/orthographic_projection_epsilon
...
Moved projection epsilon back to g_fProjectionMatrix[15]
2014-12-05 17:34:50 +01:00
7ba417b73d
Moved projection epsilon back to g_fProjectionMatrix[15], which essentially scales vertices instead of just biasing.
2014-12-05 09:41:41 +01:00
02dae1d1ba
VideoCommon: fix include order
2014-12-04 15:15:16 +01:00
ac22a2184b
Fix building with PCH disabled.
2014-12-03 19:59:47 -06:00
bfc62d2ada
Merge pull request #1366 from kayru/orthographic_projection_epsilon
...
Added projection matrix epsilon that fixes depth clipping issues in some games
2014-12-04 09:10:36 +11:00
a886d8a8ee
Renamed DEPTHPARAMS to PIXELCENTERCORRECTION
...
This shader constant was previously used for depth remapping in D3D and for pixel center correction. Now it only serves one purpose and the new name makes it clear.
2014-11-29 11:42:52 +01:00
6d51455195
VideoConfig: Further optimize convergence and separation values and update their descriptions.
...
Previous convergence distance was much too large.
2014-11-27 16:19:26 +01:00
a04edbcb9a
VideoConfig: Add separation and convergence modifiers to the game ini.
2014-11-24 15:10:52 +01:00
0f4d59f612
VideoConfig: Rename StereoFocalLength to StereoConvergence.
2014-11-24 11:58:38 +01:00
f3ddf37d07
VideoCommon: Switch to Nvidia stereoscopy offset formula.
2014-11-23 14:27:40 +01:00
51a4d6a4be
GeometryShader: Adjust positions after projection.
...
By adjusting the positions in clip space we can avoid the re-projection.
2014-11-23 14:27:40 +01:00
1261bd02ca
VertexShaderManager: Add stereoscopy options to swap the left and right eye.
2014-11-23 14:27:39 +01:00
9b22e15180
VideoConfigDiag: Add stereoscopy options group.
2014-11-23 14:27:38 +01:00
6cacfad010
GeometryShader: Transform the projection within the geometry shader.
...
Reduces the amount of data transferred through uniforms.
The shearing transformation is reduced to a single multiplication/addition for optimization.
2014-11-23 14:27:38 +01:00
f6ea293027
VertexShaderManager: Compute stereoscopy projection matrices.
2014-11-23 14:23:41 +01:00