mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-11-25 14:52:30 +01:00
% switch Z writing later to narrow down var scope more
This commit is contained in:
parent
9236463f88
commit
07776b44cb
@ -405,11 +405,9 @@ RpAtomic* TwoPassAlphaRender_Silent(RpAtomic* atomic)
|
||||
return AtomicDefaultRenderCallBack(atomic);
|
||||
|
||||
int nPushedAlpha, nAlphaFunction;
|
||||
int nZWrite;
|
||||
int nAlphaBlending;
|
||||
|
||||
RwRenderStateGet(rwRENDERSTATEALPHATESTFUNCTIONREF, &nPushedAlpha);
|
||||
RwRenderStateGet(rwRENDERSTATEZWRITEENABLE, &nZWrite);
|
||||
RwRenderStateGet(rwRENDERSTATEVERTEXALPHAENABLE, &nAlphaBlending);
|
||||
RwRenderStateGet(rwRENDERSTATEALPHATESTFUNCTION, &nAlphaFunction);
|
||||
|
||||
@ -422,17 +420,21 @@ RpAtomic* TwoPassAlphaRender_Silent(RpAtomic* atomic)
|
||||
|
||||
if ( atomic != nullptr )
|
||||
{
|
||||
int nZWrite;
|
||||
RwRenderStateGet(rwRENDERSTATEZWRITEENABLE, &nZWrite);
|
||||
|
||||
// 2nd pass
|
||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, reinterpret_cast<void*>(TRUE));
|
||||
RwRenderStateSet(rwRENDERSTATEALPHATESTFUNCTION, reinterpret_cast<void*>(rwALPHATESTFUNCTIONLESS));
|
||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, FALSE);
|
||||
|
||||
atomic = AtomicDefaultRenderCallBack(atomic);
|
||||
|
||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, reinterpret_cast<void*>(nZWrite));
|
||||
}
|
||||
|
||||
RwRenderStateSet(rwRENDERSTATEALPHATESTFUNCTIONREF, reinterpret_cast<void*>(nPushedAlpha));
|
||||
RwRenderStateSet(rwRENDERSTATEALPHATESTFUNCTION, reinterpret_cast<void*>(nAlphaFunction));
|
||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, reinterpret_cast<void*>(nZWrite));
|
||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, reinterpret_cast<void*>(nAlphaBlending));
|
||||
|
||||
return atomic;
|
||||
|
Loading…
Reference in New Issue
Block a user