Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by Lycanite · Mar 06, 2016 at 02:17 PM · camerashaderimage effectsstandard-assets

Mising shader UnityStandardAssets.ImageEffects.DepthOfField

I started my project up today to find that suddenly my Depth of Field is broken! I've tried reimporting assets as well as removing and reimporting the ImageEffects assets with no luck.

I've started working on multiplayer using UNet which means I haven't touched anything related to shaders for a while now so I'm not sure what change could have broken this.

Here's the console output: (I've renamed the Main Camera to Camera)

Missing shader in Camera (UnityStandardAssets.ImageEffects.DepthOfField) UnityEngine.Debug:Log(Object) UnityStandardAssets.ImageEffects.PostEffectsBase:CheckShaderAndCreateMaterial(Shader, Material) (at Assets/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsBase.cs:18) UnityStandardAssets.ImageEffects.DepthOfField:CheckResources() (at Assets/Standard Assets/Effects/ImageEffects/Scripts/DepthOfField.cs:58) UnityStandardAssets.ImageEffects.PostEffectsBase:Start() (at Assets/Standard Assets/Effects/ImageEffects/Scripts/PostEffectsBase.cs:88)

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Lycanite · Mar 20, 2016 at 06:18 PM

I may have fixed it after apply my 'fix' below. Renaming DepthOfFieldScatter to DepthOfFieldHdr seemed to fix it. Maybe renaming the file triggered some kind of refresh that has fixed it.

=====================================

I'm still having a problem with this but I've found a solution though it's 'a bit of a hack'.

In DepthOfField.cs I added a new variable:

     public Shader dofShaderReplace;

I then appended this to the start of CheckResources():

         this.dofHdrShader = this.dofShaderReplace;


I then had to do a quick edit to DepthOfFieldEditor.cs in order to get the new field to show in the editor, I added this var:

     SerializedProperty dofShaderReplace;

And then added this to OnEnable() just before InitializedAnimBools():

         dofShaderReplace = serObj.FindProperty("dofShaderReplace");

And finally I added this to OnInspectorGUI() at the bottom just before serObj.ApplyModifiedProperties():

         EditorGUILayout.PropertyField(dofShaderReplace, new GUIContent(" DOF Shader Replace"));

In the inspector I then drag over DepthOfFieldScatter.shader into the new variable.

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
avatar image
0

Answer by Bankler · Jun 24, 2017 at 01:34 PM

Had a similar issue with the Color Correction Curves effect. Every time I tried to enable the component I got the "Missing shader" error message. After reading this, I tried to remove the effect component and add it again, and that did the trick.

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

75 People are following this question.

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

Related Questions

How to darken the camera feed from ARkit without darkening the AR objects 0 Answers

How to flip camera on a Y-axsis ? 0 Answers

Shader blurs only one shader 0 Answers

My outline shader gets covered by the background at certain angles. 0 Answers

How to make a filter for my Camera? 0 Answers


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