tipforeveryone Posted July 19, 2016 Share Posted July 19, 2016 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 Quote Link to comment Share on other sites More sharing options...
nick.ace Posted July 19, 2016 Share Posted July 19, 2016 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. Quote Link to comment Share on other sites More sharing options...
reepblue Posted July 19, 2016 Share Posted July 19, 2016 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. Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
tipforeveryone Posted July 19, 2016 Author Share Posted July 19, 2016 Thanks for your replies, I dont have much knowledge about shader programing.. so that can anyone write this shader ? It should be useful ! Quote Link to comment Share on other sites More sharing options...
reepblue Posted July 19, 2016 Share Posted July 19, 2016 This should do it, didn't test it, but should work. animatedtrans.zip 1 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
tipforeveryone Posted July 19, 2016 Author Share Posted July 19, 2016 Thanks it works this will be nice if it is in workshop Quote Link to comment Share on other sites More sharing options...
shadmar Posted July 19, 2016 Share Posted July 19, 2016 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; } } Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Recommended Posts
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.