mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Fix noise-based effects on texrects in "texrect in native res" mode.
Fixed GLideN64 3.0 Regression (Noise) #1740
This commit is contained in:
parent
3289bd378b
commit
cbbc83ac96
|
@ -402,6 +402,11 @@ public:
|
||||||
|
|
||||||
void update(bool _force) override
|
void update(bool _force) override
|
||||||
{
|
{
|
||||||
|
if (dwnd().getDrawer().isTexrectDrawerMode()) {
|
||||||
|
uScreenScale.set(1.0f, 1.0f, _force);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
FrameBuffer * pBuffer = frameBufferList().getCurrent();
|
FrameBuffer * pBuffer = frameBufferList().getCurrent();
|
||||||
if (pBuffer == nullptr)
|
if (pBuffer == nullptr)
|
||||||
uScreenScale.set(dwnd().getScaleX(), dwnd().getScaleY(), _force);
|
uScreenScale.set(dwnd().getScaleX(), dwnd().getScaleY(), _force);
|
||||||
|
|
|
@ -153,6 +153,8 @@ public:
|
||||||
|
|
||||||
void flush() { m_texrectDrawer.draw(); }
|
void flush() { m_texrectDrawer.draw(); }
|
||||||
|
|
||||||
|
bool isTexrectDrawerMode() const { return !m_texrectDrawer.isEmpty(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class DisplayWindow;
|
friend class DisplayWindow;
|
||||||
friend TexrectDrawer;
|
friend TexrectDrawer;
|
||||||
|
|
|
@ -146,6 +146,7 @@ void TexrectDrawer::add()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_numRects == 0) {
|
if (m_numRects == 0) {
|
||||||
|
m_numRects = 1;
|
||||||
m_pBuffer = frameBufferList().getCurrent();
|
m_pBuffer = frameBufferList().getCurrent();
|
||||||
m_otherMode = gDP.otherMode._u64;
|
m_otherMode = gDP.otherMode._u64;
|
||||||
m_mux = gDP.combine.mux;
|
m_mux = gDP.combine.mux;
|
||||||
|
@ -157,7 +158,9 @@ void TexrectDrawer::add()
|
||||||
m_lrx = m_max_lrx = pRect[3].x;
|
m_lrx = m_max_lrx = pRect[3].x;
|
||||||
m_lry = m_max_lry = pRect[3].y;
|
m_lry = m_max_lry = pRect[3].y;
|
||||||
|
|
||||||
CombinerInfo::get().update();
|
CombinerInfo & cmbInfo = CombinerInfo::get();
|
||||||
|
cmbInfo.update();
|
||||||
|
cmbInfo.updateParameters();
|
||||||
gfxContext.enableDepthWrite(false);
|
gfxContext.enableDepthWrite(false);
|
||||||
gfxContext.enable(enable::DEPTH_TEST, false);
|
gfxContext.enable(enable::DEPTH_TEST, false);
|
||||||
gfxContext.enable(enable::BLEND, false);
|
gfxContext.enable(enable::BLEND, false);
|
||||||
|
@ -167,6 +170,8 @@ void TexrectDrawer::add()
|
||||||
gfxContext.setScissor((s32)gDP.scissor.ulx, (s32)gDP.scissor.uly, (s32)(gDP.scissor.lrx - gDP.scissor.ulx), (s32)(gDP.scissor.lry - gDP.scissor.uly));
|
gfxContext.setScissor((s32)gDP.scissor.ulx, (s32)gDP.scissor.uly, (s32)(gDP.scissor.lrx - gDP.scissor.ulx), (s32)(gDP.scissor.lry - gDP.scissor.uly));
|
||||||
|
|
||||||
gfxContext.bindFramebuffer(bufferTarget::DRAW_FRAMEBUFFER, m_FBO);
|
gfxContext.bindFramebuffer(bufferTarget::DRAW_FRAMEBUFFER, m_FBO);
|
||||||
|
} else {
|
||||||
|
++m_numRects;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bDownUp) {
|
if (bDownUp) {
|
||||||
|
@ -187,7 +192,6 @@ void TexrectDrawer::add()
|
||||||
coords.x = pRect[3].x;
|
coords.x = pRect[3].x;
|
||||||
coords.y = pRect[3].y;
|
coords.y = pRect[3].y;
|
||||||
m_vecRectCoords.push_back(coords);
|
m_vecRectCoords.push_back(coords);
|
||||||
++m_numRects;
|
|
||||||
|
|
||||||
Context::DrawRectParameters rectParams;
|
Context::DrawRectParameters rectParams;
|
||||||
rectParams.mode = drawmode::TRIANGLE_STRIP;
|
rectParams.mode = drawmode::TRIANGLE_STRIP;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user