rogerman
02cd950b02
OpenGL Renderer: In an effort to try and reduce graphical glitches whenever users try to run enhancements that were never native to the NDS to begin with, the texture sampling method is now being forced to clamp for polygons with texture coordinates of either 0.0 or 1.0.
2019-01-17 23:03:52 -08:00
rogerman
0dab5917b6
OpenGL Renderer: Fix a bug where the incorrect buffer would be cleared when trying to clear the Fog attributes buffer while Edge Mark is disabled. Partially addresses #247 . (Regression from commit 21a3fae.)
2019-01-16 16:19:33 -08:00
rogerman
d63ae63d1b
OpenGL Renderer: Fix compiling for non-Cocoa ports. (Regression from commit c9db815.)
2019-01-16 15:46:13 -08:00
rogerman
c9db815171
OpenGL Renderer: Improve the overall reliability of CPU-to-GPU buffer writes, fixing a bug where certain polygons would intermittently flicker in some games. (OpenGL 3.2 only.)
2019-01-16 11:57:36 -08:00
rogerman
7990e6c3f3
OpenGL Renderer: Fix a bug where Fog rendering would fail when used with MSAA. Fixes #246 . (OpenGL 3.2 only. Regression from commit 21a3fae.)
2019-01-15 21:47:50 -08:00
zeromus
6ed5cf8420
winport - fix bug using all available window size when maximizing and fullscreening
2019-01-16 00:10:25 -05:00
rogerman
3dc860b248
Render 3D: Simplify the code a little by removing the working Polygon ID buffer for clear images.
...
- As a collateral improvement, this change also works as a minor optimization for the OpenGL Renderer for games that use clear images.
2019-01-14 16:13:08 -08:00
rogerman
26504031ff
OpenGL Renderer: Partially revert commit 0f045d4
-- don't do the Z adjust in the vertex shader. Apparently, we shouldn't need to explicitly do this in OpenGL, as this adjustment should be automatic. Fixes a graphical glitch that can occur in "Sonic Chronicles: The Dark Brotherhood".
2019-01-14 15:17:13 -08:00
rogerman
0f045d430c
OpenGL Renderer: When rendering the main geometry, adjusts all Z-positions in the vertex shader so that Z is more likely to naturally fall between the depth range of 0.0 and 1.0. Further mitigates the performance cost of using the NDS-Style Depth Calculation option.
2019-01-14 12:08:33 -08:00
zeromus
9b1ce0efc3
add --slot1-no8000prot, fixes #183
2019-01-13 14:51:51 -05:00
rogerman
066366184c
Video Filters: Fix an issue where the internal buffers were not created using a guaranteed alignment, possibly causing a segfault on AVX2-enabled systems. Fixes #245 .
2019-01-11 00:40:16 -08:00
rogerman
f5d90a77c1
GPU: Fix graphical glitch that can occur when frameskip is enabled, running a custom resolution on a multicore CPU system. (Regression from commit abc0649.)
2019-01-10 21:33:16 -08:00
zeromus
605ce35812
winport - restore some tool windows which are minimized, when their menu option is selected
2019-01-10 20:54:31 -05:00
rogerman
4a13a03f46
Windows Port: Fix compiling on 32-bit Windows. (Regression from commit abc0649.)
2019-01-09 23:40:32 -08:00
rogerman
abc0649ad2
GPU: Significantly improve the performance of HD rendering for many 3D games.
...
- Specifically, if the previous frame is determined to draw the entire HD layer directly over the backdrop layer, then the current frame's entire custom framebuffer is asynchronously cleared using line 0's backdrop color since most games will keep the backdrop color constant for all scanlines. Because this is a common rendering case, many 3D games should see a performance improvement when running very large HD framebuffers (8x or higher).
- Also fix a compiling issue for non-SSE2 systems. (Regression from commit 3890431.)
2019-01-09 22:41:42 -08:00
rogerman
3890431154
GPU: Working engine buffers are now set up in advance, asynchronously, starting after line 191.
2019-01-08 23:47:36 -08:00
rogerman
0f87ada863
types.h: Add support for atomic variables.
...
- Also clean up some stuff that doesn't belong in this file.
2019-01-08 17:17:30 -08:00
rogerman
50f42fae55
OpenGL Renderer: More minor shader efficiency tweaks when using the NDS Style Depth Calculation option.
2019-01-06 00:23:17 -08:00
rogerman
85ee9e0ff9
OpenGL Renderer: Fix some interactions between Edge Mark and the Special Zero Alpha Blending option. (Regression from commit 6f8c060.)
...
- Also remove some extraneous stencil buffer clears.
2019-01-05 12:49:16 -08:00
rogerman
40a4b3cdcf
OpenGL Renderer: Do some minor shader efficiency tweaks. (OpenGL 3.2 only.)
2019-01-04 18:48:28 -08:00
rogerman
21a3fae0f3
OpenGL Renderer: Do some minor efficiency, stability, and consistency tweaks.
2019-01-02 01:10:59 -08:00
rogerman
f97c633441
OpenGL Renderer: Okay, let's try using GL_AMD_conservative_depth for those AMD drivers that outright lie about supporting GL_ARB_conservative_depth. (Related to commit 4d6a132
and commit 39f9483.)
2018-12-30 02:12:54 -08:00
rogerman
39f9483034
OpenGL Renderer: Also require GLSL 4.00 when using the GL_ARB_conservative_depth extension. (Related to commit 4d6a132.)
2018-12-30 01:36:54 -08:00
rogerman
4d6a132116
OpenGL Renderer: Mitigate some of the performance penalty of using the NDS Style Depth Calculation option.
...
- GPUs that support the GL_ARB_conservative_depth extension will benefit more from this commit. (OpenGL 3.2 only.)
- Also fix some miscellaneous bugs.
2018-12-29 22:37:37 -08:00
rogerman
0c0bd5144e
Cocoa Port: Do a small optimization when doing video output framebuffer fetches for Metal display views.
2018-12-28 15:39:09 -08:00
rogerman
aeea0ea46a
OpenGL Renderer: Remove the material_6bit_to_float LUT, since we already have an equivalent existing LUT -- divide6bitBy63_LUT.
2018-12-26 22:35:34 -08:00
rogerman
c1357c1451
OpenGL Renderer: Do some minor performance improving tweaks.
...
- Most notably, fix a performance regression where polygon drawing was no longer getting batched due to an incorrect polygon-facing test. (Regression from commit dab414c.)
2018-12-26 19:48:22 -08:00
rogerman
062d9a65a7
Cocoa Port: Do a minor optimization for Metal display views running on macOS v10.13 High Sierra and later.
2018-12-24 21:35:17 -08:00
rogerman
022cf3c702
Cocoa Port: Looks like all macOS versions 10.13 High Sierra and later don't support P-Buffers, so properly handle this error condition and disable the OpenGL 3D renderer when trying to run it without FBOs on these newer macOS versions.
2018-12-22 14:53:19 -08:00
rogerman
7bb438020b
OpenGL Renderer: Fix bug where the OpenGL renderer would completely fail to run if the user's ancient GPU doesn't support shaders. (Regression from commit 7080e21.)
...
- Also do some minor improvements to the code robustness when creating an OpenGLRenderer object.
2018-12-21 16:21:44 -08:00
rogerman
589524823b
OpenGL Renderer: Oops! Finish doing the shader rework started in commit 7080e21
for legacy OpenGL so that it works the way its supposed to. Doing this now fixes legacy OpenGL for (hopefully) all GPU drivers and also allows for all of the same shader optimizations as OpenGL 3.2.
2018-12-18 20:21:18 -08:00
rogerman
d3e4b6010c
OpenGL Renderer: Eliminate the requirement for 66 varying floats in the Fog shader by replacing the varying floats with constants. Also fixes an issue with the geometry shader in legacy OpenGL. (Regressions from commit 7080e21
and commit 37afaef
. Fixes #240.)
2018-12-18 16:47:53 -08:00
zeromus
30212212b5
winport - set PreferredToolArchitecture to x64
2018-12-18 13:53:42 -05:00
rogerman
37afaefa2f
OpenGL Renderer: Replace the accuracy/performance tradeoff "Enable Depth Equals Test Tolerance" with "Enable NDS-Style Depth Calculation", where disabling this option allows the host GPU to natively calculate depth which significantly improves performance in many games.
...
- New Behavior: In addition to emulating the existing Depth Equals Test Tolerance, NDS-Style Depth Calculation accounts for all NDS depth calculations within the fragment shader. Most notably, disabling this option forgoes the W-depth / Z-depth differentiation that the NDS uses, instead preferring the GPU's native Z-depth calculation. Using the GPU's native depth calculation significantly improves performance, but many games use W-depth calculations or are sensitive to subtleties in the Z-depth calculation, and so this option must remain ON by default for compatibility's sake.
- Also fixes a shader initialization issue on the Windows port. (Regression from commit 7080e21.)
2018-12-18 10:50:41 -08:00
rogerman
7080e2156b
OpenGL Renderer: Rework the rendering shaders so that the shader program code is more dynamically generated. This may yield some performance improvement for certain 3D rendering cases, especially when running on lesser GPUs with fewer and/or slower shader execution units.
2018-12-17 16:16:50 -08:00
rogerman
ae8fb2c3bb
GPU: Fix a bug where using VRAM as a display capture source would sometimes cause graphical glitches under certain conditions. (Regression from commit 2c6a5f9.)
2018-12-17 15:33:16 -08:00
zeromus
88d930ce82
winport - fix loading files named things like Splookékrong from commandline, fixes #238
2018-12-15 17:26:28 -05:00
rogerman
7ff5c5eece
Render 3D: Improve the overall rendering accuracy of Edge Mark. Most notably, Edge Mark now properly renders at screen edges. As of now, the current algorithm is as accurate as its ever going to get under our current 3D rendering engine.
2018-12-14 17:08:16 -08:00
rogerman
e6d6f2e10d
Cocoa Port: Fix a bug where clipboard copies and screenshots taken from Metal display views will cause the image to be Y-flipped.
2018-12-14 15:41:05 -08:00
rogerman
2c6a5f9868
GPU: Do some code cleanup of the display capture code.
2018-12-12 18:34:47 -08:00
zeromus
e604631413
winport - fix things named like Blorkénflarge in the recent roms menu ( #238 )
2018-12-12 15:50:52 -05:00
rogerman
8c2379f6f8
Firmware: Fix various endianness issues. Most importantly, this fixes a bug with touch input not working correctly on big-endian systems. (Regression from commit bb38022.)
2018-12-12 02:49:44 -08:00
rogerman
471f53e506
Cocoa Port: Fix various issues on the PPC build.
...
- Fix compiling issues for big-endian systems.
- Fix bug where the Recent ROMs menu and also launching the app while loading a ROM file would fail to load the ROM on macOS v10.5 Leopard.
- Fix bug where GPU main memory display mode would show incorrect pixels on big-endian systems when running at 15-bit color depth.
- As an unintended collateral improvement, GPUEngineA::_HandleDisplayModeMainMemory() now has SSE2-accelerated versions for 18-bit and 24-bit color depths. This was done less for its performance benefit (main memory display mode is an extremely rare feature) and more for better code consistency and code completeness.
2018-12-11 17:45:36 -08:00
zeromus
e56059872f
winport - fix loading games named things like "Yokémorp". It was probably only open through drag and drop.
...
Probably broke japanese. If I did, write a bug so I can fix japanese and break latin characters again.
2018-12-11 18:20:39 -05:00
zeromus
b5477b608b
Merge pull request #236 from NetwideRogue/master
...
don't clobber existing screenshots
2018-12-06 08:08:40 -06:00
Declan Hoare
a3eebbac21
don't clobber existing screenshots
2018-12-06 23:59:18 +11:00
rogerman
35e834ff2c
GFX3D: Revert the polygon sorting code back to its original state, which should result in a minor performance improvement for high polygon-count scenes.
...
- After years of testing, no one has reported running into the assert in gfx3d_ysort_compare() so I think we should be safe in reverting std::stable_sort() back to std::sort().
- For the sorting function, use gfx3d_ysort_compare_orig() since this function compiles down to fewer instructions than gfx3d_ysort_compare_kalven() does, resulting in better sorting performance.
- Of note, I'm pretty sure that SF commit r5132 is what fixed the original bug (see SF#1461 for more details) by getting rid of the NaN comparisons that were tripping up std::sort(). In the future, we should research why we're dividing by 0 in the first place, since r5132 is clearly a hack of a fix.
2018-12-05 14:37:33 -08:00
zeromus
d80a84b762
Merge pull request #207 from cosmo-ray/fix-linux-gcc8.2-warnings
...
Fix gcc8.2 warnings on linux
2018-12-05 14:10:52 -06:00
zeromus
9ea1b5cbda
Merge pull request #223 from intact/gtk-fix-screenshot-path
...
Gtk+ Port: Use Desktop or Home as fallback directory for screenshots
2018-12-05 14:10:42 -06:00
rogerman
355e4a0fb4
OpenGL Renderer: Remove a now defunct framebuffer texture, significantly reducing VRAM usage at the higher resolutions.
2018-12-04 21:49:09 -08:00