• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed May 12, 2016 at 01:18 AM by Le-Pampelmuse for the following reason:

Problem is not reproducible or outdated

avatar image
1
Question by anton-melegov · Nov 11, 2015 at 02:51 PM · unity 5shader programming

Transparent shadow receiver in unity 5

Hello. Is it any way in Unity5 to make a transparent plane which can receive shadows?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Le-Pampelmuse · Nov 16, 2015 at 04:28 AM 1
Share

Did my answer solve your question? If so, please accept it. If not, please comment my answer on what did not work as you wanted, and we can try to get there.

You should not leave people's efforts to help you uncommented. ;)

2 Replies

  • Sort: 
avatar image
1
Best Answer

Answer by Le-Pampelmuse · Nov 11, 2015 at 03:31 PM

Yes, use any "Cutout" type shader in your material. You might know this already.
Standard Shader->Rendering mode->Cutout

But for real "Transparent" shaders (using texture alpha channel to set opacity of each pixel), there are not many satisfiying possibilities I know of. This one for example has the trade-off of requiring Forward rendermode for your camera:
http://wiki.unity3d.com/index.php?title=TransparentShadowReceiver

Here is a post from 2008 where Aras (Unity Technologies) explains why its not a good idea to make transparent shaders include shadows. It has also some shader code posted by others over 8 years until yesterday ;) :
http://forum.unity3d.com/threads/no-shadows-visible-on-transparency-shaders.9909/

If I'm not wrong now, and I'm 95% sure that I'm not, this has not changed until today. In Unity that is.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image brunoleos · Jul 14, 2016 at 07:14 PM 0
Share

I can't have shadows in my transparent surface with this solution. I've tried also some legacy shaders and yet the "FX/$$anonymous$$atte Shadow", but no good result. I'm using just an albedo color with alpha at 128, and when the alpha cuts out, the shadow also disappear.

I'm using Unity 5.3.3f1. Anyone knows what can be happening?

avatar image Le-Pampelmuse brunoleos · Jul 15, 2016 at 12:22 AM 2
Share

I can't upload images at the moment, but take the standard shader and set it to "Cutout". It will receive shadows perfectly.

I don't know what "$$anonymous$$atte Shadow" is and it is possible that solutions in old threads are outdated and no longer work with Unity today, without tweaking something.

$$anonymous$$y suggestion is to use the Standard Shader in Cutout Type, because it doesn't look any different than normal Transparency. In fact it does specular according to alpha, which is what the transparent type lacks (same specular value across whole texture, even at alpha 0, which is only wanted for glass type materials)

You could also use the Legacy/Transparent/Cutout Diffuse, Bumped DIffuse, etc..

avatar image brunoleos Le-Pampelmuse · Jul 15, 2016 at 04:35 PM 0
Share

These pictures show my setup. The floor is the Cube object. It has a custom material with standard shader and Cutout as rendering mode. The only change I made was at the alpha cutoff property of the albedo texture.

One can see that no shadow appears over the floor when the albedo is cut out. What I wanted is the shadow in this state (a floating/phantom shadow).

These links are from my public Dropbox, so they can be no longer available in the future: not cut off - show shadow cut off - no shadow

Show more comments
avatar image
1

Answer by nekitamotip · Apr 27, 2017 at 08:15 PM

Trawling the web for an answer to this problem, i have found this magnificent shader from Farfarer on https://forum.unity3d.com/threads/cutout-with-soft-edge-cutout-bumped-specular.150145/

Works like a treat on unity 5.5.2f1.

kudos Farfarer, thank you!

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image TooManySugar · Feb 26, 2018 at 12:36 PM 0
Share

So you can in a fully transparent object like an invisible plane visualize receiving shadows? because testing the shader on unity 5.6 I cant do so

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to make a plane to sphere using vertex displacement shader graph, with respect to the camera position? 0 Answers

How can i combine shaders? 0 Answers

Billboard shader works in scene view but not game view 3 Answers

How to pass vertex color information into GLSL shaders program 1 Answer

How to edit these shaders file? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges