You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
701 B
26 lines
701 B
using UnityEngine; |
|
using System.Collections; |
|
|
|
public class IntersectionHighlights : PostEffectsBase { |
|
|
|
public Shader intersectionHighlightsShader; |
|
private Material intersectionHighlightstMaterial = null; |
|
public Material material { |
|
get { |
|
intersectionHighlightstMaterial = CheckShaderAndCreateMaterial(intersectionHighlightsShader, intersectionHighlightstMaterial); |
|
return intersectionHighlightstMaterial; |
|
} |
|
} |
|
|
|
void OnEnable() { |
|
GetComponent<Camera>().depthTextureMode |= DepthTextureMode.Depth; |
|
} |
|
|
|
void OnRenderImage (RenderTexture src, RenderTexture dest) { |
|
if (material != null) { |
|
Graphics.Blit(src, dest, material); |
|
} else { |
|
Graphics.Blit(src, dest); |
|
} |
|
} |
|
}
|
|
|