Amaro Martínez
d96c679436
Merge branch 'master' of https://github.com/gonetz/GLideN64
2022-03-14 00:45:28 -05:00
Sergey Lipskiy
9e5564dc7c
Make FBInfo working when when "copy to RDRAM" option is disabled.
...
By design, FBInfo should control all copies from/to RDRAM.
When it is enabled, other options should be disabled.
IN practice it does not always work yet.
2022-02-20 11:16:49 +07:00
Sergey Lipskiy
ccc8587367
Allow copy color buffer to RDRAM when current buffer is null.
...
Problem: JFG crosshair has incorrect color when FBInfo and Aux buffer copy are enabled.
"Aux buffer copy" copies the buffer and removes it.
If aux buffer is the current one, the current buffer set to null.
FBInfo uses ColorBufferToRDRAM to copy color buffer ti RDRAM.
ColorBufferToRDRAM does nothing when current frame buffer is null, so
FBInfo can't copy the buffer.
Solution: allow copy to RDRAM when current buffer is null.
Note: copy to RDRAM when current buffer is null was disabled in
commit bbc71c3f0
to fix problem "Snowboard Kids causes segmentation fault #477 "
Now Snowboard Kids does not crash here.
2022-02-20 11:16:49 +07:00
Blake Warner
0255e10db6
native port
2022-01-29 17:22:09 -05: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
f5e73a8081
Bind to the current frame buffer FBO when copying auxiliary buffers to
...
RDRAM
2021-05-02 18:24:11 +07:00
Sergey Lipskiy
e85e0f4a5f
Fix issues in ColorBufferToRDRAM::_prepareCopy:
...
* remove an optimization: don't update current buffer if it is the same for the current frame.
This optimization causes crash in Zelda OOT pause screen with "aux buffer copy" enabled.
* fix width calculation for aux buffers when "aux buffer copy" enabled.
2021-04-20 23:32:27 +07:00
s2s
81318c5445
Use screen coordinates to render primitives
2021-04-19 21:55:00 +07:00
fzurita
1d90610782
Fix EGL image being broken at 1x native resolution factor
2021-04-19 21:50:55 +07:00
fzurita
43a5d16905
Keep a color copy FBO and texture per N64 frame buffer
2021-04-19 21:50:55 +07:00
fzurita
5f7a7cadc2
Stop using predefined texture sizes introduced for Android
...
For Android we use EGL image for async copies and for sync copies and
devices that don't support EGL image, the fixed texture sizes don't seem
to improve performance.
2021-04-19 21:50:55 +07:00
Sergey Lipskiy
e09d153233
Do not test values of 8bit buffer before write them to RDRAM.
...
Fixed copy of 8bit aux buffers to RDRAM.
refs #2461
2021-02-21 15:41:56 +07:00
S2S
eb8ac40136
Revert 538674d
...
Fixes Oak's Check with CopyColorFromRDRAM enabled
2021-01-08 23:00:42 +07:00
Sergey Lipskiy
ddd93673d8
Fixed some undefined behaviour errors found in #2364
2020-11-14 16:50:50 +07:00
S2S
4834359ec1
Delay texture coordinate normalization. Adapt texture filter to texture engine.
2020-05-10 16:24:28 +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
zilmar
47013e2473
Set buffer to nullptr after free
2020-04-28 15:50:37 +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
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
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
41ecf66e80
Add blue-noise dithering, http://momentsingraphics.de/BlueNoise.html
2020-03-31 18:31:42 +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
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
fzurita
44ce554d5f
Fix issues with EGL image public API on GLES 2.0
2019-11-30 15:54:59 +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
462dd2a9bc
FIx EGL image compatibility with mali devices
2019-10-05 22:41:33 +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
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
a5e8bf4f3c
Fix DepthBufferToRDRAM::_prepareCopy RDRAM bound condition.
2019-02-22 12:14:09 +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
9d7eb5b882
Fix in RDRAMtoColorBuffer::_copyFromRDRAM - draw rect in copy mode.
2018-10-17 15:52:53 +07:00
Sergey Lipskiy
0c2c4d3c27
Restore SCISSOR_TEST mode in RDRAMtoColorBuffer::_copyFromRDRAM
2018-10-17 15:52:52 +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
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
10710f96ac
Fix warnings from compiler and static code analizer.
2018-05-06 15:28:07 +07:00
Sergey Lipskiy
75ea06cec7
Code refactoring: fix issues found by static code analizer.
2018-04-19 20:16:21 +07:00
Logan McNaughton
958758b37a
Remove PixelWriteBuffer
...
And a few other small fixes
2018-03-09 20:32:56 +07:00
Logan McNaughton
cb90bb95ed
Cleanup FB Texture caching code
2018-02-26 21:15:51 +07:00
Sergey Lipskiy
26623cec1f
Code cleanup: fix issues in GLideN64 found by static code analyser.
2017-11-18 22:07:27 +07:00
Sergey Lipskiy
737338ca20
Use fixed point calculation for texrect s and t coordinates.
...
It is impossible to handle integer overflow when coordinates in float format.
Fixed textures in Major League Baseball #146
2017-11-18 15:41:18 +07:00
Logan McNaughton
a8aa9833e4
Fix chunk copy start address
2017-11-16 09:44:51 +07:00
Sergey Lipskiy
9ab843a9cc
Fix copy buffer chunk to RDRAM.
2017-11-16 09:44:48 +07:00
Sergey Lipskiy
4d4a2d18a2
Fix RDRAMtoColorBuffer::copyFromRDRAM with FBInfo
2017-11-16 09:44:44 +07:00
Francisco Zurita
538674da51
Fix Pokemon Snap border flicker
...
This flicker happens while zooming in to take a picture while RDRAM to
color buffer and color buffer to RDRAM are both enabled.
2017-11-15 16:17:42 +07:00
Logan McNaughton
5f088c70ce
Copy 4k block in FBInfo Chunk copies
2017-11-11 13:59:12 -07:00