minor refactor in mirrors

This commit is contained in:
Silent 2017-03-09 00:58:51 +01:00
parent cffabce8ab
commit 0778ae7cbc

View file

@ -819,23 +819,27 @@ void CreateMirrorBuffers()
msaaValues[0] = msaaValues[1] = 0; msaaValues[0] = msaaValues[1] = 0;
DWORD quality = *(DWORD*)((BYTE*)g_fx + 0x54); DWORD quality = *(DWORD*)((BYTE*)g_fx + 0x54);
RwInt32 width, height;
if ( quality >= 3 ) // Very High if ( quality >= 3 ) // Very High
{ {
pMirrorBuffer = RwRasterCreate( 2048, 1024, 0, rwRASTERTYPECAMERATEXTURE ); width = 2048;
pMirrorZBuffer = RwRasterCreate( 2048, 1024, 0, rwRASTERTYPEZBUFFER ); height = 1024;
} }
else if ( quality >= 1 ) // Medium else if ( quality >= 1 ) // Medium
{ {
pMirrorBuffer = RwRasterCreate( 1024, 512, 0, rwRASTERTYPECAMERATEXTURE ); width = 1024;
pMirrorZBuffer = RwRasterCreate( 1024, 512, 0, rwRASTERTYPEZBUFFER ); height = 512;
} }
else else
{ {
pMirrorBuffer = RwRasterCreate( 512, 256, 0, rwRASTERTYPECAMERATEXTURE ); width = 512;
pMirrorZBuffer = RwRasterCreate( 512, 256, 0, rwRASTERTYPEZBUFFER ); height = 256;
} }
pMirrorBuffer = RwRasterCreate( width, height, 0, rwRASTERTYPECAMERATEXTURE );
pMirrorZBuffer = RwRasterCreate( width, height, 0, rwRASTERTYPEZBUFFER );
msaaValues[0] = oldMsaa[0]; msaaValues[0] = oldMsaa[0];
msaaValues[1] = oldMsaa[1]; msaaValues[1] = oldMsaa[1];
} }