- Home /
Screen Tearing Effect
Hi all,
I've been trying to create a sort of intentionally glitchy effect in Unity by throwing together a combination of post processing effects which flicker on and off. Something that I'd really like to create is a screen tearing effect - I've had some success by setting the camera clear flags to depth only, geometry tears into the skybox. What I really would like is a shader I could apply to an object to create screen tearing on that object, I've tried playing with some depth buffer tricks but so far haven't been able to get anywhere. Could anyone point me in the right direction?
Cheers
If you are using the correct ter$$anonymous$$ology to reffer to the effect you want this is how to do it:
1. $$anonymous$$eep the last rendered frame cached
2. Generate a random number between 0 and width*height
3. "cut off" the pixels from the previous render until you reach that number
4. Render the previous frame on top of the current frame (cut off)
Thats the general theory XD
What's the fastest method of keeping the last rendered frame and combine these 2 frames? Texture2D.ReadPixels is pretty slow, as is combining the images in c# and then uploading them to the graphics card..
ID$$anonymous$$, never made a post-processing effect XD
Your answer
![](https://koobas.hobune.stream/wayback/20220613112245im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Something weird is happening with my vertex shader... 0 Answers
Shader to a Camera 1 Answer
How to mask a camera using the render from another 0 Answers
Hex grid effects 0 Answers
Intersection / Geometry blend shader graph problem 0 Answers