I have a plane with a texture of leaf and have applied transparency so that only the leaf is visible.
However I am not able to see shadows on the plane below the leaf.
Is this possible to do in GSLS in game engine?
I need it for a game.
The BGE doesn’t support alpha shadows (shadows cast by transparent textures) right now, though I would suggest you use Clip Alpha instead of otherwise. In Clip Alpha mode, the plane will cast a shadow, regardless of the texture. If you have enough leaves, though, the effect might look somewhat similar to each leaf casting ‘correct’ shadows.
Like I said in my previous post, the BGE doesn’t support shadows cast by alpha textures (in other words, you won’t get a shadow in the shape of a leaf). There was an old patch for it, but it wasn’t made official.
If you don’t have a lot of leaves it might be worth going ahead and making the geometry into roughly the shape of the leaf, so you’ll get somewhat correct shadows; if you have a whole lot of leaves that would probably add too many polygons to be worth it.
As a side note, you might want to try looking into tree-building programs like TreeD or Arbaro, if you haven’t already, if you need help building high-quality trees.