Abandoned Transparency Texture (model) make everything invisible

Welcome to our Community
Wanting to join the rest of our members? Feel free to sign up today.
Sign up
Status
Not open for further replies.

Lapin

Premium
Premium
Joined
Jun 14, 2024
Messages
60
Reaction score
108
Points
33
All is in the title :

When i put transparency texture on one model, that provoke an invisible bug like Harry Potter Invisible Cloak.


Does anyone have a solution for this Please ?

Harry Potter Podcast GIF by Washed Media
Sad Harry Potter GIF




3eb3c30743cfad7f80c50345f805a7d9.gif


66525f282450add8011742b170d95f11.gif


1730482101564.png
 
This is going to be related to XE_OPACITY I believe with the MaterialBlock.

Hey There!
Please login and(or) register to see this awesome content today.


1.D3DRS_ALPHATESTENABLE makes tests per pixel for
D3DRS_ALPHAREF and applies
D3DRS_ALPHAFUNC, D3DCMP_GREATEREQUAL



2. when m_nAmount is less than 255, it uses the texturefactor and alphaarg2 as tfactor to modulate and merge those alphas.
If you separate into m_nAmount <255 and m_nAmount == 255 to minimize render state changes, that's a bonus.


It could be an issue with a previously set D3DRS_SRCBLEND and D3DRS_DESTBLEND which isn't used in this code, or can try alpharef of 1 rather than 0, can even disable D3DRS_ALPHATESTENABLE and alpharef and alphafunc to see if that helps.
 
  • Sir
Reactions: Lapin
I didn't even realize that you hadn't responded to me (I didn't receive a notification)

Once again @Kia thank you for taking the time to help me, I'll see what I can do,

Thank you very much for your help.
 
  • Like
Reactions: zOmbie
Status
Not open for further replies.