1

I'm trying to render a shader on my mobile device. I use Graphics.Blit to render the shader as follows,

 void OnRenderImage(RenderTexture src, RenderTexture dest)
 {
    Graphics.Blit(src, null, shader);
 }

Unfortunately, it is slow in mobile devices. Is there any workarounds to optimize the speed of the same?

  • There's no shader stuff in your question. What have you tried so far? Why is your code slow? Maybe your Phone just haven't enough performance and you have to buy a better one. – user743414 Jun 05 '19 at 08:02
  • `shader` is the Material that Im rendering during runtime –  Jun 05 '19 at 08:15
  • I have tried to use onPreRender but still there is not enough performance boost –  Jun 05 '19 at 08:16
  • why do you pass null to blit? – zambari Jun 05 '19 at 08:33
  • Please refer my implementation https://github.com/qian256/cardboard_seethrough –  Jun 05 '19 at 08:43
  • 1. For someone to be able to help you, you will need to post your shader code, and some explanation on what you are trying to achieve and and why you need to use image post processing effects for this. 2. This questions are off topic for stackoverflow. You can try to asking it on https://codereview.stackexchange.com, that site is dedicated to people like you asking for advice on how to improve their working code. Good luck. – Yuri Nudelman Jun 05 '19 at 18:28

0 Answers0