Home > other >  OnRenderImage direct call destination, texture and the up and down
OnRenderImage direct call destination, texture and the up and down

Time:09-26

1, requirements:
With edge glow in the main display interface, need to camera in main interface edge glow texture on show elsewhere;

2, the Bug description:
In edge glow after processing, to render DST directly to the new renderTexture, two cameras, one of the camera to obtain texture in the Y direction, up and down against the;
By defining the temporary RenderTexture soc0 edge glow effect processing, then passed to the RenderTexture, display is normal;




3, wonder:
After tests found that the Bug has nothing to do with edge glow, set up two cameras in the scene, do not use any effect, the camera directly through OnRenderImage apply colours to a drawing gives the texture, the texture by RawImage showed that found one camera shows the texture has been up and down the Y axis;

pass through the temporary variables when, above normal display; Because
RenderTexture OnRenderImage (RenderTexture source, destination) in destination for other specific actions, not by Graphics, Blit (destination, RenderTexture); Directly to the destination???


4, the relevant test project:
Link: https://pan.baidu.com/s/1omrNxn9Y22yRcDNo-Ka4pQ
The extracted code: olck

CodePudding user response:

https://zhuanlan.zhihu.com/p/29228304
Read this article, such as due to difference OpenGL and Unity coordinate system, later have time to study
  • Related