Fog Layer

From Unify Community Wiki
Revision as of 18:26, 5 October 2006 by Joeante (Talk | contribs)

Jump to: navigation, search

Author: Joachim Ante

Description

This

Usage

Add this script to

You might want to change Vector3.back to Vector3.front, depending on the initial orientation of your object.


Javascript- FogLayer.js

<javascript> /*

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 = false;

function OnPreRender () { revertFogState = RenderSettings.fog; RenderSettings.fog = enabled; }

function OnPostRender () { RenderSettings.fog = revertFogState; }

@script AddComponentMenu ("Rendering/Fog Layer") @script RequireComponent (Camera) </javascript>

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox