diff options
author | aap <aap@papnet.eu> | 2019-07-29 19:18:03 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2019-07-31 14:33:27 +0200 |
commit | 5f6b235301f734b73f8307cf3e29997e7f76eac8 (patch) | |
tree | 73037842a302ae6e888e365b32e8ce74287e3f8d /src/render/Shadows.cpp | |
parent | Merge pull request #175 from erorcun/erorcun (diff) | |
parent | restore original shadows fading (diff) | |
download | re3-5f6b235301f734b73f8307cf3e29997e7f76eac8.tar re3-5f6b235301f734b73f8307cf3e29997e7f76eac8.tar.gz re3-5f6b235301f734b73f8307cf3e29997e7f76eac8.tar.bz2 re3-5f6b235301f734b73f8307cf3e29997e7f76eac8.tar.lz re3-5f6b235301f734b73f8307cf3e29997e7f76eac8.tar.xz re3-5f6b235301f734b73f8307cf3e29997e7f76eac8.tar.zst re3-5f6b235301f734b73f8307cf3e29997e7f76eac8.zip |
Diffstat (limited to 'src/render/Shadows.cpp')
-rw-r--r-- | src/render/Shadows.cpp | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/render/Shadows.cpp b/src/render/Shadows.cpp index 2d9f75c9..ccdc457c 100644 --- a/src/render/Shadows.cpp +++ b/src/render/Shadows.cpp @@ -545,11 +545,7 @@ CShadows::StoreCarLightShadow(CAutomobile *pCar, int32 nID, RwTexture *pTexture, { float fDistToCam = Sqrt(fDistToCamSqr); -#ifndef FIX_BUGS - if ( fDistToCam >= (fDrawDistance*(1.0f-(1.0f/4.0f))) && !bSpecialCam ) // BUG: must be 3.0 -#else - if ( fDistToCam >= (fDrawDistance*(1.0f-(1.0f/3.0f))) && !bSpecialCam ) -#endif + if ( fDistToCam >= (fDrawDistance*(1.0f-(1.0f/4.0f))) && !bSpecialCam ) // BUG? must be 3.0? { //fDistToCam == 0 -> 3 //fDistToCam == fDrawDistance -> 0 @@ -607,22 +603,12 @@ CShadows::StoreShadowForPedObject(CEntity *pPedObject, float fDisplacementX, flo { float fDistToCam = Sqrt(fDistToCamSqr); -#ifndef FIX_BUGS //fDistToCam == 0 -> 2 //fDistToCam == fDrawDistance -> -2 - float fMult = 1.0f - (4.0f / fDrawDistance) * (fDistToCam - (fDrawDistance*(1.0f/4.0f))); // BUG: negative -#else - //fDistToCam == 0 -> 4 - //fDistToCam == fDrawDistance -> 0 - float fMult = 1.0f - (4.0f / fDrawDistance) * (fDistToCam - (fDrawDistance*(1.0f-(1.0f/4.0f))) ); -#endif + float fMult = 1.0f - (4.0f / fDrawDistance) * (fDistToCam - (fDrawDistance*(1.0f/4.0f))); // BUG ? negative int32 nColorStrength; -#ifndef FIX_BUGS - if ( fDistToCam >= (fDrawDistance*(1.0f/4.0f)) ) // BUG: negative -#else - if ( fDistToCam >= (fDrawDistance*(1.0f-(1.0f/4.0f))) ) -#endif + if ( fDistToCam >= (fDrawDistance*(1.0f/4.0f)) ) // BUG ? negative nColorStrength = (int32)(CTimeCycle::GetShadowStrength() * fMult); else nColorStrength = CTimeCycle::GetShadowStrength(); |