Hi Amplify,
I have a simple shader, which has an animated cutout, based on a panning texture and also which is double face with a normal correction depending on the face orientation (double face activated).
But it gives me a weird shadow, like if the U coordinate of my texture was constant. If I remove the normal flip code or if I remove the panner on the texture, everything is fine.
I've attached the shader for you to see the problem.
I've noticed that when it's working it is using the addshadow, otherwise it is using your vertex/fragment code. If I remove the generated vertex/fragment and add addshadow, it's fine, even with both features active.
Thanks
Broken shadows with animated cutout
Broken shadows with animated cutout
- Attachments
-
- Scene1Shader 2.7z
- (2.9 KiB) Downloaded 245 times
-
Amplify_RnD_Rick
- Posts: 40
- Joined: Wed Mar 01, 2017 6:33 pm
Re: Broken shadows with animated cutout
Hi Gaxil,
Thank you so much for reaching us and reporting this issue.
We've checked your shader and found out that the cause of this issue is our custom shadow caster. Unfortunately it's not taking custom interpolated data from the main shader into account making it have that strange shadow behavior.
This is a know issue on which we'll do our best on having it fixed as soon as we can.
On your case fortunately there's a way around it. You only need to replace the 'Texture Coordinates' node by a 'Vertex TexCoord' as this node does not register any custom interpolators.
We're attaching a new shader file with that node already replaced. We also took the liberty of simplifying the face calculation as we already have a node called 'Switch by Face' which switches between its inputs according to face orientation.
We apologize for this issue and please let us know if this new shader is working correctly on your end.
Thank you so much for reaching us and reporting this issue.
We've checked your shader and found out that the cause of this issue is our custom shadow caster. Unfortunately it's not taking custom interpolated data from the main shader into account making it have that strange shadow behavior.
This is a know issue on which we'll do our best on having it fixed as soon as we can.
On your case fortunately there's a way around it. You only need to replace the 'Texture Coordinates' node by a 'Vertex TexCoord' as this node does not register any custom interpolators.
We're attaching a new shader file with that node already replaced. We also took the liberty of simplifying the face calculation as we already have a node called 'Switch by Face' which switches between its inputs according to face orientation.
We apologize for this issue and please let us know if this new shader is working correctly on your end.
- Attachments
-
- NewScene1Shader 2.zip
- (1.77 KiB) Downloaded 242 times
Re: Broken shadows with animated cutout
Excellent! Thank you for taking the time to fix it! It's perfect now!
And congrats for your great product, it's really enjoyable.
And congrats for your great product, it's really enjoyable.
- Ricardo Teixeira
- Posts: 954
- Joined: Fri Aug 09, 2013 2:26 pm
Re: Broken shadows with animated cutout
Happy to help!
Sales & 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!