Your comments

You could just multiply your alpha with your texture in additive mode as a temp fix

Another update: I had a similar issue yesterday when trying to do the following and am wondering if it's related to the above:



Am i doing something wrong here?

Hi Joachim,


Thanks for looking into this, I actually forgot to mask out the Sin at the end which is what led me to this issue. Basically I'm using a sin wave (well multiple now) mapped to world-space coords to simulate the a subtle light flicker so that when I have multiple objects, the flicker isn't 'synced' and artificial looking.

Additional info: On further inspection it seems that this is due to SF not working properly with Deferred Lighting (disabling dual lightmaps still leaves the transparency issues.


Perhaps you could add dual lightmapping support for forward rendered shaders as hinted at here under the "Dual Lightmaps" section: http://docs.unity3d.com/Documentation/Manual/LightmappingInDepth.html


It would be extremely useful to be able to have single lightmapped shaders able to receive dynamic lights and shadows (For a flash light effect for example) though I suspect this is probably only possible with deferred lighting.

Just to elaborate a bit on this: Basically, I just needed to make sure my Texture2D node had a normal map in it when compiling the shader. I had left it empty so SF assumed it was a diffuse texture.

ok thanks, will use that as a temp fix for now! Glad we got to the bottom of it!

I've put together a package with the problem shaders which you can take a look at here: http://www.littlelostpoly.co.uk/PVT/ShaderTests.unitypackage


On closer inspection it all seems to stem from disabling "Receive ambient lighting" on unlit materials


This is what I see on my end:


No problem. 

Also noticed another odd bug: One Minus doesn't work when plugging a single channel in from a texture