Vertex Animation For Unity - Transparency?
5165 3 1- quack_
- Member
- 14 posts
- Joined: March 2016
- Offline
Hey, how do I export @Alpha to use with the soft shader with LWRP?
Using VAT 2.0 in H17.5 and Unity 2019.2.16f
from reading through the generated shader code the only place where alpha shows up is for the Base Map but there is no map export option for that? I tried using color map alpha in the Base Map slot inside the unity shader to try and get some alpha to show up but it didn't do the trick.
since I don't have much experience with shader code and am not a programmer, I don't really know what to try next! scene file attached (excuse the huge mess)
Using VAT 2.0 in H17.5 and Unity 2019.2.16f
from reading through the generated shader code the only place where alpha shows up is for the Base Map but there is no map export option for that? I tried using color map alpha in the Base Map slot inside the unity shader to try and get some alpha to show up but it didn't do the trick.
since I don't have much experience with shader code and am not a programmer, I don't really know what to try next! scene file attached (excuse the huge mess)
Edited by quack_ - Dec. 18, 2019 12:17:04
- mikelyndon-sesi
- Member
- 394 posts
- Joined: May 2017
- Offline
Hi. The shader is setup as opaque by default. If you're willing to modify the shader code the following changes will pass the Alpha through to Unity.
In SimpleLitVATSoftForwardPass.hlsl on line 149
In SimpleLitVATSoft.shader on line 73
And line 82:
In SimpleLitVATSoftForwardPass.hlsl on line 149
half alpha = diffuseAlpha.a * _BaseColor.a * input.color.a;
Tags { "RenderType" = "Transparent" "Queue"="Transparent" "RenderPipeline" = "LightweightPipeline" "IgnoreProjector" = "True"}
Blend SrcAlpha OneMinusSrcAlpha
- quack_
- Member
- 14 posts
- Joined: March 2016
- Offline
https://imgur.com/nfRWA7w [imgur.com]
transparency working perfectly now
may I ask why this is not in the standard workflow? is it just trivial to fix up the shader for anyone with shader coding knowledge, am I overvaluing the use case for this? from an artist POV it seems essential to have alpha for vertex animations
transparency working perfectly now
may I ask why this is not in the standard workflow? is it just trivial to fix up the shader for anyone with shader coding knowledge, am I overvaluing the use case for this? from an artist POV it seems essential to have alpha for vertex animations
Edited by quack_ - Dec. 18, 2019 18:58:14
- mikelyndon-sesi
- Member
- 394 posts
- Joined: May 2017
- Offline
-
- Quick Links