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
0
Question by EpsilonQoppa · Oct 22, 2016 at 08:48 AM · renderingskyboxfog

Is There A Way To Render Fog On Top Of The Skybox?

I was wondering if there was a way I could get the fog to render over top of the sky box? It produces undesirable results when the camera's view distance isn't long enough to capture enough objects to block the horizon.

alt text

nofog.png (155.9 kB)
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
2
Best Answer

Answer by tanoshimi · Oct 22, 2016 at 08:49 AM

Yes. If you look at the Hidden/GlobalFog shader you'll see some lines in the ComputeFog function that looks like this:

 if (rawDepth >= 0.999999)
   fogFac = 1.0;

Simply comment them out/delete them.

Comment
Add comment · Show 6 · 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 EpsilonQoppa · Oct 22, 2016 at 09:31 AM 0
Share

Thank you much!

avatar image EpsilonQoppa · Oct 22, 2016 at 09:40 AM 0
Share

I can't seem to find any compute fog method. I was looking in the RenderSettings class but I don't see raw depth either. So I'm not really sure where you're talking about.

Do you think you could point me in the right direction?

avatar image EpsilonQoppa · Oct 22, 2016 at 09:53 AM 0
Share

Oh, I see. I'm not using the global fog standard asset but I'll give it a try, thanks.

avatar image tanoshimi EpsilonQoppa · Oct 22, 2016 at 10:53 AM 0
Share

You really should be using the global fog image effect - the old Fog in the Lighting window is the mostly broken pre-5.0 legacy fog which was only left in for backwards compatability.

avatar image rainbow_design tanoshimi · Aug 08, 2017 at 09:14 PM 0
Share

Could you help me out with that i dont know which fog to use. I use now Assets\Standard Assets\Effects\ImageEffects\Shaders but this has no such line

only : float rawDepth = SA$$anonymous$$PLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoTransformScreenSpaceTex(i.uv_depth)); float dpth = Linear01Depth(rawDepth);

Show more comments

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Particle system, no fog. 1 Answer

On Trigger Enter Change Fog 1 Answer

How do I use the Global Fog image effect for deferred rendering in unity 2018+ 1 Answer

Skybox always black on MacOS 0 Answers

Smooth/Cloud objects appearing in view distance 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