- Home /
 
Why does this script make my camera upside down?
Title says it all really. I have unity pro and I'm testing this script i found it makes my scene look so sexy but its upside down what would be causing the camera to flip from this script?
 using UnityEngine;
 
               using System.Collections;
[AddComponentMenu("Image Effects/Boost Colors")] public class BoostColors : MonoBehaviour {
 static Material s_BoostMaterial = null; public float blackLevel = .15f;
 void OnRenderImage (RenderTexture source, RenderTexture dest) {
     if (!s_BoostMaterial) {
         s_BoostMaterial = new Material (
             "Shader \"\" {" +
             "   Properties {" +
             "       _Color (\"Color\", Color) = (.3,.3,.3,.3)" +
             "       _RTex (\"RenderTex\", RECT) = \"\" {}" +
             "   }" +
             "   SubShader {" +
             "       Cull Off ZWrite Off ZTest Always" +
             "       Pass {" +
             "           SetTexture [_RTex] { constantColor [_Color] combine texture - constant DOUBLE }" +
             "       }" +
             "   }" +
             "}"
         );
     }
     RenderTexture.active = dest;
     s_BoostMaterial.SetTexture ("_RTex", source);
     s_BoostMaterial.SetColor ("_Color", new Color (blackLevel,blackLevel,blackLevel,blackLevel));
     s_BoostMaterial.SetPass (0);
     GL.PushMatrix ();
     GL.LoadOrtho ();
     GL.Begin (GL.QUADS);
     GL.TexCoord2 (0,0); GL.Vertex3 (0,0,0.1f);
     GL.TexCoord2 (1,0); GL.Vertex3 (1,0,0.1f);
     GL.TexCoord2 (1,1); GL.Vertex3 (1,1,0.1f);
     GL.TexCoord2 (0,1); GL.Vertex3 (0,1,0.1f);
     GL.End ();
     GL.PopMatrix ();
 }
 
               }
This is a unitypro only feature but i dont understand why its causing my camera to be upside down. Could someone please help me on this issue. Thank you very much.
Yes same error but i cannot see the problem with my script. This is really confusing i have all the standard assets that comes with unity. I had this working last week but this week its being a little stupid lol
Your answer
 
             Follow this Question
Related Questions
How To Add A FX When I Teleport. 0 Answers
Learn Scripting Easy? 5 Answers
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
How to add a cooldown to a move. 1 Answer
Objectives based on object appear. 2 Answers