# Blender cycles with alpha texture and glass shader

I'm trying to set a nice material for the leaves.

This is my node setup:

And this is the problem (just 10 samples):

Leaves are simply planes generated by sapling plugin, and the texture is a leaf with alpha channel. On top you can see green dots around the invisible plane.

Any suggestions?

Blender 2.69

• First I'd try swapping the glass node for a translucent. The other thing I would try is to put the transparent mix before the diffuse/glass mix. Nov 16 '13 at 6:32

## 1 Answer

It appears that this is caused by the alpha mask not being completely transparent, which results in the Alpha channel being a mix of white and dark grey instead of black. This will result in a mix of a lot of transparent shader and a tiny amount of glass/diffuse, giving the green haze.

As a quick workaround you can add a Math node set to .5 with Greater than as the operation.
This sets all pixels above .5 (gray) to 1 (white) and all those below .5 to 0 (black). Add this to the alpha channel before the mix node (click for full size):

Without the math node:

With the math node:

• I love the effects and I have different uses for your nodes. Thank you very much. Apr 27 '19 at 15:23