- Home /
Question by
christianterrence · Jan 24, 2018 at 09:50 AM ·
texturerendertexturevuforiacompute shader
Black Screen in Android when calling compute shader dispatch in Update
Hello,
I am trying to create a real time GPU Ray Tracer embedded in Augmented Reality using the Vuforia SDK. The ray tracer is done by rendering a texture on a Raw Image object nested inside a Canvas object.
It works fine in android when no augmented reality objects are used but when I embed the canvas on an ImageTarget in Vuforia, the splash screen appears but the screen remains blank.
After some debugging, I sniffed out that the bug is caused by the Compute Shader dispatch being called from the update function.
private void Update() {
UpdateTextureSize ();
shader.SetFloat ("globalTime", Time.time);
shader.Dispatch (0, numThreadGroupsX, numThreadGroupsY, numThreadGroupsZ);
}
Thank you very much for your help!
arraytracer.png
(117.9 kB)
computeshaderraytracing1.png
(140.1 kB)
Comment