lumberyard icon indicating copy to clipboard operation
lumberyard copied to clipboard

Fix NANs produced by particles when Facing is set to Free

Open alex-leleka opened this issue 7 years ago • 3 comments

NANs produced particles shader when Facing is set to Free. Setting Aspect to 0 makes basis vector vX == 0.

alex-leleka avatar Feb 15 '18 14:02 alex-leleka

Nice find and fix @alex-leleka! I'll put this change up for review, and let you know if it's taken into Lumberyard proper. Thanks!

AMZN-Gene avatar Feb 15 '18 22:02 AMZN-Gene

Hi @alex-leleka, sorry for the delay in getting this pulled over. I was unable to reproduce NANs upon setting "aspect" to 0 in 1.12 and in our latest mainline branch. The code appears to only use the "aspect" variable to multiply and not divide. Everything else seems to properly check before dividing by zero.
Would you be able to give me more detailed repro steps?

Thanks again! -Gene

AMZN-Gene avatar Mar 16 '18 22:03 AMZN-Gene

Hello @gFunc I've created a post on the forum https://gamedev.amazon.com/forums/articles/68210/fix-nans-produced-by-particles-when-facing-is-set.html

alex-leleka avatar Mar 19 '18 10:03 alex-leleka