Time of Day
Public Types | Public Attributes | List of all members
TOD_Rays Class Reference

God ray camera component. More...

Public Types

enum  BlendModeType { Screen, Add }
 Methods to blend the god rays with the image.
 
- Public Types inherited from TOD_ImageEffect
enum  ResolutionType { Low, Normal, High }
 Image effect resolutions.
 

Public Attributes

Shader GodRayShader = null
 
Shader ScreenClearShader = null
 
Shader SkyMaskShader = null
 
bool UseDepthTexture = true
 Whether or not to use the depth buffer. If enabled, requires the target platform to allow the camera to create a depth texture. Unity always creates this depth texture if deferred lighting is enabled. Otherwise this script will enable it for the camera it is attached to. If disabled, requires all shaders writing to the depth buffer to also write to the frame buffer alpha channel. Only the frame buffer alpha channel will then be used to check for ray blockers in the image effect.
 
BlendModeType BlendMode = BlendModeType.Screen
 The god ray rendering blend mode.
 
float Intensity = 1
 The intensity of the god rays.
 
ResolutionType Resolution = ResolutionType.Normal
 The god ray rendering resolution.
 
int BlurIterations = 2
 The number of blur iterations to be performed.
 
float BlurRadius = 2
 The radius to blur filter applied to the god rays.
 
float MaxRadius = 0.5f
 The maximum radius of the god rays.
 
- Public Attributes inherited from TOD_ImageEffect
TOD_Sky sky = null
 Sky dome reference inspector variable. Will automatically be searched in the scene if not set in the inspector.
 

Detailed Description

God ray camera component.

Based on SunShafts from the Unity Standard Assets. Extended to get the god ray color from TOD_Sky and properly handle transparent meshes like clouds.


The documentation for this class was generated from the following file: