+1
Wird überprüft
Alpha Clip problem in Beta 0.22
Hi, I just updated to 0.22 and my alpha cutout shader doesn't work properly anymore. It acts as if it were a cutout + transparent shader. Meaning the cutout effect (from the diffuse texture's alpha channel) works fine but the mesh now looks like it's got some sort of gradient/depth info into the Alpha port of SF's main node.
As a result it looks slightly transparent (although there's nothing plugged into SF's Alpha port and the Blend Mode is set to Off). Everything was fine prior to my upgrade. Is that a known bug or did something change in the way alpha clip now works? Thanks...
As a result it looks slightly transparent (although there's nothing plugged into SF's Alpha port and the Blend Mode is set to Off). Everything was fine prior to my upgrade. Is that a known bug or did something change in the way alpha clip now works? Thanks...
Customer support service by UserEcho
That's weird. As I said it wasn't causing any issue prior to 0.22...
Update:
For now I'll switch to Unity's Ambient Obscurance post-effect (instead of SSAO), which doesn't exhibit the same problem.
And the exact same shader with the diffuse texture's alpha plugged into the Alpha Clip port:
Please note as well that this looks exactly like the tessellation problem I mentioned before (http://shaderforge.userecho.com/topic/372272-tesse...), although no tessellation is involved in this shader.
Another telling symptom on the second picture is the fact that depth of field is much too strong (same setting on both pictures though); it really feels like Unity's getting confused as to the real distance at which the sphere is.
[HideInInspector]_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
And now Alpha Clip is working again (with correct depth of field and no more transparency/alpha problem)!
I think some depth rendering stuff is reading alpha from whichever texture property you have called MainTex, and applying that as an alpha clip, with a cutoff set to 0.5 now, by default. Are you clipping with the alpha channel of a MainTex texture?
Also, is depth blending set to Alpha blended or Off? (Should be off)
And for now manually removing that _cutoff line by hand every time I recompile the shader...
After some more tests I re-implemented the _cutoff line in the shader source (but made it visible in the inspector) and it turns out playing with the slider does not actually change the cutout transition (?!).
But if I set the slider just a pixel under the mid-point (something like 0.49) everything looks fine, but setting it to or above 0.5 triggers the problem I reported in this very thread.
> Also, is depth blending set to Alpha blended or Off? (Should be off)
It's set to Off.