DrawBillboardStrategy improvements#137
Conversation
Report for RSPE01_01 (167f5f6 - 6644d7a)📈 2 improvements in unmatched items
📉 2 regressions in unmatched items
|
| f32 dx0 = sx * px; | ||
| f32 dy0 = sy * py; | ||
|
|
||
| float exp0 = px - dx0; |
There was a problem hiding this comment.
| float exp0 = px - dx0; | |
| f32 exp0 = px - dx0; |
| f32 dy0 = sy * py; | ||
|
|
||
| float exp0 = px - dx0; | ||
| float exp1 = py - dy0; |
There was a problem hiding this comment.
| float exp1 = py - dy0; | |
| f32 exp1 = py - dy0; |
| const EmitterDrawSetting& rSetting = | ||
| *pManager->mResource->GetEmitterDrawSetting(); | ||
|
|
||
| int flags = mNumTexmap != 0; |
There was a problem hiding this comment.
DrawNormalBillboard does mNumTexmap > 0 ? 1 : 0, does that work here too?
| pIt = pGetNextFunc(pManager, pIt)) { | ||
|
|
||
| if (pIt->GetLifeStatus() != 1) | ||
| continue; |
There was a problem hiding this comment.
could we put the continue in brackets? just a style thing.
like this:
if (pIt->GetLifeStatus() != NW4R_EF_LS_ACTIVE) {
continue;
}|
|
||
| f32 sx = pIt->Draw_GetSizeX(); | ||
| if (sx < std::numeric_limits<f32>::epsilon()) | ||
| continue; |
There was a problem hiding this comment.
if (sx < std::numeric_limits<f32>::epsilon()) {
continue;
}|
|
||
| f32 sy = pIt->Draw_GetSizeY(); | ||
| if (sy < std::numeric_limits<f32>::epsilon()) | ||
| continue; |
There was a problem hiding this comment.
if (sy < std::numeric_limits<f32>::epsilon()) {
continue;
}|
|
||
| f32 dirScale = 1.0f; | ||
| if (rSetting.typeDir != 0) { | ||
| const math::VEC3& v0 = *reinterpret_cast<const math::VEC3*>( |
There was a problem hiding this comment.
pIt is a ef::Particle*, so this access is doing pIt->mParameter.mPosition.
some functions use GetParticleParameter() to access mParameter, and store that in a temp variable for re-use, so that may also help here.
| if (rSetting.typeDir != 0) { | ||
| const math::VEC3& v0 = *reinterpret_cast<const math::VEC3*>( | ||
| reinterpret_cast<const u8*>(pIt) + 0xAC); | ||
| const math::VEC3& v1 = *reinterpret_cast<const math::VEC3*>( |
There was a problem hiding this comment.
pIt is a ef::Particle*, so this access is doing pIt->mParameter.mPrevPosition.
| for (Particle* pIt = pGetFirstFunc(pManager); pIt != NULL; | ||
| pIt = pGetNextFunc(pManager, pIt)) { | ||
|
|
||
| if (pIt->GetLifeStatus() != 1) |
There was a problem hiding this comment.
the value 1 here is NW4R_EF_LS_ACTIVE
| } | ||
|
|
||
| f32 dirScale = 1.0f; | ||
| if (rSetting.typeDir != 0) { |
There was a problem hiding this comment.
0 is EmitterDrawSetting::AHEAD_BB_SPEED
I made improvements to DrawBillboardStrategy methods.