Page 1 of 1

Broken shadows with animated cutout

PostPosted: Mon Oct 02, 2017 4:41 pm
by Gaxil
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

Re: Broken shadows with animated cutout

PostPosted: Tue Oct 03, 2017 10:24 am
by Amplify_RnD_Rick
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.

Re: Broken shadows with animated cutout

PostPosted: Tue Oct 03, 2017 7:47 pm
by Gaxil
Excellent! Thank you for taking the time to fix it! It's perfect now!

And congrats for your great product, it's really enjoyable.

Re: Broken shadows with animated cutout

PostPosted: Wed Oct 04, 2017 12:29 pm
by Ricardo Teixeira
Happy to help!