I want to make fade for my player shadow. I don't know if it's possible or not. In my skinned mesh render there is "Cast shadows" with four options "Off, On, Two sides, and Shadows Only". How to do it by a script ?

  • \$\begingroup\$ Can you describe in more detail what a "shadow fade" is in your context? It also sounds like you're using Unity — if that's true, please add that tag to your question. \$\endgroup\$ – DMGregory Feb 6 '20 at 17:59
  • \$\begingroup\$ I edit tags. I mean body shadow of player example. Instead of turn On/Off shadow. I need smooth transfer that I can control it by script. \$\endgroup\$ – user43474 Feb 6 '20 at 20:39
  • \$\begingroup\$ Transfer from what state to what state? What kind of effect do you ultimately want to make with this? \$\endgroup\$ – DMGregory Feb 6 '20 at 21:33
  • \$\begingroup\$ Normal black shadow. Transfer from black to none. If you have a cube with a black shadow that's mean the "cast shadow" is ON. If you turn it to OFF you will not see a shadow from it. Now I want to make a script to make a smooth transfer between On and Off. \$\endgroup\$ – user43474 Feb 6 '20 at 22:21
  • \$\begingroup\$ Do you have other shadow-casting objects in your scene? If so, this will be rather difficult - in shadow mapping, the pass that draws the lighting effects on the shadow-receiver knows little to nothing about which specific object is responsible for a particular shadow - and can't reliably distinguish cases where a shadow that should be faded overlaps with a shadow that should not. \$\endgroup\$ – DMGregory Feb 6 '20 at 22:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.