We modified the provided command buffer sample to downscale a render target down to 1x1, save it to a RenderTexture, and then apply this RenderTexture to the wall. The biggest modification we made is creating a RenderTargetidentifier out of a RenderTexture and blitting to that at the end instead of using a global sampler variable, and then putting that RenderTexture on the target object’s material.
It all works well in the editor but when building and running for Android the wall is black, as if the command buffers don’t even work on Android.
On our real project where we do this 5 times, the project flat out crashes…
Which CommandBuffer sample are you using? It’s a bit difficult to help debug without more information about what specifically is happening.
Are there any runtime exceptions thrown when the build crashes? It could be that you are attempting to blit to a non-existent render-target, or one that has been released and are not handling the thrown exception.
After some more debugging it seems the blackness was from a shader we didn’t add to “always included shaders”. We fixed that and now the test project works on a Nexus 6 and crashes on a Galaxy S6.
1 Like
The crash seems to be from adding OpenGLES3 to the list of Graphics APIs.
Hi I have the same problem.Could you please give me a detail how to solve it. Because I include the shader ,but the result is still black.