UnityURPToonLitShaderExample icon indicating copy to clipboard operation
UnityURPToonLitShaderExample copied to clipboard

optimize GetOutlineCameraFovAndDistanceFixMultiplier

Open benzngf opened this issue 4 years ago • 2 comments

In some extreme conditions(eg. Very small FOV), the original GetOutlineCameraFovAndDistanceFixMultiplier will become too thin. Also, the atan() function to get FOV is actually unnecessary in this use case. (Mutiplying outline width directly to FOV is not really correct to preserve line width) I've included the math into the comments of the .hlsl file, please review this optimization, thank you!

benzngf avatar Jul 12 '21 09:07 benzngf

Hi, I've attached some gifs for you to review ( notice the outline width ) Before ↑Before modification After ↑After modification

benzngf avatar Jul 12 '21 10:07 benzngf

Thank you! I will study this change and maybe merge the pull request directly.

ColinLeung-NiloCat avatar Jul 12 '21 14:07 ColinLeung-NiloCat