-
Notifications
You must be signed in to change notification settings - Fork 117
bugfix(shadow): Fix missing tree shadow decals when no object shadow decals exist #1590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| static Int drawEdgeX=0; | ||
| static Int drawEdgeY=0; | ||
| static Int drawStartX=0; | ||
| static Int drawStartY=0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved these into the class.
| if (m_trees[curTree].m_toppleState == TOPPLE_FALLING || | ||
| m_trees[curTree].m_toppleState == TOPPLE_DOWN) { | ||
| continue; | ||
| } | ||
| m_shadow->setSize(m_treeTypes[type].m_shadowSize, -m_treeTypes[type].m_shadowSize*factor); | ||
| m_shadow->setSize(m_treeTypes[type].m_shadowSize, m_treeTypes[type].m_shadowSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change does not exactly relate to the fix, but is related to tree shadows. Essentially Y was flipped which should flip the texture, but that does not make a difference because the decal shadow is a dark circle and inconsequential to flipping.
Mauller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks Shady to me
978c3f4 to
367ad68
Compare
|
While replicating to Generals, I noticed that this issue does not happen in Generals, because Trees are not rendered through the W3DTreeBuffer. Looks like it was WIP from Generals to Zero Hour development and did not make the cut. W3DTreeBuffer::W3DTreeBuffer(void)
{
m_initialized = false;
///@toto - reactivate this optimization if useful. jba.
return;
...I replicated what can be replicated anyway and user facing it will change nothing in Generals. |
When decoupling the tree sway from the render FPS i also noticed something similar. |
This change fixes the missing tree shadow decals while no object shadow decals exist.
The issue happens because the decal draw bounds are only updated when there are object decal shadows (for example under infantry units).
Original
Map: North America
This change
TODO