Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- public class StarFieldEffect : MonoBehaviour
- {
- public Shader s;
- private Material m;
- private Camera c;
- void Awake()
- {
- c = GetComponent<Camera>();
- c.depthTextureMode = DepthTextureMode.Depth;
- m = new Material(s);
- }
- void OnRenderImage(RenderTexture source, RenderTexture destination)
- {
- Graphics.Blit(source, destination, m);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement