Hi Ricardo,
Thank you for the reply.
I'm afraid that I don't really understand why your directing me to the blend settings. Alpha clip is a feature that works independently of the blend mode, and in fact, should work quite well with the default blend settings. The render settings, sure, they should be set to "AlphaTest" for efficiency, but again, this is not be required for a working alpha clip shader.
Alpha clip is achieved by selectively calling the "discard" function from inside the pixel shader. For reference (and posterity) I've managed to achieve alpha clip in a "Custom Expression node" using the following code (Note that I'm using the "r" channel to control the clip value. change 0 to 3 to use the actual alpha value for clip):
- Code: Select all
if (ColIn[0] < Cutoff) discard; return ColIn;
With the following settings:
And used in the following way (Note that the expression node must me set up inline as shown, or the code will not be compiled into the shader):
This is the result
I could have done this from the start, but figured there might have been a more sensible way to use this feature. If there is not, is there any chance we could get this functionality into the output node of the unlit shader type in a future version?
Thank you!