[Shader]workaround for proper shadow support for dissolve fx

by default dissolve fx meshes have full undissolved shadow with no holes that may look wrong in most cases especially when the object is almost completely dissolved.

I found a easy but dirty workaround… it adds an unnecessary clip and a diffuse texture read but it is easy to add.

you need to add some lines to commonShadowGenPass.cfi shader

half fDissolveNoise = GetTexture2D(DissolveNoiseMapSampler, IN.baseTC.xy).g; half dissolveThreshold = (fDissolveNoise-DissolvePercentage);
clip(dissolveThreshold); #endif


clip(baseColor.a - Get_SPI_AlphaTest().w);

in the Common_SG_PS function.

This will link alpha testing to dissolved shadows so when you want to enable them you just rise the alpha test value in the material and your shadow will work with Dissolve fx.

It is not a contribution as it isn’t a proper implementation.