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

1414 Commits

Author SHA1 Message Date
AmbientMalice
eac8efc351 Fix 'Shadres' typo in UI and translation files. 2015-10-02 21:37:33 +06:00
Sergey Lipskiy
5ca35ad5a7 Merge pull request #735 from purplemarshmallow/12
disable depth buffer emulation by default
2015-09-30 14:44:05 +06:00
purplemarshmallow
3caa176063 disable depth buffer emulation by default 2015-09-29 21:41:41 +02:00
Sergey Lipskiy
6023b34676 Fix OGLRender::drawLine, issue #733 2015-09-29 23:33:37 +06:00
Sergey Lipskiy
5ac814bb7b Simplify OGLRender::_canDraw(). 2015-09-29 23:32:31 +06:00
Sergey Lipskiy
b67789acc5 Fix bug in TxFilter::dmptx - osal_mkdirp returns 0 if OK. 2015-09-29 18:19:53 +06:00
Sergey Lipskiy
586af36bfa Don't wrap fb texture coordinates when clamp is on.
Fixed Pokemon Stadium (J) wrong monitors, #724
2015-09-29 13:26:24 +06:00
Sergey Lipskiy
05e62b7ffd Correct readTexMS shader.
Fixed #731
2015-09-29 09:37:59 +06:00
Sergey Lipskiy
16136b04e9 Do not set buffer's height to VI.height if it is zero.
WARNING: potentially dangerous!
2015-09-27 10:54:19 +06:00
Sergey Lipskiy
3bd24d34a1 Disable FBO draw when current buffer set to NULL. 2015-09-27 10:54:11 +06:00
Sergey Lipskiy
864eb9f97e Don't draw anything if frame buffer emulation is on, but current buffer is NULL. 2015-09-27 10:53:59 +06:00
Sergey Lipskiy
a365afdf7f Correct buffer height detection in gDPSetColorImage:
don't use viewport height in LLE mode, since LLE does not use viewport.
2015-09-27 10:49:21 +06:00
Sergey Lipskiy
1beadcb625 Add VI parameters correction to RSP_ProcessDList().
Pokemon Stadium can change REG.VI_ORIGIN without call to VI_UpdateScreen(),
at least with Project64. Thus, frame buffer allocation may work with
obsolete VI info, which causes various glitches, e.g #415
2015-09-27 10:49:20 +06:00
Sergey Lipskiy
24885907d8 Add hack_ZeldaCamera to fix camera in Zelda MM, #577
The game copies current frame buffer to the area, which initially allocated for depth buffer.
Game read camera data from that area, not from normal frame buffer.
That's why 'copy color buffer to RDRAM' option does not help there.
Special code needed to process that. Looks ugly, but works.
2015-09-27 10:10:05 +06:00
Sergey Lipskiy
1eaa967553 Add hack_skipVIChangeCheck hack for Zelda MM.
Fix problem with Majora's Mask subscreen after Bomber's Notebook read, #698

The game switches to interlaced mode when it opens Notebook screen and background buffer is removed.
This hack prevents buffers clear on VI change.
2015-09-26 22:36:31 +06:00
Sergey Lipskiy
a3f9b43b4a Disable _copyDepthBuffer() for GLES2 only. 2015-09-26 22:36:25 +06:00
Sergey Lipskiy
27c4cccd81 Code refactor in _copyDepthBuffer(). 2015-09-26 22:13:49 +06:00
Sergey Lipskiy
bff19580eb Code refactor: CheckForFrameBufferTexture - use fbList variable instead of calls to frameBufferList() 2015-09-26 22:11:31 +06:00
Sergey Lipskiy
874ebce5ca Use fixed alpha flag only for 8bit frame buffers.
Otherwise it cause regression in Pokemon Stadium 2, see #721
2015-09-25 22:04:59 +06:00
Sergey Lipskiy
a98aac9fd4 Make frame buffer texture monochrome when it is used as IA texture.
Fixes sepia effect in Pokemon Stadium 2 during credits, #721
2015-09-25 19:34:46 +06:00
Sergey Lipskiy
d506d6134d Set vertex alpha for texrect to 1.
This is actually a hack. Rect functions use vertex color and alpha set to zero.
This hack is done to fix issue #721 in Pokemon Stadium 2. The game uses
texrects to render images in the auxiliary buffer. The texrects use SHADE
for alpha combiner. Since alpha is zero, the rendered image in the auxiliary buffer
has zero alpha. When the auxiliary buffer is used as texture, it is blended with
background, and zero alpha makes it invisible. I set vertex alpha to 1 to avoid it.

