Hi im making a shader that makes objects invisible when in certain radius, so a see through shader.
However i can't figure out how to make the object cast shadows.
The objects must be cutout, think tree cronas and such.
If i manually add pragmas
alpha addshadow
It casts shadows when fully transparent, it works for structures, roofs etc, however the trees then cast "square" shadows from leaves planes, instead of normal shadows.
i tried forceshadows also.
I need a way for cutout to be transparent and still cast proper shadows, is this possible with AS?
Cutout shadow caster
- Amplify_Borba
- Posts: 1239
- Joined: Mon Jul 24, 2017 9:50 am
Re: Cutout shadow caster
Hello, thank you for getting in touch and for your support!
You should be able to achieve that type of effect, as you can see in the example I'm sharing below:

Could you share a sample of what you've built so far so that we can check for any potential issues? Thanks!
You should be able to achieve that type of effect, as you can see in the example I'm sharing below:

Could you share a sample of what you've built so far so that we can check for any potential issues? Thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
-
pointcache
- Posts: 2
- Joined: Sat Nov 03, 2018 7:54 am
Re: Cutout shadow caster
https://imgur.com/a/k2BpJI0
Here you can see how my shader works
Here's the archive with the shader and control maps
https://drive.google.com/open?id=1en76G ... BPruRnnb8f
What i need from it is to keep shadows when leaves are fully transparent,
the problem is that no matter what transparency setting i use i can't achieve it.
Basically i can achieve this with geometry, adding alpha addshadow to the shader pragma, this way i can hide walls, and keep shadows.
I can't do this with transparent, no matter what i do.
Here you can see how my shader works
Here's the archive with the shader and control maps
https://drive.google.com/open?id=1en76G ... BPruRnnb8f
What i need from it is to keep shadows when leaves are fully transparent,
the problem is that no matter what transparency setting i use i can't achieve it.
Basically i can achieve this with geometry, adding alpha addshadow to the shader pragma, this way i can hide walls, and keep shadows.
I can't do this with transparent, no matter what i do.
- Amplify_Borba
- Posts: 1239
- Joined: Mon Jul 24, 2017 9:50 am
Re: Cutout shadow caster
Thank you for taking the time to provide a sample!
I'm not entirely sure if this is possible, so I've escalated it to the developer for further investigation.
We'll let you know as soon as we have any developments.
I'm not entirely sure if this is possible, so I've escalated it to the developer for further investigation.
We'll let you know as soon as we have any developments.
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
- Amplify_Borba
- Posts: 1239
- Joined: Mon Jul 24, 2017 9:50 am
Re: Cutout shadow caster
Hello!
Apologies for the delay in our response, upon further investigation we've concluded that there's no issue present.
We're sharing a solution in which we force the shadowcaster to have its opacity set to one, so that the shadows persist:

Also, here's the tweaked shader, for your convenience:
Please let us know if this helps, thanks!
Apologies for the delay in our response, upon further investigation we've concluded that there's no issue present.
We're sharing a solution in which we force the shadowcaster to have its opacity set to one, so that the shadows persist:

Also, here's the tweaked shader, for your convenience:
Please let us know if this helps, thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!