Jump to content

[Solved] Shader for transparent material of animated model?


tipforeveryone
 Share

Recommended Posts

My character has a helmet with an plastic glass (it is transparent)

 

I don't find any shader which can be applied for animated model with transparent material.

There is transparent.shader in Shaders/Models folder but can't use for animated mesh

 

please show me how to animate a transparent element of character biggrin.png

post-16833-0-31976400-1468895775_thumb.png

Link to comment
Share on other sites

Take a look at the non-animated transparent shader. In the fragment shader part, you will see a like that looks like this:

 

if (icoord.x%2 == icoord.y%2) discard;

 

This line will make the mesh transparent. I think I saw some randomization factor to allow for overlapping transparent surfaces, but I don't remember it, and I don't think it was enabled anyway.

Link to comment
Share on other sites

Take a look at the non-animated transparent shader. In the fragment shader part, you will see a like that looks like this:

 

if (icoord.x%2 == icoord.y%2) discard;

 

This line will make the mesh transparent. I think I saw some randomization factor to allow for overlapping transparent surfaces, but I don't remember it, and I don't think it was enabled anyway.

 

There is some commented code int he shader, but it only looks decent if a lot of MSAA is applied. I hope this get's addressed at some point.

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

You can also different degrees of transparency, only looks decent if you apply FXAA

 

 

//mode 1..5, 1=solid, 5 almost invisible
void TransparencyFilter(int mode)
{
   {
       int ix = int(mod((int(gl_FragCoord.x+0.5)),mode)+0.5);
       int iy = int(mod((int(gl_FragCoord.y+0.5)),mode)+0.5);
       if (ix!=iy) discard;
   }
}

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...