In a project of mine, I have to use opacity texture on my meshes. However while executing it, we fins that shadows rendering is not proper as it neglects opacity texture and shows the shadow of whole object.
Lol, was just on it same time and about to say the same.
From your PG, I’m also not sure what you want to achieve? Which object should have the opacity texture (the box or the sphere)?
Anyways, take a look at this
and note that:
If the sphere is the final shape you want to keep on say a box object, - turning a square into a circle or a box into a sphere - , then, when working with an opacity texture, the black part is the one that shows (in case you would need to invert your opacity texture.
When working with objects you want to use for shadowing, you need to set a diffuse texture and set this texture as being transparent.
I wanted to achieve the shadows that responds with the opacity texture, but as suggested by @carolhmj , by using diffuse texture we can achieve the result.