1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-06-30 08:24:05 +00:00
Commit Graph

182 Commits

Author SHA1 Message Date
Blake Warner
746be9cfa1 expand tmem 2022-03-29 17:42:18 -04:00
Amaro Martínez
d96c679436
Merge branch 'master' of https://github.com/gonetz/GLideN64 2022-03-14 00:45:28 -05:00
Sergey Lipskiy
58faa2874a Add support for HD textures, which have the same checksum but different format or size.
See #2569 for details.
2022-02-14 18:12:14 +07:00
Sergey Lipskiy
31553a3532 Correct load of mip-map textures with accurate path when mip-map emulation is disabled.
Fast path totally disables mip-map calculations when "mip-map emulation" option is disabled.
Accurate path works differently. It just set lod to 1.0, which forces most detailed textures to be used.
However, the remained calculations are performed and the mip-map tiles still must be in texture atlas format.

Fixed black textures in GE when mip-map emulation is disabled, see #2641
2022-02-13 21:00:26 +07:00
Sergey Lipskiy
8a0db39812 Refactor texture load: apply proper mask to tmem read address to prevent out of bounds reads.
Fixes #2641 Regression: Check that texture fit TMEM before load
2022-02-13 11:16:24 +07:00
Sergey Lipskiy
1e0699bf73 Revert "Check that texture fit TMEM before load."
This reverts commit 7417144f64.
2022-02-13 11:16:24 +07:00
Blake Warner
0255e10db6 native port 2022-01-29 17:22:09 -05:00
Sergey Lipskiy
7417144f64 Check that texture fit TMEM before load.
It should prevent out of TMEM bounds read.
2022-01-22 11:21:29 +07:00
Sergey Lipskiy
2c8533661b Fix crash in Mario Tennis, caused by wrong tile size calculation.
Regressions in S2DEX games are possible, but not found yet.
Also make sure that size of mip-map tile is not greater than possible.
2021-12-18 23:59:19 +07:00
Sergey Lipskiy
7b507e74d4 Correct TextureCache::activateTexture 2021-12-08 20:37:36 +07:00
s2s
8e961b7b39 Fix scale for mip-map tiles.
Note: it is incomplete solution for problems with mip-mapping.

Fixes Paper Mario Snow #2570
2021-11-06 18:06:59 +07:00
Sergey Lipskiy
46c58576e2 Code refactor. add calcShiftScaleS and calcShiftScaleT
Remove code duplication.
2021-11-06 17:14:24 +07:00
Sergey Lipskiy
472eef6c67 Fixes for txHiResUploadLimit 2021-11-01 15:32:49 +07:00
Rosalie Wanders
9479dfa6e9 Introduce txHiResUploadLimit 2021-11-01 15:32:27 +07:00
Sergey Lipskiy
9a6f9f6d69 Implement load of 16bit I textures.
Fixed #2340 Zelda Majora's Mask - Town Shooting Gallery Missing Effects
2021-10-31 00:04:33 +07:00
Sergey Lipskiy
71788c320d Rename Ext_TxFilter.h to TxFilterExport.h
Correct #include
2021-10-24 18:44:10 +07:00
fzurita
3d5a39e647 Add a new "fast" shader path that doesn't use texelFetch in glsl 2021-10-17 10:27:44 -04:00
Sergey Lipskiy
8a3939aa70 Rewrite mipmap shader for GLES 2.0 2021-10-02 17:42:04 +07:00
Sergey Lipskiy
6f9b2f95b3 Use sliced texture atlas for mipmap textures to avoid possible texture size limitations. 2021-10-02 17:42:01 +07:00
Sergey Lipskiy
23ce26dbc4 Do not load mip-map levels if current combiner does not use LOD.
Workaround for grass in Mario Tennis intro.
2021-10-02 17:41:58 +07:00
s2s
dd64b42081 Remove needReplaceTex1byTex0() 2021-10-02 17:41:53 +07:00
Sergey Lipskiy
539e3b0ad4 Rewrite mip-maps load:
* load all but the first mip-map tiles as 1D texture atlas, that is array of texels.
  all tiles loaded as rgba32.
  first 8 texels contain information about tile's width, height and offset, 1 texel per tile.
* mipmap shader corrected to fetch texels from the atlas.

All hacks, which were necessary to load N64 mip-maps into OpenGL texture are removed.
2021-10-02 17:41:41 +07:00
Rosalie Wanders
c36ffa97f7 GLideNUI: introduce config.hotkeys.enabledKeys 2021-07-29 15:44:56 +07:00
Sergey Lipskiy
5072ec8ee8 Fix anisotropic filtering.
Fixed #2527 Is anisotropic filtering always ON
2021-07-22 22:17:07 +07:00
fzurita
c5d942b436 Fix crash when trying to delete invalid frame buffer 2021-05-01 17:02:28 +07:00
Sergey Lipskiy
abb9108f14 Implement configurable hotkeys. 2020-12-02 18:14:08 +07:00
fzurita
e89f5fedcc Fix build error and warning with Android 2020-11-16 10:39:10 +07:00
Sergey Lipskiy
e81022ad71 Correct _calculateCRC:
tile tmem address can be set to a value greater than 512, that is above TMEM size.
It should be used with proper mask for tileTmemInBytes calculation.

Fixed #2360 Castlevania 64 Crash
2020-11-10 15:41:35 +07:00
Sergey Lipskiy
35567da2ad Modifications for mip-mapped textures load.
Treat specail case for Southern Swamp grass texture, Zelda MM, #2315
2020-09-16 18:50:55 +07:00
Sergey Lipskiy
76d72f77b7 [Code refactor] Correct TextureCache::_load:
add RAII holder for texture data.
2020-08-31 11:53:41 +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
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
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
S2S
4834359ec1 Delay texture coordinate normalization. Adapt texture filter to texture engine. 2020-05-10 16:24:28 +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
Logan McNaughton
c168f53d12 Fix bug introduced by 85a8635952 2020-04-05 11:06:58 +07:00
Logan McNaughton
85a8635952 Update to XXH3 for CRC_OPT 2020-03-30 21:16:59 +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
fzurita
44ce554d5f Fix issues with EGL image public API on GLES 2.0 2019-11-30 15:54:59 +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
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
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
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
83dde99f6b Fix TextureCache::_loadHiresTexture: use correct tile when gSP.texture.tile != 0 2019-06-19 19:02:57 +07:00