1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00
Commit Graph

2284 Commits

Author SHA1 Message Date
oddMLan
2dc2810408 [GLideN64-wtl] Move util.h to util/util.h 2020-07-17 21:44:08 +07:00
S2S
d13a3d7890 Perform hdRatio division with floating point precision. Allows non-integer scaled HD textures, but their use is discouraged. 2020-07-17 20:26:32 +07:00
S2S
65ad89ae3a Delay texcoord correction until multiplying by hdratio 2020-07-17 20:26:32 +07:00
Sergey Lipskiy
2f5280c8ac Correct texture filters in rendering frame buffer to main color buffer. 2020-07-01 22:01:14 +07:00
Sergey Lipskiy
5907cff6c7 FrameBufferList::renderBuffer(): fix dstScaleX when overscan enabled in native-res mode. 2020-07-01 21:59:51 +07:00
Sergey Lipskiy
30e7b83e43 Correct GraphicsDrawer::_updateScreenCoordsViewport
Fixed starcraft intro movie in OnePiece bg mode.
2020-06-28 18:22:21 +07:00
Sergey Lipskiy
80b219effa Correct vertex Z calculation in GraphicsDrawer::_drawThickLine
Note: viewport transformation of Z coordinate performed in fragment shader.

Fixed #2237 Mario Artist - Polygon Studio: line3D bug (HLE)
2020-06-28 17:36:20 +07:00
Sergey Lipskiy
1b36d5740b Debug dump cmd in LLE mode. 2020-06-28 11:06:37 +07:00
Sergey Lipskiy
7b6e304d84 Fix OSD info in fullscreen mode.
It was broken by commit 156171be.
2020-06-25 16:30:11 +07:00
Sergey Lipskiy
0a755614a0 Correct UTextureEngine::update() for background textures.
Fixed #2251 Zelda: OnePiece backgrounds broken
2020-06-21 18:15:53 +07:00
oddMLan
cbc0dfd90e Toggle AA state like Qt GUI 2020-06-16 16:59:44 +07:00
oddMLan
9bf9202c47 Fix profile load when GLideN64.ini doesn't exist The logic looked incorrect here, but Qt loaded the profile correctly somehow. I tested this change and it doesn't change anything in the Qt version (which is good) 2020-06-16 16:59:44 +07:00
oddMLan
d00cf9f214 Fix profile load when GLideN64.ini doesn't exist 2020-06-16 16:59:44 +07:00
oddMLan
32dbfe1d1f Language: Escape quotes 2020-06-16 16:59:43 +07:00
oddMLan
91287c2e4c Reload config on SaveSettings 2020-06-16 16:59:43 +07:00
oddMLan
71afc19427 Separate "Dump" and "Reload" options Continuation of commit 7228d0d5db 2020-06-16 16:59:43 +07:00
Sergey Lipskiy
f7b6f158b3 Up shader storage version. 2020-06-16 16:59:43 +07:00
Sergey Lipskiy
0c5d036395 Correct _calculateCRC:
calculated texture size in bytes can be too large to fit TMEM.
It leads to out-of-bounds reads in checksum calculations and thus random checksum.
Example:

Fixed Unplayable performance with any kind of texture enhancement. #2279
2020-06-16 16:57:47 +07:00
Sergey Lipskiy
7228d0d5db Separate "Dump" and "Reload" options. 2020-06-14 15:52:09 +07:00
Sergey Lipskiy
156171bebd Set viewport in TextDrawer::drawText
Fixed text messages not shown in some games.
2020-06-14 15:52:05 +07:00
Sergey Lipskiy
ed1648c438 Disable dual blending in Texrect Drawer Mode. 2020-06-14 11:51:33 +07:00
S2S
c48841cfeb Implement dual source blending.
Fixes Donkey Kong 64: Gate textures change from a distance. #585
Fixes Pokemon Stadium wrong transparency in warning sign #728
2020-06-14 11:51:33 +07:00
S2S
3df3df9964 Make glBlendFuncSeparate() available 2020-06-14 11:51:33 +07:00
paradadf
4c8a40c6d8 Fix type cast error for 64bit compilation
RSP_LoadMatrixX86.cpp:92:28: error: cast from 'u8* {aka unsigned char*}' to 'int' loses precision [-fpermissive]
2020-06-14 11:50:57 +07:00
M4xw
4f58d66e96 Fix regressions in GLES 2.0 support introduced by a405ad8
- IOS compiler also doesn't like the vec2 as return Type, thus it's made a out param
2020-05-31 21:07:48 +07:00
S2S
46d170e5fb Fix error introduced by c14ae30 2020-05-19 11:51:13 +07:00
S2S
c14ae30c6d Fix out of bounds texel fetch. Remove Mario Tennis workaround. 2020-05-17 20:39:47 +07:00
Sergey Lipskiy
4974f64a56 Correct precision in shaders. Follow up 1a9d37053 2020-05-13 09:32:20 +07:00
S2S
1a9d370530 fix floating point precision issue 2020-05-13 09:21:53 +07:00
Sergey Lipskiy
499ba7dc1a Set inverted Y to false for Vivid Dolls microcode.
Fixed #2238 vivid dolls: upside down gfx (HLE)
2020-05-12 18:03:41 +07:00
S2S
f5ee3523ef Fix out of bounds texel fetch issues.
Fixes #2257 Dark Rift background issue
2020-05-12 10:44:54 +07:00
Sergey Lipskiy
2616ba9587 Code cleanup. 2020-05-11 18:17:46 +07:00
Sergey Lipskiy
be2f2244a2 Correct UTextureEngine::Update for special textures.
Fixed #2258 space silicon valley: first screen does not show
2020-05-11 17:48:18 +07:00
Sergey Lipskiy
edf5f9ac30 Fix load of 16bit RGBA textures when TLUT mode is TT_IA16
Fixed #2218 Taz express: little bug
2020-05-10 20:14:53 +07:00
Sergey Lipskiy
b505d29838 [Debugger] Fix textures display. 2020-05-10 19:34:21 +07:00
Sergey Lipskiy
3f9911ab9d Up shader storage version.
Fix some compilation warnings.
2020-05-10 16:40:20 +07:00
S2S
bb2221d55f Preliminary GLES2 implementation 2020-05-10 16:24:29 +07:00
S2S
d3720145e3 Add workaround for issue with Mario Tennis Intro 2020-05-10 16:24:29 +07:00
S2S
4834359ec1 Delay texture coordinate normalization. Adapt texture filter to texture engine. 2020-05-10 16:24:28 +07:00
S2S
a405ad8659 Create Texture Engine unit 2020-05-10 16:22:36 +07:00
Sergey Lipskiy
a140f0a989 Disable cull_face in GraphicsDrawer::drawScreenSpaceTriangle
It was removed by mistake in 0bc6cf7a11

Fixed #2251 Zelda: OnePiece backgrounds broken
2020-05-10 15:56:47 +07:00
zilmar
5f816d2a3d GLideNUI-wtl: fix read game prilfe setting in init 2020-05-10 15:56:44 +07:00
zilmar
64c7af548a GLideNUI-wtl: OnFullScreenChanged selects the last refresh rate, manually add refresh rates and select the correct one 2020-05-10 15:56:41 +07:00
Sergey Lipskiy
af906c8419 Use FILTER_NEAREST if enableHybridFilter is disabled
follow up ee0de5e66ce
2020-05-10 15:56:38 +07:00
oddMLan
4532209d43 Use FILTER_NEAREST if enableHybridFilter is disabled
Bilinear by itself looks ugly and it's only necessary to use it for the hybrid filter
2020-05-10 15:56:36 +07:00
oddMLan
d62a653e83 Replace if statements in hybridFilter
if statements are bad for performance in GLSL
2020-05-10 15:56:33 +07:00
oddMLan
2b42e02e69 Fix shader compilation errors in GLSL ES
-Added missing precisions
-Removed explicit floats
-Explicit cast get_texture_size to vec2
2020-05-10 15:56:30 +07:00
oddMLan
8b5509bb8f GLideNUI-wtl: Implement hiding MSAA Depth Warning 2020-05-10 15:56:25 +07:00
oddMLan
591d5d586d GLideNUI-wtl: Fix Fbinfo 2020-05-10 15:56:20 +07:00
oddMLan
c43cee1c03 GLideNUI-wtl: Focus Save and Close button
This makes it so you can press enter to save
2020-05-10 15:56:17 +07:00
Sergey Lipskiy
1cfdb4787d Use hybrid filter for upscale buffer copy and plain bilinear filter for downscale one.
Related to PR #2242
2020-05-10 15:56:09 +07:00
oddMLan
438bcc460f Update Hybrid Shader
This version doesn't use texel_fetch, hopefully fixes any slowdowns in mobile devices.
Also it offloads the bilinear filtering to the hardware.
2020-05-05 11:56:02 +07:00
Sergey Lipskiy
03b404bd4e Use noperspective shade color only for triangles with screen-space coordinates.
noperspective works incorrect for polygons, which are partially out of view.

Fixed #2240 SM64 strange green textures
2020-05-04 20:20:58 +07:00
Sergey Lipskiy
d494806186 Revert "Rewrite fog coordinate calculation:"
This reverts commit 7d4d0f282e.
2020-05-04 19:47:57 +07:00
Sergey Lipskiy
7d4d0f282e Rewrite fog coordinate calculation:
move it from vertex shaders to fragment ones.

Fixed #2234 SM64 Weird Shading on sand texture in Joly Roger Bay
2020-05-03 18:41:20 +07:00
Sergey Lipskiy
87274437cb [Debugger] Fix display of vertex alpha in HLE mode. 2020-05-03 15:14:25 +07:00
Sergey Lipskiy
c8cbafff71 Use the second color section of the Light structure for vertices with odd index (1, 3, ...).
Both color sections of the Light structure must store the same color,
but it is not so for SM64.

Fixed #2212 SM64 koopa's shorts are not correct in hle
2020-05-03 12:10:09 +07:00
zilmar
f525f8fdc0 GLideNUI-wtl: Return current font if fonts are not selected 2020-04-30 18:06:03 +07:00
zilmar
4750a268ae GLideNUI-wtl: Set config.font.name to arial if empty on load 2020-04-30 18:06:03 +07:00
zilmar
3acf3b6f75 Make sure config.font.name is not empty 2020-04-30 18:06:03 +07:00
zilmar
e692509f6e Reset g_face and g_ft 2020-04-30 18:06:03 +07:00
zilmar
47013e2473 Set buffer to nullptr after free 2020-04-28 15:50:37 +07:00
Sergey Lipskiy
a3af1a88e2 Correct LLETriangle ctor 2020-04-27 17:05:43 +07:00
Sergey Lipskiy
415cde8c52 LLETriangle: use m_flushed flag properly. 2020-04-27 17:05:43 +07:00
Sergey Lipskiy
acaa0d9fba Correct LLETriangle::start - set gSP.texture.tile to tile set for the triangle.
It is necessary since texture loading code uses gSP.texture.tile.

Fixed textures load in Supercross 2000.
2020-04-27 17:05:43 +07:00
Sergey Lipskiy
5b765ba874 LLETriangle : force flush triangles if tile is changed.
Fixed wrong textures is C&C intro.
2020-04-27 17:05:43 +07:00
Sergey Lipskiy
e3f0354565 LLETriangle::draw: correct Z for G_ZS_PRIM mode. 2020-04-27 17:05:43 +07:00
Sergey Lipskiy
0d0c47fb84 Replace doubles by 32bit floats in LLETriangle::draw. 2020-04-27 17:05:42 +07:00
Sergey Lipskiy
1d5fdf123e LLE triangle: set vertex depth to 0 when triangle command does not use depth.
Fixed depth compare issue with snow in Polaris SnoCross
2020-04-27 17:05:42 +07:00
Sergey Lipskiy
0bc6cf7a11 New LLE render. 2020-04-27 17:05:42 +07:00
oddMLan
84e92d1240 GLideNUI-wtl: Fix MSAA saving and Dithering checkboxes 2020-04-27 17:05:09 +07:00
oddMLan
01a1e05432 GLideNUI-wtl: Fix save to custom ini 2020-04-27 17:05:09 +07:00
zilmar
115399aa4b GLideNUI-wtl: Do not flush on each change, so turn off auto flush 2020-04-27 11:48:51 +07:00
zilmar
29bd0d10ab GLideNUI-wtl: Save to custom.ini 2020-04-27 11:41:26 +07:00
zilmar
bc69499b62 GLideNUI-wtl: fix white space 2020-04-27 11:41:15 +07:00
zilmar
bea0403d2c GLideNUI-wtl: Make sure clearing of selected font on load 2020-04-27 11:41:15 +07:00
zilmar
1934062d65 GLideNUI-wtl: in loading language, replacing new line was only replacing \ 2020-04-27 11:27:53 +07:00
oddMLan
0d68c25143 GLideNUI-wtl: Fix a couple oversights 2020-04-27 09:32:31 +07:00
oddMLan
3dc78e8852 GLideN64-wtl: Fix MSAA 2020-04-27 09:32:31 +07:00
oddMLan
93659a2207 GLideNUI-wtl: Fix windowed resolution handling 2020-04-27 09:32:31 +07:00
oddMLan
f326715bf8 Update project files
-Added N64PluginsDir-wtl and N64PluginsDir-wtl_x64 environment variables for zilmar-spec-wtl
-Updated appveyor.yml to support wtl configurations
 -Split artifacts into individual 7z files for each configuration instead of a single archive holding them all together
-Move icons to Resources folder to avoid duplicate assets
 -Updated icon.qrc
 -Updated GLideNUI.rc
-Update GLideN64.sln
 -Fix very serious overlook in x64 builds

This should fix AppVeyor issues
Use variable names from 3fe5f50
2020-04-25 23:26:17 +07:00
oddMLan
a97b387c68 GLideN64-wtl: Add English entry to Language combobox when translation file list is empty 2020-04-25 23:26:17 +07:00
oddMLan
311433749c GlideNUI-wtl: Increase Tooltip delay 2020-04-22 21:14:17 +07:00
oddMLan
4f5963b2f2 GLideNUI-wtl: Fix mistakes in translation files 2020-04-22 21:14:17 +07:00
oddMLan
29e0da3eb6 GLideNUI-wtl: Lazy load Fonts treeview of OSD tab
Speeds up dialog creation a little bit.
Fix bug in which creating a new profile would give a font with zeroed parameters
2020-04-22 21:14:17 +07:00
zilmar
b0cf0ede8e GLideNUI-wtl: Move overscan control to top because it was not being displayed 2020-04-22 21:14:17 +07:00
oddMLan
d153645b11 GLideNUI: Hide Debug tab in Release builds 2020-04-22 21:14:17 +07:00
oddMLan
af1ed549f4 GLideNUI: Add custom windowed resolution by editable combobox
Also fixed bug in which switching profiles would cause the Windowed resolution list to load more than once.
2020-04-22 21:14:17 +07:00
zilmar
5caa533580 GLideNUI-wtl: Change spaces to tabs 2020-04-22 21:14:16 +07:00
zilmar
5a1569f7bc GLideNUI-wtl: Add translation to about 2020-04-22 21:14:16 +07:00
zilmar
c7049dad42 GlideNUI-wtl: Add debug tab language 2020-04-22 21:14:16 +07:00
zilmar
d83a06a75e GlideNUI-wtl: Add On-screen display tab 2020-04-22 21:14:16 +07:00
zilmar
ba7a84c2d1 GLideNUI-wtl: Add language for texture tab 2020-04-22 21:14:16 +07:00
zilmar
e2bb100244 GLideNUI-wtl: Add language for frame buffer 2020-04-22 21:14:16 +07:00
zilmar
dc5ac40007 GLideNUI-wtl: Add language translation for emulation tab 2020-04-22 21:14:16 +07:00
zilmar
c185cecb01 GLideNUI-wtl: Add language translation to config-video 2020-04-22 21:14:16 +07:00
zilmar
6c4b18266e GLideNUI-wtl: Generate Screen shot 2020-04-22 21:14:16 +07:00
zilmar
02fcbf9b88 GLideNUI-wtl: Handle changing/adding/removing profile 2020-04-22 21:14:15 +07:00
zilmar
512544ca67 GLideNUI-wtl: change resolution to a combo box 2020-04-22 21:14:15 +07:00
zilmar
f802d0fd51 GLideNUI-wtl: Add dithering options 2020-04-22 21:14:15 +07:00
zilmar
f6bc760e28 GLideNUI-wtl: dpi is not a pointer 2020-04-22 21:14:15 +07:00
oddMLan
14edd21541 GLideNUI-wtl: Match Qt GUI 1:1
Based on commit c168f53d12
With some minor improvements/differences over Qt GUI
- Fully DPI aware
- Dithering is in the Video tab instead of Emulation, some wording differences

Observations:
- "Windowed resolution" is an editable combobox now. Need to parse custom resolution as well suggest some default ones
- "Enable noise" has been removed since it's permanently enabled in latest master
- Need to sync with upstream to connect the Dithering stuff with the config system
- Warning under Antialiasing section needs to hide if N64-depth compare is disabled, but might be difficult to do

Further suggestions:
- "Save" button should be an "Apply" button that applies the settings to current game without pausing. Might be out of the scope of this refactor though.
- Need to test GUI in Windows XP, Windows Vista/7/8.1 to make sure nothing looks out of place
2020-04-22 21:14:15 +07:00
oddMLan
66175d82de GLideNUI-wtl: Add DPI-aware icon handling code
Other: Minor layout fixes
2020-04-22 21:14:15 +07:00
zilmar
5cb23ede3a GLideNUI-wtl: Start to add code for handling profiles 2020-04-22 21:14:15 +07:00
zilmar
5f61dd12a5 GLideNUI: make Gliden64 have rc files 2020-04-22 21:14:15 +07:00
zilmar
f2e32892a3 Add GLideNUI-wtl 2020-04-22 21:13:33 +07:00
Logan
686fa7d108 FlappyBird64 requires CopyFromRDRAM
Fixed #2197 FlappyBird HUD elements not displayed
2020-04-17 19:11:52 +07:00
Sergey Lipskiy
50dd3ed2e0 Set clip ratio to 1 when render image from DRARM.
Fixed #2211 Duplicate image in Dr. Mario
2020-04-16 17:28:07 +07:00
Logan McNaughton
7ef3be1cab Mask VI_ORIGIN address 2020-04-15 11:12:42 +07:00
Sergey Lipskiy
9eddde6e0f Fix "division by zero" issue in gSPObjSprite.
Fixed #2192 Unknown memory action on Magical Tetris Challenge
2020-04-11 14:57:50 +07:00
fzurita
fbd1ad1a5a Fix broken Android compilation with updated xxHash 2020-04-09 15:33:56 +07:00
Sergey Lipskiy
d8f031294a Use linear equation for LOD calculation,
as proposed by standard-two-simplex in #2203
2020-04-09 15:06:59 +07:00
Sergey Lipskiy
a73da69e10 Always use clip ratio 1 for rects and screen-space triangles. 2020-04-06 20:01:54 +07:00
Sergey Lipskiy
2ebfabaf8e Revert "Set clip ratio to 1 in TexrectDrawer."
This reverts commit cd9b5e1c93f0a01a9648982f8ecffcc08919e6f2.
2020-04-06 20:01:54 +07:00
Sergey Lipskiy
2169384245 Set default clip ratio to
- 2 for F3DEX2 and .Rej,
- 1 for F3DEX and other fast3d ucodes, except .Rej
2020-04-06 20:01:54 +07:00
Sergey Lipskiy
aeabfd3912 Set clip ratio to 1 in TexrectDrawer. 2020-04-06 20:01:53 +07:00
Sergey Lipskiy
a2d731b4db Update viewport on clip ratio change. 2020-04-06 20:01:53 +07:00
Sergey Lipskiy
0b8f10f9d6 Set gSP.clipRatio default value to 1 for all ucodes but Rej ones, where it is 2. 2020-04-06 20:01:53 +07:00
S2S
2c51fb096f Magnify clipping space by ClipRatio.
Fixed #190 Cruis'n World: wrong logo
2020-04-06 20:01:53 +07:00
Sergey Lipskiy
0cca2fa2fe Change type for BlueNoiseItem fields from char to signed char.
It should fix compilation on ARM.
2020-04-06 19:58:57 +07:00
Logan McNaughton
c168f53d12 Fix bug introduced by 85a8635952 2020-04-05 11:06:58 +07:00
gizmo98
a96853d559 Dithering settings: add tooltip text 2020-04-05 10:54:12 +07:00
Sergey Lipskiy
827b69816f Add support in GUI 2020-04-02 16:10:08 +07:00
Sergey Lipskiy
219019a39b Enable dithering quantization by default. 2020-04-02 14:53:06 +07:00
Sergey Lipskiy
5ff3ef9649 Dithering shader: correct read threshold value from matrices. 2020-03-31 18:31:44 +07:00
Sergey Lipskiy
a0991dc9cf Refactor shader dithering code: replace mix by switch..case 2020-03-31 18:31:44 +07:00
Sergey Lipskiy
beee2bc368 Use enableHiresNoiseDithering setting. 2020-03-31 18:31:43 +07:00
Sergey Lipskiy
d7e3b4c84b Some dithering shaders refactoring. 2020-03-31 18:31:43 +07:00
Sergey Lipskiy
897fc35d51 Remove ditheringMode and bufferDitheringMode settings.
Add new settings:
- enableHiresNoiseDithering
- enableDitheringPattern
- enableDitheringQuantization
- rdramImageDitheringMode

New settings are not implemented in GUI yet.
2020-03-31 18:31:43 +07:00
Sergey Lipskiy
2600a6bc90 Remove "Enable noise" oprion. Emulation of noise is always enabled. 2020-03-31 18:31:42 +07:00
Sergey Lipskiy
41ecf66e80 Add blue-noise dithering, http://momentsingraphics.de/BlueNoise.html 2020-03-31 18:31:42 +07:00
Sergey Lipskiy
f566c1bc59 Support dithering mode in GUI. 2020-03-31 18:31:41 +07:00
Sergey Lipskiy
d621eb4d34 Add enum DitheringMode for better readability.
Few fixes.
2020-03-31 18:31:41 +07:00
gizmo98
350d791596 -Remove enableDithering setting and use ditheringMode for everything
-Dithering Modes:
0 disabled
1 noise dithering
2 noise dithering with 5Bit quantitzation
3 noise and ordered grid dithering
4 noise and ordered grid dithering with 5Bit quantitzation
-Quantize dithered alpha (5Bit). Removes white remnants in SF Lylat
Wars.
2020-03-31 18:31:40 +07:00
gizmo98
1a6f83aa6c Disable RDRAM dithering if nativeResFactor = 1 and dithering is enabled
Don’t dither twice.
2020-03-31 18:31:40 +07:00
gizmo98
0597632f8a Add dithering options and better color noise dithering
-Add enableDithering option: true - dithering enabled; false -
dithering disabled
-Add ditheringMode option: quantize noise or ordered grid dithered
content like original hardware would do it. true - quantize to 16Bit
colors, false 32Bit colors.
-Add snoiseRGB() and snoiseA() functions. Color dithering needs
different noiese values for r, g and b.
-snoiseRGB() and snoiseA() „double“ noise resolution if uScreenscale is
>= 2.0. So noise not so blocky but still grainy at higher resolutions.
-Increase config version to 28U
2020-03-31 18:31:40 +07:00
gizmo98
6bdcaa0bfa Add RDRAM dithering: Dither image if RGBA16 is written to RDRAM
ColorbufferToRDRAM RGBA to RGBA16 conversion produces color banding.
Implement dithering according to n64 documentation to hide color
banding.
2020-03-31 18:31:39 +07:00
Logan McNaughton
85a8635952 Update to XXH3 for CRC_OPT 2020-03-30 21:16:59 +07:00
Logan
3f55f30ea2 Mask RDRAM address in ProcessRDPList
Avoids a crash in Donkey Kong 64 (U) [f2]
2020-03-29 18:12:16 +07:00
Sergey Lipskiy
225f1414dc Set NoN (no near clipping) flag for all .Rej ucodes.
Fixed wrongly clipped polygons in RE2, Ada's locket cutscene, #2152
2020-03-22 14:00:00 +07:00
Sergey Lipskiy
022b375614 RE2 related fixes:
* fixed gSPModifyVertex for case when primitive depth enabled
* fixed GraphicsDrawer::isRejected for case when coordinates of vertex set by gSPModifyVertex
* fixed writeDepth() shader for RE2

Fixed various issues mentioned in #2152
2020-03-18 14:50:45 +07:00
Logan
be78f2d324 Fix IPO build on Linux 2020-03-18 11:53:00 +07:00
Sergey Lipskiy
8a9d52b41b Fix static noise on screens in Space Station Silicon Valley.
Problem: the static on the screens is the result of alpha test with a random threshold.
The screens use 2 cycle combiner. First cycle for alpha uses "combined" input.
A value for this input is not set yet in the first cycle, so the result of alpha test is usually wrong.

Solution: replace "combined" input in the first cycle by special "half" input.

Fixed #1764
2020-03-08 23:28:54 +07:00
Sergey Lipskiy
1fdd028bc6 Fix conditions to activate texturedRectDepthBufferCopy.
Fixed #2101 Multiplayer camera rotation issue in Conkers Bad Fur Day
2020-03-07 18:27:32 +07:00
Sergey Lipskiy
a28292846c Remove on_n64DepthCompareCheckBox_toggled
Fixed #2185 GLideNUI warning.
2020-03-06 18:51:48 +07:00
fzurita
d053f16bb0 Fix CMake warnings presented by Android Studio 2020-02-26 17:04:05 +07:00
fzurita
0a5216f8e1 Make the hybrid texture filter optional through configuration 2020-02-12 11:51:04 +07:00
Sergey Lipskiy
0692abea4a Re-implement slower N64 depth compare synchronization method,
which requires only core OpenGL 4.2 without shader_interlock extensions.

Fixed N64 depth compare with older AMD GPU.
2020-02-09 19:03:53 +07:00
Logan McNaughton
3d93752b61 Update xxHash 2020-02-06 17:48:13 +07:00
Sergey Lipskiy
495d9f959e Simplify aTexScale calculation in UClampWrapMirrorTex::update 2020-01-12 19:52:42 +07:00
Sergey Lipskiy
cfa3ded934 Correct tile size calculation.
Fixed #2156 Tony Hawk's Pro Skater 3- Missing Characters on Copyright Screen
2020-01-02 20:36:35 +07:00
Sergey Lipskiy
b949958874 Disable ThreadedVideo on MacOsX, see #2159 2020-01-02 16:41:18 +07:00
Sergey Lipskiy
c823047f99 Prevent config dialog from being opened twice.
Fixed #2158 Project 64 Crashes if you open GlideN64 Video Settings when they are already open.
2020-01-02 14:44:01 +07:00
Sergey Lipskiy
e676dafb7a Fix languages names in GUI. 2020-01-02 14:35:24 +07:00
fzurita
de7547727b Don't generate a new Revision.h file if revision hasn't changed
This prevent CMake from forcing a build of everything that depends on
that file.
2019-12-16 14:21:44 +07:00
fzurita
3daf1c0e49 Use a different library name when building for Android 2019-12-16 14:21:44 +07:00
fzurita
cda2dcf2a3 Remove Android makefile and use CMakeLists for Android instead 2019-12-02 18:41:41 +07:00
Sergey Lipskiy
028133bb5c Correct gDP.loadTile->loadHeight calculation again.
Fixed #2143 Yoshi's Story level backgrounds regression
which was broken by b261f34b0
2019-11-30 22:48:23 +07:00
Tim Wanders
80f1d9d021 Fix Log.h 2019-11-30 22:40:00 +07:00
fzurita
44ce554d5f Fix issues with EGL image public API on GLES 2.0 2019-11-30 15:54:59 +07:00
Sergey Lipskiy
d52d402d76 Do not use hybrid filer for GLES 2.0 due to poor performance.
Shader and code simplifications.
2019-11-30 15:54:54 +07:00
Sergey Lipskiy
25b270492e Revert "Don't use glGetTexLevelParameteriv to determine texture size"
This reverts commit b31e510932.
2019-11-30 15:31:43 +07:00
fzurita
49bdffb954 Fix shader compilation errors with Adreno devices 2019-11-30 15:30:50 +07:00
fzurita
6ac44db414 Don't use glFlushMappedBufferRange in debug mode, the performance
penalty is too high
2019-11-29 11:55:57 -05:00
fzurita
b31e510932 Don't use glGetTexLevelParameteriv to determine texture size 2019-11-29 15:56:22 +07:00
fzurita
a2fbea9086 Fix GLSL ES 1.0 compilation error 2019-11-29 15:50:34 +07:00
fzurita
0abaad4aee Fix shader compilation errors in GLSL 3.0 2019-11-29 15:02:35 +07:00
Sergey Lipskiy
2b5e8786d1 Add support for TEXTUREMODE_BGIMAGE in UClampWrapMirrorTex::update()
Fixed #2107 Majora's Mask OnePiece backgrounds broken
Fixed #2141 RE2 corrupt video
2019-11-28 19:13:26 +07:00
Sergey Lipskiy
558c465d02 Debugger fixes. 2019-11-28 19:11:31 +07:00
Francisco Zurita
9c4653a148 Throw an exception if a buffer greater than the ring buffer pool max size is allocated instead of dead locking forever. 2019-11-28 17:33:56 +07:00
Sergey Lipskiy
f918a909c7 Remove opacity check from hybridFilter shader. 2019-11-28 12:31:31 +07:00
Sergey Lipskiy
488d52de16 Use hybrid texture filter to draw frame buffer image on screen.
Related to #2088
2019-11-27 19:25:19 +07:00
Sergey Lipskiy
bc05d5f0d8 Make optimization implemented in e0418c3c34 as optional.
S. F. Rush looks much better without the optimization.

Fixed #2068 S. F. Rush and Rush 2 - Regressions
2019-11-27 17:32:21 +07:00
Sergey Lipskiy
a8f23045fd Enable threadedVideo option by default.
Fixed #2126 Problem with Project64 1.6.1 when close emulator
2019-11-23 12:55:22 +07:00
Sergey Lipskiy
89bcb61c02 Correct frame buffer usage check.
Fixed Pokémon Stadium 2 - Cut off pokémon portraits #2110
2019-11-22 16:23:25 +07:00
Sergey Lipskiy
a01718d2cf Correct needMirror condition in clampWrapMirror shader.
Fixed Blast Corps regression #2113
2019-11-21 17:25:57 +07:00
Sergey Lipskiy
27128fe505 Correct error output in DisplayWindowMupen64plus::_getDisplaySize(). 2019-11-20 12:40:53 +07:00
Sergey Lipskiy
517723d308 Up shader storage version. 2019-11-14 11:46:51 +07:00
S2S
49604f0c16 Write wrap function. Cleanup of combiner code. 2019-11-14 11:46:46 +07:00
S2S
a42e34f1b8 Write macros for reading a vector or matrix without hurting performance. Cleanup blender code. 2019-11-14 11:46:32 +07:00
Sergey Lipskiy
9dff907f15 Do not shift texture coordinates for frame buffer textures.
Fixed #2112 Conker black line following your shadow
2019-11-12 10:54:56 +07:00
Sergey Lipskiy
09764fead7 Fix TxFileStorage initialization when cache compression disabled.
Fixed Textures do not load from uncompressed HTS files #2120
2019-11-04 21:49:48 +07:00
Sergey Lipskiy
f3b83d2c8b Fix formatting in TxCache.cpp 2019-11-04 19:49:09 +07:00
Sergey Lipskiy
ad85856ee7 Replace printf by LOG.
Fixed #2123
2019-11-04 18:27:01 +07:00
fzurita
17b8e34799 Add logging of OpenGL profiling data 2019-11-04 15:03:36 +07:00
fzurita
d7996329c1 Added more GL functions to threaded GL implementation 2019-11-04 14:54:05 +07:00
fzurita
e333dea890 Fix GL errors when using EGL image to read pixel from texture 2019-11-04 14:30:37 +07:00
fzurita
9059bb38d3 Add GL function glDebugMessageCallback and glDebugMessageControl 2019-11-03 23:07:05 +07:00
fzurita
686c7799db Fix some incorrectly set android makefile options 2019-11-03 23:07:05 +07:00
Sergey Lipskiy
a87f7c4022 Log CoreVideo functions error code. 2019-11-03 23:00:54 +07:00
Sergey Lipskiy
5484972b37 Correct tile size calculation.
Fixed regression in Paper Mario caused by commit 5c5c218e4.
2019-10-28 20:16:24 +07:00
Sergey Lipskiy
2b0e1e64c2 Temporal workaround for crashes in TextureCache::_loadHiresTexture when mip-mapped textures loaded.
See #1711 for details.
2019-10-26 18:57:28 +07:00
fzurita
ffaaf1f664 Fix incorrect OpenGL function init in iOS 2019-10-25 11:17:14 +07:00
fzurita
3c875ef3a6 Fix incorrect OpenGL function init in MacOS 2019-10-25 11:17:14 +07:00
Sergey Lipskiy
98d906d4e0 Correct tile height calculation.
Fixed Neon Genesis Evangelion glitches #2102
2019-10-16 13:43:50 +07:00
Sergey Lipskiy
0338f27225 Do not shift texture coordinates by 0.5 for point-sampled textures.
Attempt to fix texture mapping issue from #2097.
2019-10-14 14:11:24 +07:00
fzurita
1384584af6 Fix threaded OpenGL lockup when trying to remove invalid buffer 2019-10-14 14:10:08 +07:00
Sergey Lipskiy
b261f34b0d Fix gDP.loadTile->loadHeight calculation.
Fixed Zelda 64 Skybox duplicates #2094.
2019-10-13 13:03:28 +07:00
Sergey Lipskiy
cffeab2f0f Fixed backgrounds load in Bakuretsu Muteki Bangaioh (J). 2019-10-12 23:57:10 +07:00
Sergey Lipskiy
5bab3c155f Fix crashes in Bakuretsu Muteki Bangaioh (J) 2019-10-12 01:03:14 +07:00
fzurita
462dd2a9bc FIx EGL image compatibility with mali devices 2019-10-05 22:41:33 +07:00
fzurita
4c87af5975 Don't initialize EGL, this is causing issues 2019-10-05 22:41:33 +07:00
fzurita
8cdf5a41d8 Don't crash on failed initialization 2019-10-05 22:41:33 +07:00
Sergey Lipskiy
427004a703 Fix Debugger::_addTriangles 2019-10-03 18:51:26 +07:00
fzurita
4a10c0a7fa Fix incorrect OpenGL function init in Linux 2019-09-30 21:48:36 -04:00
fzurita
d6ad676436 Fix EGL initialization in applications that don't implment VidExt 2019-09-30 21:48:36 -04:00
fzurita
7861d14060 Fix issue with lack of highp floating numbers in GLSL for GLES 2.0. 2019-09-30 21:48:26 -04:00
fzurita
8817e2c549 Fix logging error 2019-09-29 09:25:04 -04:00
Sergey Lipskiy
62b4389d16 Use TexrectCopyProgram if TexrectColorAndDepthCopyProgram is not awailable. 2019-09-29 16:13:03 +07:00
fzurita
415e63d6d1 Fix shader compilation error in GLES 2.0 2019-09-29 16:08:44 +07:00
fzurita
a42c66e305 Fix android logging 2019-09-29 16:08:44 +07:00
Sergey Lipskiy
9409abd671 Support "Copy depth to main depth buffer" option in GUI. 2019-09-27 19:33:18 +07:00
Sergey Lipskiy
751ddc36a7 Support "EnableCopyDepthToMainDepthBuffer" option in mupen64plus config. 2019-09-27 19:33:18 +07:00
Sergey Lipskiy
86a227308e Implement copy depth to main depth buffer. It is necessary for correct work of some Reshade shaders. 2019-09-27 19:33:18 +07:00
Sergey Lipskiy
a1faafcc1b Code refactor: rename TxFileCache to TxFileStorage. 2019-09-27 19:33:18 +07:00
Sergey Lipskiy
0272bb626b Fix warning. 2019-09-27 19:33:18 +07:00
Aquatakat
7785e305d4 New aliasing tooltip 2019-09-27 19:33:17 +07:00
Aquatakat
6946f730b4 UI refresh: _init() behaviour fixes
Changing profiles/toggling the use game settings checkbox works a bit better.
2019-09-27 19:33:17 +07:00
Aquatakat
c18037b92d Support for file_tex_storage branch 2019-09-27 19:33:17 +07:00
Aquatakat
43bec023e4 UI refresh: option to save settings to profile while per-game settings enabled
Also letting Qt decide how tall the window should be.
2019-09-27 19:33:17 +07:00
Aquatakat
c77214f0a7 UI refresh: AA radio button behaviour changes 2019-09-27 19:33:17 +07:00
Aquatakat
95cee96d15 UI refresh: emulation tab condensed vertically 2019-09-27 19:33:17 +07:00
Aquatakat
54b825d957 UI refresh fixes
Whoops, it looks like I was working with an old UI and missed some options. I've added them all to the emulation tab.

