Sergey Lipskiy
3961b5e368
Code cleanup: Split ShaderCombiner::updateColors on several functions.
2015-05-13 10:19:52 +06:00
Sergey Lipskiy
79ddb63c33
Fix CHANGED flags clear in OGLRender::_updateStates()
...
Noticable performance boost.
2015-05-13 10:19:51 +06:00
Sergey Lipskiy
61e6eb268c
Correct condition for buffers removal in VI_UpdateSize() :
...
remove buffers when interlace mode changed or when main buffer width changed.
2015-05-13 10:19:51 +06:00
Sergey Lipskiy
ff890e3bc8
Add special blend mode hack to remove Pilot Wings brown boxes.
2015-05-13 10:19:50 +06:00
Sergey Lipskiy
aa05ea2b54
Add Pilot Wings ucode to the list of special ucodes, because it needs NoN clipping.
2015-05-13 10:19:49 +06:00
Sergey Lipskiy
4f0b0631b9
Add special fog modes support for texrects.
...
Fixed lode runner: missing blending effect on texts #275
2015-05-13 10:19:49 +06:00
Sergey Lipskiy
30d6792a17
Check buffers intersection even when nothing was drawn to the current buffer.
...
Fixed buffer overflow in Lode Runner.
2015-05-13 10:19:48 +06:00
Sergey Lipskiy
1152f9413c
Correct condition for FrameBuffer::m_needHeightCorrection.
...
Fixed screen shake in Mario Tennis (E), issue #296
2015-05-13 10:19:47 +06:00
Sergey Lipskiy
e5c452530a
Correct VI.width calculation for interlaced mode.
...
Fixed crash in Topgear hyper bike #256
2015-05-13 10:19:47 +06:00
Sergey Lipskiy
d68e9ed13a
Correct gDPFillRDRAM: don't write buffer address at start of the buffer.
2015-05-13 10:19:46 +06:00
Sergey Lipskiy
aaf5a56d6a
Add debugPrint function
2015-05-13 10:19:45 +06:00
Sergey Lipskiy
1e2e2e980b
Remove _updateStates() call from OGLRender::clearDepthBuffer().
...
It seems to be useless here, plus it can break combiners work.
Fixed Fushigi no Dungeon - Fuurai no Shiren 2 black sky in intro #298
2015-05-13 10:19:45 +06:00
Sergey Lipskiy
cc4b8a88e6
Correct gSPSetOtherMode_L.
...
Fixed blending issue in Bomberman Hero, #225
2015-05-13 10:19:44 +06:00
Sergey Lipskiy
b94d63a746
Add blend mode for Bomberman Hero
2015-05-13 10:19:43 +06:00
Sergey Lipskiy
8b59da54d7
Move noise dithering into separate shader.
2015-05-13 10:19:43 +06:00
Sergey Lipskiy
dd2e7e098b
Call alpha test before alpha dither.
2015-05-13 10:19:42 +06:00
Sergey Lipskiy
74bdb1aa74
Insert calc_light call only for combiners, which use shade color.
2015-05-13 10:19:41 +06:00
Sergey Lipskiy
aa59f2b2eb
Simplify calc_light shader
2015-05-13 10:19:41 +06:00
Sergey Lipskiy
97d0940f82
Code cleanup: move fragment shader creation into separate function.
2015-05-13 10:19:40 +06:00
Sergey Lipskiy
e27d235544
Don't reset m_cleared flag for selected frame buffer.
...
Fixed fb issues in ISS 2000, #214
2015-05-13 10:19:39 +06:00
Sergey Lipskiy
d4f0407b1f
Code cleanup: remove unused variables in DepthBufferToRDRAM::CopyToRDRAM.
2015-05-13 10:19:38 +06:00
Sergey Lipskiy
0ea5ae34e0
Correct scissor for blit operation.
2015-05-13 10:19:38 +06:00
Sergey Lipskiy
7f5cbe9e91
Replace depricated texture2DLod by textureLod.
2015-05-13 10:19:37 +06:00
Sergey Lipskiy
395eb362f1
Don't save depth buffer when found buffer's width is less than VI.width.
...
Otherwise out of memory writes are possible.
That may happen when switching from interlaced to non-interlaced mode.
Fixed crash/freeze in Perfect Dark, issue #285
2015-05-13 10:19:36 +06:00
Sergey Lipskiy
10239fe610
Fix out of RDRAM check in gDPLoadTile.
...
Fixed crash in BIO Freaks, issue #278
2015-05-13 10:19:36 +06:00
Sergey Lipskiy
9935dab147
Correct dirty hack for Mario Tennis scoreboard:
...
- do not clear RDRAM area for screboard buffers
- reload scoreboard texture to the buffer when buffer is selected or its height is corrected.
2015-05-13 10:19:35 +06:00
Sergey Lipskiy
ff085b0cbf
Correct RDRAMtoFrameBuffer::CopyFromRDRAM
2015-05-13 10:19:34 +06:00
Sergey Lipskiy
a84006ce5f
Force load texture level 0 when mip-mapping is not used.
...
This solves problem with court texture in Mario Tennis:
the game set mipmap level, texture loaded with mip-maps but color combiner does not use LOD factor.
Fetch with texture2D loads texel from best suiting level, but we need only level 0.
2015-05-13 10:19:34 +06:00
Sergey Lipskiy
35ea6f28fb
Load mip-mapped texture only when LOD emulation is enabled.
2015-05-13 10:19:33 +06:00
Sergey Lipskiy
2edc1bb8e0
Always use mask size first when calculate texture size.
...
Fixed court texture in Mario Tennis.
2015-05-13 10:19:32 +06:00
Sergey Lipskiy
f5ca94b1ef
Remove frame buffer validity check by buffer address written at the origin
...
of the buffer in RDRAM. This is unreliable method.
2015-05-13 10:19:32 +06:00
Sergey Lipskiy
c6083851fc
Add special texrect function for Conker BFD shadow.
...
Problem:
shadow is rendered into an auxilary buffer. At the end of rendering the buffer is
renders to itself as texture, using texrect command. FBO work in undefined
when it's color attachment is used as input and output. As result the
shadow is incorrect.
Thus, it's better to skip that texrect. Hack!
2015-05-13 10:19:31 +06:00
Sergey Lipskiy
fce5639a85
Add special blend mode for Conker BFD dynamic shadows
2015-05-13 10:19:30 +06:00
Sergey Lipskiy
4fd545225b
Remove hack from gDPSetTile
2015-05-13 10:19:29 +06:00
Sergey Lipskiy
0b6cf6d107
Fix typo in Combiner_Init()
2015-05-13 10:19:29 +06:00
Sergey Lipskiy
b5e2413a49
Update fb isues list
2015-05-13 10:19:28 +06:00
Sergey Lipskiy
8945e13e76
Correct VI.width calculation.
...
Fixed screen distortion in Excite Bike 64
2015-05-13 10:19:28 +06:00
Sergey Lipskiy
d65cdbdefe
Correct validity check for 8bit frame buffers.
...
Buffer is valid if number of wrong pixels is less than 1%
That is made for Jet Force Gemini, which writes to the area of auxilary buffers,
so strict check does not work.
2015-05-13 10:19:27 +06:00
Sergey Lipskiy
4bc815c6ec
Reset config.generalEmulation.hacks on new rom load.
2015-05-13 10:19:26 +06:00
Sergey Lipskiy
cbdacb58d8
Don't call FrameBufferList::_findBuffer until buffer's actual height is not detected.
...
Otherwise wrong buffers can be removed.
Fixed auxilary buffers creation in Pokemon Stadium menu.
2015-05-13 10:19:25 +06:00
Sergey Lipskiy
5384e189c4
Don't discard frame buffers creation when VI.height == 0
...
Fixed auxilary color buffers creation in Pokemon Stadium.
2015-05-13 10:19:25 +06:00
Sergey Lipskiy
66f7af5a59
Always correct height for auxilary buffers.
2015-05-13 10:19:24 +06:00
Sergey Lipskiy
51ea2868d5
Correct condition for buffers removal in VI_UpdateSize() :
...
remove buffers only when interlace mode changed.
Fixed wrong buffers removal in Pokemon Stadium.
2015-05-13 10:19:23 +06:00
Sergey Lipskiy
4ff13a30e6
Correct FrameBufferList::removeBuffers : remove all buffers with given width.
...
Fixed issue with Pokemon Stadium, which set zero VI height before
interlace mode switch.
2015-05-13 10:19:23 +06:00
Sergey Lipskiy
3ac4f2ddb1
Fix crash in FrameBufferList::renderBuffer when m_pCurrent is NULL
2015-05-13 10:19:22 +06:00
Sergey Lipskiy
4e7a5a6b9e
Do not remove auxilary color buffers on interlaced mode switch.
...
Fixed removal of color buffers with pokemon portraits in Pokemon Stadium 2.
2015-05-13 10:19:21 +06:00
Sergey Lipskiy
ea3e81540b
Correct FrameBuffer_ActivateBufferTexture:
...
use buffer's scale instead of scale currently set in video.
Fixed pokemon portraits size in Pokemon Stadium 2.
2015-05-13 10:19:21 +06:00
Sergey Lipskiy
3da54c5616
Re-init frame buffer if its new height is larger than its current one.
2015-05-13 10:19:20 +06:00
Sergey Lipskiy
dfabb7d105
Replace FrameBufferList::isFboMode() check by FrameBufferList::getCurrent() != NULL
2015-05-13 10:19:19 +06:00
Sergey Lipskiy
ea4d320809
Remove obsolete validity check for found frame buffer in loadBGImage.
...
Fixed pause screen in Zelda MM.
2015-05-13 10:19:18 +06:00