UnityMol  0.9.6-875
UnityMol viewer / In developement
DreamEffect Class Reference
+ Inheritance diagram for DreamEffect:
+ Collaboration diagram for DreamEffect:

Public Member Functions

void FourTapCone (RenderTexture source, RenderTexture dest, int iteration)
 

Public Attributes

int iterations = 3
 
float blurSpread = 0.6f
 
float ContrastPower = 5.0f
 
float ContrastBias = 0.3f
 
Shader blackChannelShader
 

Protected Member Functions

void OnDisable ()
 
void Start ()
 

Properties

static Material blurMaterial [get]
 
Material BlackChannelMaterial [get]
 

Private Member Functions

void DownSample4x (RenderTexture source, RenderTexture dest)
 
void OnRenderImage (RenderTexture source, RenderTexture destination)
 

Static Private Member Functions

static void Render4TapQuad (RenderTexture dest, float offsetX, float offsetY)
 
static void Set4TexCoords (float x, float y, float offsetX, float offsetY)
 

Private Attributes

Material m_BlackChannelMaterial = null
 

Static Private Attributes

static string blurMatString
 
static Material m_BlurMaterial = null
 

Detailed Description

Definition at line 7 of file DreamEffect.cs.

Member Function Documentation

void DreamEffect.DownSample4x ( RenderTexture  source,
RenderTexture  dest 
)
private

Definition at line 114 of file DreamEffect.cs.

References blurMaterial, and Render4TapQuad().

Referenced by OnRenderImage().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void DreamEffect.FourTapCone ( RenderTexture  source,
RenderTexture  dest,
int  iteration 
)

Definition at line 96 of file DreamEffect.cs.

References blurMaterial, blurSpread, and Render4TapQuad().

Referenced by OnRenderImage().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void DreamEffect.OnDisable ( )
protected

Definition at line 66 of file DreamEffect.cs.

void DreamEffect.OnRenderImage ( RenderTexture  source,
RenderTexture  destination 
)
private

Definition at line 133 of file DreamEffect.cs.

References BlackChannelMaterial, ImageEffects2.Blit(), ImageEffects2.BlitWithMaterial(), DownSample4x(), FourTapCone(), and iterations.

+ Here is the call graph for this function:

static void DreamEffect.Render4TapQuad ( RenderTexture  dest,
float  offsetX,
float  offsetY 
)
staticprivate

Definition at line 168 of file DreamEffect.cs.

References Set4TexCoords().

Referenced by DownSample4x(), and FourTapCone().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void DreamEffect.Set4TexCoords ( float  x,
float  y,
float  offsetX,
float  offsetY 
)
staticprivate

Definition at line 192 of file DreamEffect.cs.

Referenced by Render4TapQuad().

+ Here is the caller graph for this function:

void DreamEffect.Start ( )
protected

Definition at line 80 of file DreamEffect.cs.

References blurMaterial.

Member Data Documentation

Shader DreamEffect.blackChannelShader

Definition at line 54 of file DreamEffect.cs.

string DreamEffect.blurMatString
staticprivate
Initial value:
=
@"Shader ""BlurConeTap"" {
SubShader {
Pass {
ZTest Always Cull Off ZWrite Off Fog { Mode Off }
SetTexture [__RenderTex] {constantColor (0,0,0,0.25) combine texture * constant alpha}
SetTexture [__RenderTex] {constantColor (0,0,0,0.25) combine texture * constant + previous}
SetTexture [__RenderTex] {constantColor (0,0,0,0.25) combine texture * constant + previous}
SetTexture [__RenderTex] {constantColor (0,0,0,0.25) combine texture * constant + previous}
}
}
Fallback off
}"

Definition at line 28 of file DreamEffect.cs.

float DreamEffect.blurSpread = 0.6f

Blur spread for each iteration.

Lower values give better looking blur, but require more iterations to get large blurs. Value is usually between 0.5 and 1.0.

Definition at line 16 of file DreamEffect.cs.

Referenced by FourTapCone().

float DreamEffect.ContrastBias = 0.3f

Definition at line 19 of file DreamEffect.cs.

float DreamEffect.ContrastPower = 5.0f

Definition at line 18 of file DreamEffect.cs.

int DreamEffect.iterations = 3

Blur iterations - larger number means more blur.

Definition at line 11 of file DreamEffect.cs.

Referenced by OnRenderImage().

Material DreamEffect.m_BlackChannelMaterial = null
private

Definition at line 55 of file DreamEffect.cs.

Material DreamEffect.m_BlurMaterial = null
staticprivate

Definition at line 42 of file DreamEffect.cs.

Property Documentation

Material DreamEffect.BlackChannelMaterial
getprotected

Definition at line 56 of file DreamEffect.cs.

Referenced by OnRenderImage().

Material DreamEffect.blurMaterial
staticgetprotected

Definition at line 43 of file DreamEffect.cs.

Referenced by DownSample4x(), FourTapCone(), and Start().


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