Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411512 Posts in 69376 Topics- by 58430 Members - Latest Member: Jesse Webb

April 26, 2024, 06:31:34 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Image effect flips camera upside down?
Pages: [1]
Print
Author Topic: Image effect flips camera upside down?  (Read 700 times)
Lycaon
Guest
« on: October 12, 2014, 03:50:44 PM »

For the record, this is my ImageEffect code + shader.

So, I have this ImageEffect that fires when the player takes damage to glitch out the screen, and for a while it was all good, but now it's flipping the camera upside down, even when glitch != true. What I thought brought about the problem was adding a Bloom effect onto the UI camera, but even when I remove that ImageEffect from the UI Camera, it still flips the screen. I know that this problem arises because of the way DirectX and OpenGL handle texture coordinates differently, but even putting in

Code:
			#if UNITY_UV_STARTS_AT_TOP
if (_MainTex_TexelSize.y < 0)
o.uv.y = 1-o.uv.y;
#endif

didn't help anything.

Do you guys know what's wrong? I'm really bad at shaders/ImageEffects.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic