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 /
avatar image
1
Question by Griffo · Jul 28, 2016 at 11:10 AM · shadersfog

Stop a GameObject being affected by fog unity 5

Hi, is it posible?

I've tried This with no luck .. Thanks.

I'm using this shader ..

alt text

alt text

But is there a way to use a layer because I'd also like to use the Unity 5 standard shader on some GameObjects that I'd like to see through the fog and some I wouldn't want to see, so a layer would be the best solution?

screen-shot-2016-07-29-at-075629.png (38.1 kB)
screen-shot-2016-07-29-at-075739.png (75.5 kB)
Comment
Add comment · Show 6
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 Namey5 · Jul 28, 2016 at 11:45 AM 0
Share

Depends on the shader you are using. You could also set the object's material queue to 3000.

avatar image Griffo Namey5 · Jul 28, 2016 at 05:14 PM 0
Share

Edited my post to include the shader ....

But is there a way to use a layer because I'd also like to use the Unity 5 standard shader on some GameObjects that I'd like to see through the fog and some I wouldn't want to see, so a layer would be the best solution?

avatar image tanoshimi Griffo · Jul 28, 2016 at 08:38 PM 0
Share

Please post the uncompiled shader. The two suggestions that first come to $$anonymous$$d are disable writing to the depth buffer, or render the unfogged object with a separate camera.

Show more comments
avatar image Namey5 Namey5 · Jul 29, 2016 at 09:23 AM 0
Share

Well, because you are using one of the built in shaders, you could do one of the following;

  1. Download the original shader from the Unity archive, and modify that not to render fog. Then simply use that substitute shader on the objects you don't want to render with fog.

  2. Like I said earlier, changing the material queue may also do it. From memory, the transparent queue overrides fog, so what you can do is run the Editor in debug mode (right click the inspector tab>Debug), select the material and change the queue to 3000.

avatar image Sethhalocat · Jul 29, 2016 at 08:18 AM 0
Share

Is it possible to change the material your using to an fx or a particle for the specific object?

0 Replies

· Add your reply
  • Sort: 

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

55 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

Related Questions

Global fog doesn't work? 0 Answers

Default-Sprite with fog 1 Answer

Simple shader fog functionality issue 0 Answers

[Shader] No Fog on Particles/Standard Unlit 0 Answers

Is there a way to tweak the fog so it will be mapped on the world Y axis instead of the camear local Z axis ? 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