- Home /
Strange bug(?) using Graphics.Blit
Whenever I use it on my Lenovo TAB 2 a10-70f, I experience some weird aliasing effects. Have a look:
You can clearly see the aliasing at 0:07. Afterwards I turn off the feature and things look clear at 0:19. It should be mentioned that there is a slow camera shake going on, and all UI is rendered in world space, rather than screen space. (The aliasing effect also shows with any other object btw, which makes sense because OnRenderImage gets the image after an entire single world render. However. it shows more clearly on the UI.)
void OnRenderImage(RenderTexture source, RenderTexture destination)
{
if (bulbTime > bulbDuration)
{
Graphics.Blit(source, destination);
return;
}
postProcessor.SetFloat("_xCenter", bulbCenterX);
postProcessor.SetFloat("_yCenter", bulbCenterY);
postProcessor.SetFloat("_distort", bulbingCurve.Evaluate(bulbTime / bulbDuration) * bulbStrength);
Graphics.Blit(source, destination, postProcessor);
}
As you can see in the video, there is a tiny little dot on the screen, which I use for debug purposes. I also have an issue with this, but that is for another question. When the dot disappears, Graphics.Blit(source, destination) is used. When the dot is active, my postprocessor shader is active.
When I fully turn down the slider for the postprocessor, I turn off the script and the OnRenderImage is not used. As you then can see, no aliasing effects anymore.
I only have this issue with Android devices.
Any ideas what could be causing this and/or how to avoid the problem?
Your answer
![](https://koobas.hobune.stream/wayback/20220612045750im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Shader works in Editor/Windows but not on Android 1 Answer
RWTexture2D in Compute Shader on Android? 2 Answers
need help making this mobile shader more efficient 0 Answers
GPU GC1000 supported ? 0 Answers
vertex displacement shader and ssao 0 Answers