I think I should find a way to tidy the emulation tab a little in the future.
2019-09-27 19:33:17 +07:00
Aquatakat
03f0fe78c9 UI refresh 2019-09-27 19:33:16 +07:00
Sergey Lipskiy
2fa076c1df Support new settings in Mupen64plus config 2019-09-27 19:33:16 +07:00
Sergey Lipskiy
b697393cab File stream implementation of TxCache. 2019-09-27 19:33:16 +07:00
Sergey Lipskiy
dee7065982 Memory cache implementation of TxCache 2019-09-27 19:33:16 +07:00
Sergey Lipskiy
a1a443ca47 TxCache refactor 2019-09-27 19:33:16 +07:00
Sergey Lipskiy
0068a0066b Fix Debugger::_addTriangles for TRIANGLE_STRIP mode 2019-09-18 15:38:25 +07:00
Sergey Lipskiy
fea37ab6d5 Fix elements cast in Debugger::_addTrianglesByElements 2019-09-18 15:38:22 +07:00
Sergey Lipskiy
34c6cae364 Fix compile errors in opengl_ColorBufferReaderWithEGLImage.cpp
Fixed #2083
2019-09-05 18:53:38 +07:00
Sergey Lipskiy
4808179691 Fixed crash in case of wrong FrameBuffer::m_scale initialization. 2019-09-05 18:47:45 +07:00
Sergey Lipskiy
10ec517fe9 Code refactor in GLInfo::init() 2019-08-31 11:05:44 +07:00
Sergey Lipskiy
5c5c218e41 Correct tile size calculation.
Fixed text in Zelda debug rom. See bug reported by AriaHiro64 in #1885
2019-08-21 12:39:53 +07:00
Sergey Lipskiy
c28ea61b8f Fix for texture issues in Stunt Racer, reported by DonelBueno in #1885
Stunt Racer uses combiner with two textures for track polygons, but actually loads only T0.
T1 replaced by T0 because of LOD flags in othermode.
This situation was not checked in the main code and ClampWrapMirror shader got wrong parameters,
which lead to the glitches.
2019-08-16 19:10:09 +07:00
Sergey Lipskiy
947fedcbb5 Code cleanup: remove unused getMirrorClamp function. 2019-08-16 17:47:20 +07:00
Sergey Lipskiy
fa2ce3f6e7 Debugger: correct mupen64plus window caption to find in debug mode. 2019-08-16 17:46:34 +07:00
Sergey Lipskiy
258e51d44d Code cleanup: remove unused CombinerInfo::getCombinersNumber() 2019-06-23 17:32:28 +07:00
Sergey Lipskiy
83dde99f6b Fix TextureCache::_loadHiresTexture: use correct tile when gSP.texture.tile != 0 2019-06-19 19:02:57 +07:00
Sergey Lipskiy
2d712f2ae0 Rewrite textures loading and mapping:
- use RiceVideo method for texture size calculation.
  RiceVideo uses the same method for texture dumping.
- rewrite texture mapping.
  Texture Clamp-Wrap-Mirror implemented in shaders.

Problem explanation:
https://github.com/gonetz/GLideN64/issues/1885#issuecomment-485136358

Fixed various glitches with HD textures, #1885
2019-06-19 19:02:52 +07:00
Sergey Lipskiy
993960f9ea Do not attempt to copy image to RDRAM when copyToRDRAM option set to "Disabled".
Fixed crash when open sub-screen in Zelda MM with copyToRDRAM disabled.
2019-05-22 20:16:10 +07:00
Sergey Lipskiy
2d15d2d20a Fix CMakeLists.txt for Raspberry Pi
Patched by 5schatten.

Fixed #1978 [RPi3 | cross compile]
2019-04-23 17:17:34 +07:00
Francisco Zurita
c06c593eba Improve logging information 2019-04-23 11:15:41 +07:00
Sergey Lipskiy
8debfdb81c Correct GLES2 version of mip-map shader. 2019-04-22 21:45:11 +07:00
Francisco Zurita
8f26645407 Fix crash with GL_DEBUG enabled with mupen64plus API
Also, fix compiler warning
2019-04-15 09:09:39 +07:00
Francisco Zurita
92bcbe5981 Fix issues with threaded OpenGL when debug is enabled 2019-04-10 12:55:09 +07:00
fzurita
5df3f9dbac Threaded GLideN64 calls 2019-04-08 10:51:18 +07:00
Sergey Lipskiy
3d74542d24 Correct geometry mode update for Turbo3D.
Fixed glitches in Dark Rift, #2033
2019-04-03 21:32:50 +07:00
Sergey Lipskiy
1eea6d4452 Update "About:Contributors" 2019-04-01 17:09:49 +07:00
Sergey Lipskiy
2b95e56db4 Remove info about blur shader from "About:Credits" form since the shader is not used anymore. 2019-04-01 16:53:18 +07:00
Sergey Lipskiy
7f5f6256f3 Apply gamma correction to text drawer textures.
Fixed #2030 : Font rasteriser doesn't perform gamma correction

Thanks Clownacy for the idea.
2019-04-01 16:30:36 +07:00
Sergey Lipskiy
c57909e2e9 Reset gSP.geometryMode at display list load and display list end.
Fixed culling issue in Triple Play 2000.
2019-04-01 15:21:08 +07:00
Sergey Lipskiy
3e552f4214 GUI: set max MSAA level to 16x. 2019-03-26 16:27:32 +07:00
Sergey Lipskiy
e91a767b82 GUI: add tooltips for anti-aliasing controls. 2019-03-26 16:24:25 +07:00
Sergey Lipskiy
af63737012 Avoid division by zero in ObjCoordinates ctor due to wrong data in _pObjSprite.
Fixed crash in Glover 2 intro.
2019-03-23 18:11:07 +07:00
Sergey Lipskiy
fc96b78542 Fix load of 4bit CI textures when TLUT mode is off. Correction for commit 98960950
Fixed color of the glove in Doubutsu no Mori sub-screen.
2019-03-23 12:37:38 +07:00
Sergey Lipskiy
751fe2b3fa Convert fix for StarCraft 64 from commit 729bf94c5 to StarCraft specific hack,
because that case is actual for StarCraft 64 only.
2019-03-23 12:33:04 +07:00
Sergey Lipskiy
03022db791 Check that RDRAM area is writable before writing buffer data into it.
Fixed Problem with Project64's protect memory option #764
2019-03-16 18:37:05 +07:00
Sergey Lipskiy
2ac29acf29 Add '#pragma once' to CRC.h 2019-03-15 16:56:50 +07:00
Sergey Lipskiy
3d11a21a40 Correct GraphicsDrawer::isRejected.
According to manual, ClipRatio must be at least 2.

Fixed #2023, Chou Kuukan Nighter Pro Yakyuu King 2 (J) missing polygons in HLE
2019-03-13 18:29:21 +07:00
Sergey Lipskiy
6041b47271 Fix Insert Matrix moveword command.
Fixed Sim City 64 HLE City Rendering Issue #1200
2019-03-11 22:10:28 +07:00
Sergey Lipskiy
76a56b4273 Fix gSPModifyVertex for Z coordinate.
Fixed gasp: wrong depth in menu #2019
2019-03-07 12:09:26 +07:00
Sergey Lipskiy
989609505c Fix load of 4bit CI textures when TLUT mode is off.
Fixed Goemon - Mononoke Sugoroku: wrong gfx #1892
2019-03-06 18:36:40 +07:00
Sergey Lipskiy
e13a2ffd6b Correct gDPLoadTileInfo bytes calculation for 32bit textures.
Fixed ready 2 rumble 2 : wrong gfx in intro #2021
2019-03-05 16:06:26 +07:00
Sergey Lipskiy
96ccfc63af Correct mip-map shader: lod could be larger than actual number of levels in mip-map texture.
Fixed mip-mapped textures in Automobili Lamborghini with 3point filtering enabled.
2019-03-03 15:17:52 +07:00
Sergey Lipskiy
3704b37c3e Fix some of PVS-Studio warnings. 2019-03-03 11:47:10 +07:00
Sergey Lipskiy
4a925e1490 Add simple check for absolute paths to texture filter folders.
Relative path is not supported and must be substituted by default one.
2019-02-28 13:31:11 +07:00
Sergey Lipskiy
08e15767a6 Fix copy-paste errors in TextureFilterHandler::init()
Fixed build of default paths to texture filter folders
2019-02-28 12:30:46 +07:00
Sergey Lipskiy
f55283e32f Fix CRC calculation for mip-mapped textures.
Fixed green smear on mipmaps in Turok, #1558
2019-02-25 15:44:56 +07:00
Sergey Lipskiy
69d608310f Fix compilation warning. 2019-02-25 15:38:20 +07:00
Sergey Lipskiy
19cf24f701 Apply "Disable enhancement for backgrounds" option only for S2DEX background commands.
Related to Ocarina of time - Temple of time issue #1984
2019-02-24 19:47:28 +07:00
Sergey Lipskiy
b0380e0a04 Increase log level for VI warnings. Users should not see them. 2019-02-24 18:56:30 +07:00
Sergey Lipskiy
ea27c6bd21 Correct code, which forces OnePiece mode for backgrounds.
Code cleanup.

