Fog effect is now configured through profile by OndrejPetrzilka · Pull Request #514 · Unity-Technologies/PostProcessing · GitHub
Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Fog effect is now configured through profile#514

Open
OndrejPetrzilka wants to merge 6 commits into
Unity-Technologies:v2from
OndrejPetrzilka:FogEffect2
Open

Fog effect is now configured through profile#514
OndrejPetrzilka wants to merge 6 commits into
Unity-Technologies:v2from
OndrejPetrzilka:FogEffect2

Conversation

@OndrejPetrzilka

Copy link
Copy Markdown

Added Fog effect which modifies RenderSettings before rendering and restores after rendering

Related to #512

Implementation consists of three parts

  1. Loading base fog values from RenderSettings in PostProcessEffectSettings.Reset.
  2. Applying fog to RenderSettings in OnPreCull
  3. Restoring original RenderSettings fog values in OnPostRender

Loading base values is necessary for overrides to work properly. We want overrides to work 'on top' of settings which are in RenderSettings.

What works

  • Fog settings
  • Overrides
  • Consistent fog on transparent and opaque materials
  • Different fog on multiple cameras
  • Fog blending between volumes
  • Preview in scene view (image effects/fog)

Possible issues

  • Baking lights?
  • GI (Enlighten)?

Not sure how light baking and Enlighten GI works, it might use fog from global RenderSettings for some calculations.

@OndrejPetrzilka OndrejPetrzilka mentioned this pull request Apr 2, 2018
@Chman

Chman commented Apr 3, 2018

Copy link
Copy Markdown
Contributor

@OndrejPetrzilka

Copy link
Copy Markdown
Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants