mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-02 09:03:37 +00:00
Detect microcodes, where texture perspective correction is always enabled.
Fixed Quake 64 HLE incorrect particles. #637
This commit is contained in:
parent
cc5dc009d8
commit
7875b6057f
|
@ -236,6 +236,7 @@ void GBIInfo::loadMicrocode(u32 uc_start, u32 uc_dstart, u16 uc_dsize)
|
|||
current.dataSize = uc_dsize;
|
||||
current.NoN = false;
|
||||
current.textureGen = true;
|
||||
current.texturePersp = true;
|
||||
current.branchLessZ = true;
|
||||
current.type = NONE;
|
||||
|
||||
|
@ -283,6 +284,8 @@ void GBIInfo::loadMicrocode(u32 uc_start, u32 uc_dstart, u16 uc_dsize)
|
|||
current.textureGen = false;
|
||||
else if (strncmp(&uc_str[14], "F3DZ", 4) == 0)
|
||||
current.branchLessZ = false;
|
||||
else if (strncmp(&uc_str[14], "F3DLP.Rej", 9) == 0)
|
||||
current.texturePersp = false;
|
||||
}
|
||||
else if (strncmp( &uc_str[14], "L3D", 3 ) == 0) {
|
||||
u32 t = 22;
|
||||
|
@ -299,6 +302,7 @@ void GBIInfo::loadMicrocode(u32 uc_start, u32 uc_dstart, u16 uc_dsize)
|
|||
type = S2DEX;
|
||||
else if (uc_str[t] == '2')
|
||||
type = S2DEX2;
|
||||
current.texturePersp = false;
|
||||
}
|
||||
else if (strncmp(&uc_str[14], "ZSortp", 6) == 0) {
|
||||
type = ZSortp;
|
||||
|
|
|
@ -679,6 +679,7 @@ struct MicrocodeInfo
|
|||
u32 crc;
|
||||
bool NoN;
|
||||
bool textureGen;
|
||||
bool texturePersp;
|
||||
bool branchLessZ;
|
||||
};
|
||||
|
||||
|
@ -695,6 +696,7 @@ struct GBIInfo
|
|||
bool isHWLSupported() const;
|
||||
bool isNoN() const { return m_pCurrent != NULL ? m_pCurrent->NoN : false; }
|
||||
bool isTextureGen() const { return m_pCurrent != NULL ? m_pCurrent->textureGen: true; }
|
||||
bool isTexturePersp() const { return m_pCurrent != NULL ? m_pCurrent->texturePersp: true; }
|
||||
bool isBranchLessZ() const { return m_pCurrent != NULL ? m_pCurrent->branchLessZ : true; }
|
||||
|
||||
private:
|
||||
|
|
|
@ -703,7 +703,8 @@ void ShaderCombiner::updateLOD(bool _bForce)
|
|||
}
|
||||
|
||||
void ShaderCombiner::updateTextureInfo(bool _bForce) {
|
||||
m_uniforms.uTexturePersp.set(gDP.otherMode.texturePersp, _bForce);
|
||||
const u32 texturePersp = (RSP.bLLE || GBI.isTexturePersp()) ? gDP.otherMode.texturePersp : 1U;
|
||||
m_uniforms.uTexturePersp.set(texturePersp, _bForce);
|
||||
if (config.texture.bilinearMode == BILINEAR_3POINT)
|
||||
m_uniforms.uTextureFilterMode.set(gDP.otherMode.textureFilter | (gSP.objRendermode&G_OBJRM_BILERP), _bForce);
|
||||
}
|
||||
|
|
|
@ -1812,7 +1812,6 @@ void gSPSetSpriteTile(const uObjSprite *_pObjSprite)
|
|||
gDPSetTile( _pObjSprite->imageFmt, _pObjSprite->imageSiz, _pObjSprite->imageStride, _pObjSprite->imageAdrs, 0, _pObjSprite->imagePal, G_TX_CLAMP, G_TX_CLAMP, 0, 0, 0, 0 );
|
||||
gDPSetTileSize( 0, 0, 0, (w - 1) << 2, (h - 1) << 2 );
|
||||
gSPTexture( 1.0f, 1.0f, 0, 0, TRUE );
|
||||
gDP.otherMode.texturePersp = 1;
|
||||
}
|
||||
|
||||
struct ObjData
|
||||
|
@ -2141,7 +2140,6 @@ void gSPBgRect1Cyc( u32 _bg )
|
|||
gDP.otherMode.cycleType = G_CYC_1CYCLE;
|
||||
gDP.changed |= CHANGED_CYCLETYPE;
|
||||
gSPTexture(1.0f, 1.0f, 0, 0, TRUE);
|
||||
gDP.otherMode.texturePersp = 1;
|
||||
|
||||
ObjCoordinates objCoords(objScaleBg);
|
||||
gSPDrawObjRect(objCoords);
|
||||
|
@ -2160,7 +2158,6 @@ void gSPBgRectCopy( u32 _bg )
|
|||
#endif // GL_IMAGE_TEXTURES_SUPPORT
|
||||
|
||||
gSPTexture( 1.0f, 1.0f, 0, 0, TRUE );
|
||||
gDP.otherMode.texturePersp = 1;
|
||||
|
||||
ObjCoordinates objCoords(objBg);
|
||||
gSPDrawObjRect(objCoords);
|
||||
|
|
Loading…
Reference in New Issue
Block a user