Fixed STARCRAFT 64: does not work with one piece option #2013
2019-02-24 18:42:56 +07:00
Sergey Lipskiy
6022f510f5 Correct getStorageFileName: set user-preferred locale before using string conversion functions. 2019-02-24 12:07:13 +07:00
fzurita
b40e6f44c1 Fix shader storage with Android 4.4 2019-02-24 11:49:15 +07:00
fzurita
164b44e8e5 Fix shader compilation in GLSL 2019-02-23 15:05:06 +07:00
Sergey Lipskiy
a40afaf5bd Enable texturedRectDepthBufferCopy for Turok.
Code refactoring.

Fixed Turok 64 Missing lens flare #2009

Note: Turok lens flare works correct only when depth buffer copied from VRAM.
Software depth render produces incorrect result because it does not discard pixels,
which should be discarded by alpha test.
2019-02-22 15:45:04 +07:00
Sergey Lipskiy
5063ad7292 Fix address for depth buffer copy in texturedRectDepthBufferCopy 2019-02-22 12:17:27 +07:00
Sergey Lipskiy
a5e8bf4f3c Fix DepthBufferToRDRAM::_prepareCopy RDRAM bound condition. 2019-02-22 12:14:09 +07:00
Sergey Lipskiy
edd83fdb76 Code cleanup: rename variables in F5INDI_RebuildAndAdjustColors 2019-02-20 18:00:46 +07:00
fzurita
9033a4d536 Fix build errors when using CMake with RPi 2019-02-19 15:18:39 +07:00
Sergey Lipskiy
49465a094d Implement dump of background textures. 2019-02-19 12:49:40 +07:00
Sergey Lipskiy
15fa834ffa Correct "BackgroundsMode" parameter read from mupen64plus config. 2019-02-19 12:47:59 +07:00
Sergey Lipskiy
916d01ba60 Correct FrameBufferList::renderBuffer() output coordinates calculation.
Fixed screen shake in WDC and Bass Rush - ECOGEAR PowerWorm Championship.
2019-02-17 23:37:54 +07:00
Sergey Lipskiy
cd4535025d An optimization in F5INDI_CalcST 2019-02-17 15:39:39 +07:00
Sergey Lipskiy
9bf36d390a Implement 3-point texture filtering for mipmapped textures.
Fixed #1558 3-point texture filtering doesn't work with mipmapped textures.
2019-02-16 20:45:51 +07:00
Sergey Lipskiy
edc81952ab Fix texture unpack alignment for filtered textures.
Fixed #1412: Enhancements cause buggy texture elements.
2019-02-15 17:44:45 +07:00
Sergey Lipskiy
24bfb8274f Fix ucode selection for Wayne Gretzky's 3D Hockey.
Add custom settings to avoid flickering in this game with Project64.

Fixed Wayne Gretzky's 3D Hockey: missing gfx and flickers (regression) #1966
2019-02-08 22:04:47 +07:00
Sergey Lipskiy
0e04b3f902 Fix z coordinate calculation in TexrectDrawer::addRect()
Fixed #1989, Printf debug statements broken in LLE in Multiple Debug/Prototype games.
2019-02-08 19:43:16 +07:00
gizmo98
f7824a37a0 Use bool value for 3-Point or bilinear filtering selection again
With the new enableHalosRemoval option we  only need to select bilinear
filtering or 3-point filtering with a bool value again.

Reverts
https://github.com/gonetz/GLideN64/commit/164b1056b3b5446824e419a7721a5c
4e455f28c6 partly.
2019-02-08 11:47:28 +07:00
Sergey Lipskiy
32901bf5dd Add option enableHalosRemoval for bilinear filtering. 2019-02-07 17:23:20 +07:00
fzurita
2712e8f509 Cleanup EGL image code 2019-02-05 21:48:26 +07:00
Sergey Lipskiy
837f173e82 Support new bilinear filtering modes in GUI. 2019-02-05 21:28:00 +07:00
gizmo98
164b1056b3 Add bilinear filtering modes which remove halos around transparent textures
This workaround is not implemented for gles2 devices.
2019-02-05 21:09:36 +07:00
fzurita
f209304d0b Add support for Android EGL Image Public API 2019-02-05 17:30:58 +07:00
Sergey Lipskiy
039f818175 Correct initial value for clip ratio.
According to programming manual, initial value is 2.

Fixed logo clipping in SD Hiryuu no Ken Densetsu.
This game does not call gSPClipRatio, thus initial value is used.
2019-02-04 21:09:02 +07:00
Sergey Lipskiy
647f7759c2 Apply fix for GE multiplayer only for GE and PD.
Naboo does not use depth buffer clear with fillrect,
thus it does not allocate frame buffer for depth buffer clear.
GE multiplayer fix breaks depth compare in Naboo.
2019-02-04 20:04:48 +07:00
Sergey Lipskiy
78e98d880b Fix primitive depth for particles in Factor5 ucodes. 2019-02-04 18:30:05 +07:00
Sergey Lipskiy
2b7f78c9f8 Fix depth buffer clear when otherMode.depthCompare enabled.
Fixed 1080 Snowboarding (JU) FB off breaks games ( regression) #1976
2019-02-03 18:01:01 +07:00
Sergey Lipskiy
f79f8d406a Add bgMode config setting. 2019-02-02 19:10:50 +07:00
Sergey Lipskiy
be069adb1f Fix gSPObjSprite for S2DEX ver 1.03
Fixed speedometer in GT 64.
2019-02-02 18:34:13 +07:00
Sergey Lipskiy
b62734d297 Use ValueKeeper for RSP.LLE flag 2019-02-02 18:34:12 +07:00
Sergey Lipskiy
dcd159dc71 Enable texrect drawer in BG commands when enableNativeResTexrects enabled. 2019-02-02 18:34:12 +07:00
Sergey Lipskiy
f31cb4b00d GraphicsDrawer::drawTexturedRect - always use TexrectDrawer if m_bBGMode enabled. 2019-02-02 18:34:12 +07:00
Sergey Lipskiy
4a50912283 Enable texrect drawer for BGCopyNew. 2019-02-02 18:34:12 +07:00
Sergey Lipskiy
0560b49686 TexrectDrawer::draw() : correct texture coordinates. 2019-02-02 18:34:11 +07:00
Sergey Lipskiy
6ca50bd733 Use old code for frame buffer texture backgrounds 2019-02-02 18:34:11 +07:00
Sergey Lipskiy
1f372fa0ce Fix S2DEX_MoveWord 2019-02-02 18:34:11 +07:00
Sergey Lipskiy
be1a1fc413 Fixes for S2DEX 1.5 2019-02-02 18:34:11 +07:00
Sergey Lipskiy
9e64d45ac5 New implementation of BgCopy command. It is based on olivieryuyu decoding of actual ucode and works as close to original command as possible. 2019-02-02 18:34:11 +07:00
Sergey Lipskiy
729bf94c5a StarCraft fix. 2019-02-02 18:34:10 +07:00
Sergey Lipskiy
2decda55f3 CheckForFrameBufferTexture code refactor. 2019-02-02 18:34:10 +07:00
Sergey Lipskiy
c48e0e4d00 Fix loadblock when lrs = 0xFFF 2019-02-02 18:34:10 +07:00
Sergey Lipskiy
5ac2749bbb Fixes in gSPObjLoadTxtr. 2019-02-02 18:34:10 +07:00
Sergey Lipskiy
2aeff6caa5 Fix tile size when it is loaded by BgCopy with LoadBlock.
BgCopy set dimensions for tile0 to zero.
We can't use dimensions of load tile either because of CopyBlock.
The only way to find size of loaded texture is to use coordinates of texrect.
There is one-to-one correspondence between rect pixels and texture texels in copy mode,
so we can safely use it in this case.
2019-02-02 18:34:10 +07:00
Sergey Lipskiy
d4f9c341a9 Do not use fractional part of coordinates in G_CYC_COPY mode. 2019-02-02 18:34:09 +07:00
Sergey Lipskiy
a3613b42ae Draw backgrounds with TexrectDrawer. 2019-02-02 18:34:09 +07:00
Sergey Lipskiy
25bef0d805 New implementation of BG1Cyc command.
It is based on olivieryuyu decoding of actual ucode and works as close to original command as possible.
2019-02-02 18:34:09 +07:00
Sergey Lipskiy
7f68ae71f1 Correct texturedRectBGCopy in order to new Bg1Cyc command work with Yoshi Story 2019-02-02 18:34:09 +07:00
Sergey Lipskiy
aab318b4f7 Fix tile load for BG commands. 2019-02-02 18:34:08 +07:00
Sergey Lipskiy
9ac633d2ea Add originalMaskT, originalMaskS fields for struct gDPTile.
masks and maskt set by gDPSetTile, but _calcTileSizes may change them if actual
tile dimension do not correspond the mask. This creates problem for S2DEX_BG_1Cyc command,
which set tile masks and maskt to maximum, while actual size of loaded tiles may vary.
_calcTileSizes may set new values for masks and maskt, which are valid for the current tile but invalid for next ones.
Thus, original values of tile masks and maskt must be restored when tile size calculated again in _calcTileSizes.
2019-02-02 18:34:08 +07:00
Sergey Lipskiy
fa2b0793e0 Store integer scissor coordinates. 2019-02-02 18:34:08 +07:00
Sergey Lipskiy
11e87a46d8 Add template RAII class to change-restore arbitrary parameters: ValueKeeper Use it in TexrectDrawer::draw() 2019-02-02 18:34:08 +07:00
fzurita
18a735dfe6 Fix some sign issues with RdpUpdate 2019-01-28 18:34:23 +07:00
Sergey Lipskiy
132b06fd2f Correct VI image cut calculations, see VI fixes #1981 2019-01-20 19:32:39 +07:00
Sergey Lipskiy
864e635ca4 Correct RdpUpdate::update()
Fixed Black screen on smash bros #1987
2019-01-20 18:52:16 +07:00
fzurita
20a7b75100 Android makefile updates for 64 bit 2019-01-15 14:14:23 +07:00
Sergey Lipskiy
31e2c7e11a Correct lighting for CBFD.
Code refactoring.
2019-01-13 01:07:20 +07:00
Sergey Lipskiy
b036a8296e Fix OverscanBuffer::draw. 2019-01-13 01:07:06 +07:00
Sergey Lipskiy
1e84099521 Correct mapping of RDP frame buffer to output one.
Code of RdpUpdate::update is based on angrylion's rdp_update().

Main visible difference: VI cuts several pixels on left and right of original image.
Cite from angrylion's commit message:
"rdp: new tests revealed the shocking truth:
the VI aggresssively and regardlessly of any data alignment specificities
cuts off either 7 or 8 pixels closest to h_start and h_end, so that nothing
ever appears on the screen unless (h_end - h_start) is 16 pixels or greater
(this removes marginal garbage graphics on the far right in Mario Tennis,
Turok 2 Seeds of Evil intro and probably other games)"
2019-01-13 01:07:02 +07:00
Sergey Lipskiy
0f1b45cfa6 Add hack for Lode Runner 3-D.
The game uses very unique way to allocate frame buffers.
It uses double buffering, but both buffers share the same address space (sic!)
The game uses interlaced display mode, and lines in RDP buffers are interlaced too.
Plugin's fb and VI emulation code can't handle it properly, so I just added a hack.

Fixed Lode Runner 3-D: No video output if framebuffer is enabled #1937
2019-01-13 00:47:52 +07:00
Sergey Lipskiy
fc70172327 Refactor update of buffer end address.
Add removeIntersections() after end address update.
2019-01-13 00:40:21 +07:00
Sergey Lipskiy
7d7b5fcee3 Correct RDRAMtoColorBuffer::copyFromRDRAM(FrameBuffer * _pBuffer)
Fixed course map in Lego Racers.
2019-01-13 00:40:01 +07:00
Sergey Lipskiy
6135aa9de1 Activate hack for WCW Nitro backgrounds.
Currently it is impossible to draw them without hack.

Fixed WCW Nitro: the mysterious wrong textures #179
2019-01-13 00:38:10 +07:00
Sergey Lipskiy
dcbea90e76 Correct _loadSpriteImage: if bg image address is inside cfb buffer, remove that buffer. 2019-01-13 00:38:06 +07:00
Sergey Lipskiy
f787483dbb Correct condition for uEnableDepth uniform.
Fixed depth compare for particles in Indiana Jones when N64 depth compare enabled, #1977
2019-01-12 14:34:00 +07:00
Sergey Lipskiy
6de128b8fd Correct condition for valid depth buffer attachement.
Rat attack uses color buffer with width 640, but depth buffer width is only 639.
goodDepthBufferTexture check failed because of it, and game run without depth compare.

Fixed Rat attack missing geometry #600
2019-01-09 18:19:01 +07:00
Sergey Lipskiy
da5acef3eb Add hack_ModifyVertexXyInShader for Rat Attack.
Fixed projector light in Rat Attack, #600
2019-01-09 18:16:22 +07:00
Sergey Lipskiy
e676384550 Revert "Enable N64DepthCompare by default."
due to regression in Indiana Jones, #1977

This reverts commit d420737d6d.
2019-01-08 16:51:31 +07:00
Sergey Lipskiy
d420737d6d Enable N64DepthCompare by default. 2018-12-18 16:54:02 +07:00
Sergey Lipskiy
13966d7de0 Remove Overscan::init 2018-12-18 16:53:32 +07:00
Sergey Lipskiy
cb0cf5bed9 Fix depth_compare shader:
always write depth to buffer when otherMode.depthCompare flag is off.

Up shader storage version.

Fixed 2 players mode in Extreme-G XG2 (U) with N64 depth compare enabled, #1963
2018-12-18 16:04:37 +07:00
orbea
a5fc0689ac Fix performance with radeonsi.
This takes Donkey Kong 64 from 12 fps to full speed with framebuffer
emulation enabled.
2018-12-11 11:35:56 +07:00
Sergey Lipskiy
f899bf57a4 Ignore vi_lowerfield if vi_width <= 320.
It seems that when vi_width <= 320 output uses progressive mode
even if interlaced bit is set in VI_STATUS.

Fixed Bass Rush - ECOGEAR PowerWorm Championship - shakes #1957
2018-12-09 17:39:31 +07:00
Sergey Lipskiy
0d3c3c151d Correct reject box implementation: add special flag for it in gDP.changed flags.
Fixed Rejection process issues #1954
2018-12-09 16:49:23 +07:00
Sergey Lipskiy
29575624b9 Call copyRdram() for cfb buffer to have data for validity check.
Fixed NBA Courtside 2: wrong intro - regression #1956
2018-12-09 16:24:35 +07:00
Sergey Lipskiy
8cd1605933 Add debug message for VI_UpdateScreen 2018-12-09 14:23:08 +07:00
Sergey Lipskiy
362c99c256 Fix specialMicrocodes entry for Pachinko nichi 365
Fixed https://github.com/gonetz/GLideN64/issues/1950
2018-12-09 13:07:58 +07:00
Sergey Lipskiy
bb8c13ccce Implement rejection processing, see 25.3.2 of programming manual
Fixed Mario Party: Coin Block Blitz ground flicker / darkening #1912
2018-12-06 17:31:50 +07:00
zilmar
459fb32106 Revert OS_WINDOWS changes 2018-11-25 18:34:16 +07:00