When N64 saves pixel to 16bit frame buffer, it uses pixel coverage for alpha value to store,
not calculated pixel's alpha. Thus, on real N64 the auxiliary buffer will have
full alpha and blending will not make it invisible. Thus, true emulation will
require pixel coverage calculation and shader-based blending.
2015-09-25 19:34:41 +06:00
Sergey Lipskiy
11317c2d85 Correct some blend modes. 2015-09-25 18:50:39 +06:00
Sergey Lipskiy
1fb78594c8 Fix buffer end address calculation in FrameBuffer::reinit.
Fixed regression in Pokemon Stadium 2: the bottom of the portraits is cut off, see #415
2015-09-25 12:21:20 +06:00
Sergey Lipskiy
43d387b956 Fix compilation of GLSLCombiner_gles2.cpp 2015-09-24 19:01:51 +06:00
Sergey Lipskiy
076345dadb Do not init NoiseTexture is noise emulation option is disabled. 2015-09-21 21:42:46 +06:00
Sergey Lipskiy
2ec48ee251 Optimize NoiseTexture update: do not create new buffer data on each update. 2015-09-21 21:42:42 +06:00
Sergey Lipskiy
a73b8dddbd Fix bug in FrameBufferList::saveBuffer :
corrent end address for auxiliary buffer only if it was not corrected by correctHeight().
2015-09-20 20:28:05 +06:00
Sergey Lipskiy
702a0d8203 Correct FrameBufferList::saveBuffer :
disable draw to FBO if new buffer can't be saved because of wrong buffer size
2015-09-20 20:12:52 +06:00
Sergey Lipskiy
6ad1d1d3a5 Correct FrameBufferList::correctHeight() :
do not change buffer if new buffer height is the same as the current one.
2015-09-20 20:09:59 +06:00
Sergey Lipskiy
22a1e6a39f Revert "Correct frame buffer end address calculation in FrameBufferList::saveBuffer."
Seems to be not needed anymore.

This reverts commit bb6a9b3549.
2015-09-20 20:02:22 +06:00
Sergey Lipskiy
3d6a897c97 Fix GL error when CopyToRDRAM a buffer with zero width or height. 2015-09-20 15:31:39 +06:00
Sergey Lipskiy
1bf3b6e85a Fix alphaNoiseDither.
Weird, but use of bit mask causes the shader to work completely wrong, see #518
2015-09-19 19:27:12 +06:00
purplemarshmallow
f487225b48 Optimize Perfect Dark framebuffer effects
We only check once per frame. ~100% performance boost in deep sea with
infrared vision.
2015-09-19 18:45:32 +06:00
purplemarshmallow
e7024978ac don't update NoiseTexture if noise is disabled
updating NoiseTexture kills performance in Star Wars Episode I - Racer.
If noise emulation is disabled there's no need to update it.
2015-09-19 18:00:47 +06:00
matto
18172a6c0b Fixing multisampling
We were calling glTexStorage2DMultisample with a 'samples' parameter of 0.
Reading the GL 4.4 spec, this is specifically forbidden, but the
documentation pages from Chronos were incorrectly stating that it was
allowed, so many implementations probably accept it. Mesa, the graphics
driver for many Linux cards has recently been corrected so that it emits
a warning and fails when glTexStorage2DMultisample is called with
samples=0. The current release works, but the next one will fail when
multisampling is turned off in this plugin (with multisampling turned
on, it will work the same as before).

The documentation pages from Kronos have since been updated to reflect
the GL spec (I put in a bug to them). You can see the proper
changes at this address
(https://www.opengl.org/wiki/GLAPI/glTexStorage2DMultisample).
2015-09-08 10:58:52 +06:00
matto
0ea397a4cc Changing the getRevision script to place the header differently
I called getRevision.sh from a directory other than src and I ended
up with an unexpected Revision.h in my current directory without
placing one in src. This modifies the script to place the header
file in the same directory as the script.
2015-09-05 16:24:17 -04:00
purplemarshmallow
1fcb64ca79 Revert "Don't discard frame buffers creation when _height == 0"
This reverts commit de32176303.

This commit causes regressions:
In Pokemon Stadium when starting a battle one portrait can be missing
failed assertion in framebuffer.cpp Line:580 Expression checkFBO()
2015-09-04 10:09:00 +06:00
purplemarshmallow
edc09dffff ini fixes:
- up config version in custom ini
- remove txPath
2015-09-03 21:45:07 +06:00
matto
3e8ab78258 Code cleanup: Adding newlines to code lines that were too long.
I think this adds to the readability of the code, as my brain
starts reeling when the line has to break off the page.
2015-09-03 21:27:55 +06:00
matto
6c22746619 Code cleanup: removing random semicolon. 2015-09-03 21:25:40 +06:00
matto
4eb27a8795 Adding assert on malloc
We do this in other places and I think it's good behaviour for the
exceptional occasion that we cannot allocate memory.
2015-09-03 21:24:35 +06:00
matto
6156c35617 Code cleanup: moving logic from large loop in TextureCache::_load to
worker function.

This makes this loop tighter and easier to read. The loop was really
difficult to read before, and now it's a tad easier.
2015-09-03 21:22:08 +06:00
purplemarshmallow
2847606877 Always reinit buffer after its height correction.
This fixes pokemons library in Pokemon Stadium 2.
2015-09-03 20:52:12 +06:00
matto
fa7e1c8137 Splitting up asserts
If these asserts are to be useful for debugging, they should really
be split up so that we can tell which one is failing.
2015-08-29 11:55:34 -04:00
purplemarshmallow
59c771cb7b [ini] remove Knockout Kings 2015-08-27 19:44:27 +06:00
purplemarshmallow
b62e50a86e [ini] remove validityCheckMethod 2015-08-27 19:44:24 +06:00
Sergey Lipskiy
2604b57bf1 Remove ValidityCheckMethod from config and UI.
Up config version.
2015-08-27 19:44:19 +06:00
purplemarshmallow
8e096a8db9 remove fill RDRAM functionality
fix m_fingerprint usage
fix code formatting
2015-08-27 19:43:00 +06:00
Sergey Lipskiy
c6988bb963 Fig regression with frame/depth buffer copy in HLE mode caused by commit 77f342f. 2015-08-27 19:39:29 +06:00
Sergey Lipskiy
5eddea5baf Add workaround for Adreno issue with glBlitFramebuffer.
Thanks fzurita for problem investigation and found solution.
2015-08-27 19:20:26 +06:00