-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
but this may be better handled via a custom shader
- Loading branch information
1 parent
e7feb39
commit 6012fd2
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* http://www.unifycommunity.com/wiki/index.php?title=Fog_Layer | ||
/* | ||
This script lets you enable and disable per camera. | ||
By enabling or disabling the script in the title of the inspector, you can turn fog on or off per camera. | ||
*/ | ||
|
||
private var revertFogState = true; | ||
|
||
function OnPreRender () { | ||
revertFogState = RenderSettings.fog; | ||
RenderSettings.fog = false; | ||
} | ||
|
||
function OnPostRender () { | ||
RenderSettings.fog = revertFogState; | ||
} | ||
|
||
@script AddComponentMenu ("Rendering/Fog Layer") | ||
@script RequireComponent (Camera) |