Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • 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 /
avatar image
0
Question by qklxtlx · Oct 27, 2014 at 01:52 AM · shadowcustom-shader

where is the default ShadowCaster/ShadowCollector

According to the document http://docs.unity3d.com/Manual/SL-RenderPipeline.html , unity uses ShadowCaster/ShadowCollector for casting/receiving shadows. If I write a custom vertex/fragment shader, where is the default ShadowCaster/ShadowCollector? I've tested and the custom material with my shader can still have shadows, even without these two passes in my shader source. I'm wondering why...

ps. I'm not sure whether these two passes are just writing into every light sources' lightmap and reading from them? And when these two passes will be called in three different pipelines?

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Wappenull · Apr 14, 2020 at 11:28 AM

FYI for future search:

If shader does not have ShadowCaster pass, it will use the one found in Fallback. In such simple case if your shader is using "VertexLit" as fallback. It uses "VertexLit/SHADOWCASTER" pass. To look what's inside, continue in shader archive of your Unity version.


(Unity 5.6 Doc) In order to cast shadows, a shader has to have a ShadowCaster pass type in any of its subshaders or any fallback.

https://docs.unity3d.com/560/Documentation/Manual/SL-VertexFragmentShaderExamples.html

(Forum user: bgolus) By default a surface shader does not generate a shadowcaster pass, but instead uses the shadowcaster from the Fallback. Remove the Fallback, no more shadow. It'll also prevent that shader from showing up in the camera depth texture when using the forward rendering path!

https://forum.unity.com/threads/how-to-turn-off-shadow-casting-in-a-surface-shader.451279/
Comment
Add comment · 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

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Custom Shadow Effects 1 Answer

Shadow from spot light gets cut (unrealistic) 0 Answers

Best lightmapping wierd soft shadows 0 Answers

How can I get an invisible object to cast a shadow? 1 Answer

New 4.6 UI: how to make UI elements cast shadows 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