1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00
Commit Graph

299 Commits

Author SHA1 Message Date
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
Sergey Lipskiy
3faa383c55 Fix in FrameBufferList::renderBuffer() : draw blank frame if VI state is wrong.
Previously renderBuffer() did nothing in that case and last rendered frame remained on screen.

Fixed Perfect Dark (Missing Transition Animation at end of Title Intro Screen - PD Logo Doesn't Disappear) #1715
2018-09-24 20:33:08 +07:00
Sergey Lipskiy
ae67c77c9d Replace direct call of Postprocessor methods by list of available postprocessing functions. 2018-09-09 16:41:37 +07:00
Sergey Lipskiy
9705f5d520 Implement FXAA 2018-09-09 16:36:09 +07:00
Sergey Lipskiy
15188dad16 Fix destX calculation in FrameBufferList::renderBuffer()
Fixed black boarders size in Banjo-Kazooie.
2018-09-08 00:13:43 +07:00
Sergey Lipskiy
be49e9e2e9 Correct check for side-by-side buffers in FrameBufferList::renderBuffer()
Fixed Kirby 64 - screen jumps in full screen. #1750
2018-09-07 23:00:45 +07:00
Sergey Lipskiy
b3068d9536 Fix OverscanBuffer::getScaleX() 2018-08-28 20:57:50 +07:00
Sergey Lipskiy
2a677a23a8 Implement left offset for source image when VI_ORIGIN address points on non-zero position in scan-line.
Fixed PAL version of International Superstar Soccer 98, #1845
2018-06-23 21:56:10 +07:00
Sergey Lipskiy
2322f5f53f Implement Overscan feature.
Remove Crop feature.
Change settings save-load when "per game settings" enabled:
    * When config dialog opens, show custom settings for the running game. If no game run yet, show main settings.
    * When user press OK button, save settings to the custom ini file and to the main ini file.
2018-06-17 20:04:45 +07:00
Logan McNaughton
e80577e105 Allow non-0 default framebuffer 2018-05-22 08:25:24 -06:00
Sergey Lipskiy
6725ad474a Fix warnings of 64bit compiler. 2018-05-06 15:54:12 +07:00
Sergey Lipskiy
2e7c0ecee2 Add forceDepthBufferClear config option.
Enable it for Eikou no Saint Andrews (J) in custom settings.

Fixed Eiko St Andrews: wrong 3d #161
2018-05-01 19:21:30 +07:00
Logan McNaughton
9bda0568a8 Copy FBO texture if glTextureBarrier is unsupported 2018-04-20 22:56:17 +07:00
Logan McNaughton
7bad64ce70 Only call texture barrier if we are sampling from current FB 2018-04-16 11:35:15 +07:00
Logan McNaughton
c9cf91e8da Add support for ext_shader_framebuffer_fetch 2018-04-16 11:32:35 +07:00
Logan McNaughton
c01c0d5166 use gl_LastFragDepthARM and glTextureBarrier 2018-04-13 21:24:56 +07:00
Logan McNaughton
18e9a73eba Cache SpecialFeatures check 2018-04-07 11:30:33 +07:00
Logan McNaughton
9c73fb27b1 Remove Image Texture requirement for some shaders 2018-04-07 11:30:33 +07:00
Sergey Lipskiy
ed21ec774b Fix TexrectDrawer when frame buffer emulation disabled. 2018-03-21 21:20:57 +07:00
Logan McNaughton
cb90bb95ed Cleanup FB Texture caching code 2018-02-26 21:15:51 +07:00