I wan’t to implement post effect toward Nreal glasses by using OnRenderImage function of Unity MonoBehaviour like this:
public class PostEffect : MonoBehaviour
{
public Material mosaic;
void OnRenderImage(RenderTexture src, RenderTexture dest)
{
// TODO: my post effect
// Graphics.Blit(src, dest, mosaic);
}
}
On Unity editor, the function has effects, but on Nreal glasses (by installing .apk), it seems no effect, looks like NOT being called.
Do you guys know about the specificaions of Unity scripts with Nreal?
This is a link of methods of MonoBehaviour class of general Unity (including OnRenderImage).
I found several cameras (left, center, right) inside NRCamera. I’m just trying to attach a script among these (now devices are apart from me, so later test it).
I attached my script to ‘Left Camera’ and ‘Right Camera’ of NRCamera (except for ‘Center Camera’), OnRenderImage function was called and my app went well!