SteamVR_CameraFlip.cs 441 B

1234567891011121314151617181920
  1. using System;
  2. using UnityEngine;
  3. public class SteamVR_CameraFlip : MonoBehaviour
  4. {
  5. private void OnEnable()
  6. {
  7. if (SteamVR_CameraFlip.blitMaterial == null)
  8. {
  9. SteamVR_CameraFlip.blitMaterial = new Material(Shader.Find("Custom/SteamVR_BlitFlip"));
  10. }
  11. }
  12. private void OnRenderImage(RenderTexture src, RenderTexture dest)
  13. {
  14. Graphics.Blit(src, dest, SteamVR_CameraFlip.blitMaterial);
  15. }
  16. private static Material blitMaterial;
  17. }