1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-06-30 16:29:56 +00:00
Commit Graph

169 Commits

Author SHA1 Message Date
Blake Warner
746be9cfa1 expand tmem 2022-03-29 17:42:18 -04:00
Blake Warner
0255e10db6 native port 2022-01-29 17:22:09 -05:00
Sergey Lipskiy
727639c8ba Fix gDP.m_texCoordBounds validity. 2021-12-05 15:18:51 +07:00
s2s
75fd353741 Modify implementation of texture coordinate bounds for non-native resolutions. 2021-12-05 15:18:51 +07:00
Sergey Lipskiy
46c58576e2 Code refactor. add calcShiftScaleS and calcShiftScaleT
Remove code duplication.
2021-11-06 17:14:24 +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
s2s
dd64b42081 Remove needReplaceTex1byTex0() 2021-10-02 17:41:53 +07:00
Sergey Lipskiy
66e8ff3c00 Drop render state after drawing a primitive, in gDPFullSync() and
GraphicsDrawer::copyTexturedRect to avoid wrong use of TexCoordBounds heuristics.

Fixed flickering in the starcraft intro when it transitions from picture to picture.
2021-06-06 18:57:33 +07:00
s2s
acf26e613d Apply a vertex position or texture coordinate shift to approximate N64 rasterization rules 2021-04-19 21:55:00 +07:00
Sergey Lipskiy
88e606de95 Another fix for texrect lower y. Follow-up 1e915af.
Fixed #2402 Wave race, black lines in texrects [Regression].
2021-01-31 21:25:27 +07:00
Sergey Lipskiy
f9ef2bd8fb Remove old LLE code. 2020-12-27 21:48:45 +07:00
Sergey Lipskiy
78c89fbbfd Fix some of PVS-Studio warnings. 2020-11-14 20:00:19 +07:00
Sergey Lipskiy
46c65776a0 Code refactor and cleanup:
* type cast fixes
* signed/unsigned fixes
* code formatting fixes
* class members initialization fixes
2020-11-14 16:54:28 +07:00
Sergey Lipskiy
ddd93673d8 Fixed some undefined behaviour errors found in #2364 2020-11-14 16:50:50 +07:00
Sergey Lipskiy
b6e030c8b8 [Code cleanup] Fix spaces. 2020-10-31 15:40:03 +07:00
purplemarshmallow
909cf172b9 correct "remove hack_texrect_shade_alpha"
fix regression  #2369
2020-10-31 12:18:57 +07:00
Logan
cf7b3c84ce Protect against addressing nullptr 2020-10-29 16:51:27 +07:00
purplemarshmallow
9a69fe8e58 remove hack_texrect_shade_alpha 2020-10-08 15:57:35 +07:00
Sergey Lipskiy
1e915af002 Correct gDPTextureRectangle:
use ceil(lry) instead of max(lry, uly + 1.0f)
It fixes the issue with zero height rectangles,
which often contain a garbage, see #2157
2020-09-16 18:49:53 +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
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
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
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
b261f34b0d Fix gDP.loadTile->loadHeight calculation.
Fixed Zelda 64 Skybox duplicates #2094.
2019-10-13 13:03:28 +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
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
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
3d74542d24 Correct geometry mode update for Turbo3D.
Fixed glitches in Dark Rift, #2033
2019-04-03 21:32:50 +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
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
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
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
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
fc70172327 Refactor update of buffer end address.
Add removeIntersections() after end address update.
2019-01-13 00:40:21 +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
fe6447070e Minor code refactor in gDPFillRectangle 2018-10-17 15:52:53 +07:00
Sergey Lipskiy
57ad2e96c6 Fix DepthBufferList::clearBuffer() for image textures. 2018-10-17 15:52:53 +07:00