Broken shadows with animated cutout

Node-based Shader Editor

Broken shadows with animated cutout

Postby Gaxil » Mon Oct 02, 2017 4:41 pm

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
Attachments
Scene1Shader 2.7z
(2.9 KiB) Downloaded 99 times
Gaxil
 
Posts: 2
Joined: Mon Oct 02, 2017 3:49 pm

Re: Broken shadows with animated cutout

Postby Amplify_RnD_Rick » Tue Oct 03, 2017 10:24 am

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.
Attachments
NewScene1Shader 2.zip
(1.77 KiB) Downloaded 94 times
Amplify_RnD_Rick
 
Posts: 40
Joined: Wed Mar 01, 2017 6:33 pm

Re: Broken shadows with animated cutout

Postby Gaxil » Tue Oct 03, 2017 7:47 pm

Excellent! Thank you for taking the time to fix it! It's perfect now!

And congrats for your great product, it's really enjoyable.
Gaxil
 
Posts: 2
Joined: Mon Oct 02, 2017 3:49 pm

Re: Broken shadows with animated cutout

Postby Ricardo Teixeira » Wed Oct 04, 2017 12:29 pm

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!
User avatar
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 0 guests

cron