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

318 Commits

Author SHA1 Message Date
Amaro Martínez
d96c679436
Merge branch 'master' of https://github.com/gonetz/GLideN64 2022-03-14 00:45:28 -05:00
Sergey Lipskiy
49373fde71 Correct FrameBuffer::isAuxiliary()
If buffer's size is 8bit, it is an auxiliary buffer.

Fixed homebrew toonshading not working properly. #2644
2022-02-14 18:16:01 +07:00
DaMarkov
19533b5d18 Cleanup and missed on change in FrameBuffer.cpp. 2022-02-08 16:58:56 +01:00
DaMarkov
311608c42d Used NATIVE compiler flag to make changes for OOT optional. 2022-02-08 14:01:30 +01:00
DaMarkov
e5332785fc Changed GLideN64 so it works with framebuffer emulation enabled with OOT. 2022-02-08 03:44:17 +01:00
Blake Warner
0255e10db6 native port 2022-01-29 17:22:09 -05:00
Sergey Lipskiy
94ce6203b6 Limit max height for main frame buffers by VI.height
Fixed #2519 Extreme G picture is shaking / unstable
2021-11-20 17:22:24 +07:00
Sergey Lipskiy
46c58576e2 Code refactor. add calcShiftScaleS and calcShiftScaleT
Remove code duplication.
2021-11-06 17:14:24 +07:00
Sergey Lipskiy
4911bd7eb5 Init hdRatio for depth buffer texture.
Fixes #2577 Mario Golf: Animated effects render in front of course
2021-10-02 20:44:52 +07:00
Sergey Lipskiy
7abf593da3 Set m_cleared to false in FrameBuffer::copyRdram().
m_cleared means that the RDRAM buffer contains only fillcolor.
It should be false after copyRdram() since from now the buffer validity check should work with m_RdramCopy.

It Fixes Kirby 64 broken level selection, #2491
Without this fix, the level selection is broken when copy color to RDRAM is disabled
2021-05-15 20:44:07 +07:00
fzurita
43a5d16905 Keep a color copy FBO and texture per N64 frame buffer 2021-04-19 21:50:55 +07:00
Rosalie Wanders
07ce8f7bcb FrameBuffer: don't resolve multisampled texture when m_pResolveTexture is null 2020-11-23 14:48:58 +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
gizmo98
4981503bfc Code refactor: add vi status constants 2020-10-29 16:55:37 +07:00
oddMLan
38fd50414f Fix downscaling aliasing caused by 2f5280c 2020-08-14 17:29:04 +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
S2S
4834359ec1 Delay texture coordinate normalization. Adapt texture filter to texture engine. 2020-05-10 16:24:28 +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
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
Logan McNaughton
7ef3be1cab Mask VI_ORIGIN address 2020-04-15 11:12:42 +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
fzurita
44ce554d5f Fix issues with EGL image public API on GLES 2.0 2019-11-30 15:54:59 +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
62b4389d16 Use TexrectCopyProgram if TexrectColorAndDepthCopyProgram is not awailable. 2019-09-29 16:13:03 +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
4808179691 Fixed crash in case of wrong FrameBuffer::m_scale initialization. 2019-09-05 18:47:45 +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
Francisco Zurita
c06c593eba Improve logging information 2019-04-23 11:15:41 +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
b0380e0a04 Increase log level for VI warnings. Users should not see them. 2019-02-24 18:56:30 +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
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
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
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
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
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
68a2c939b4 Correct FrameBufferList::fillRDRAM - do not write to RDRAM color buffer if copyFromRDRAM enabled 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
Sergey Lipskiy
8b3597614a Always render RDRAM content into newly created frame buffer. Remove ugly hack for Mario Tennis scoreboard. 2018-10-17 15:52:52 +07:00
Sergey Lipskiy
5538c7b4bb Add support for frame buffers, which are inside of some other frame buffer.
Fixed Superbowling: black screen in menu and game #116
2018-10-17 15:52:51 +07:00
Sergey Lipskiy
c8b6d35597 Minor code cleanup in FrameBuffer.cpp 2018-10-17 15:52:51 +07:00
Sergey Lipskiy
2f83650725 Switch from blitOrCopyTexturedRect() to copyTexturedRect() in OverscanBuffer::draw. 2018-09-24 20:33:12 +07:00