I also have a custom layer called “SeparateObjects” applied to this same camera. When creating a render texture of the camera without the the post effect enabled it works fine. But once the post effect is applied it only renders a black screen.
Could anyone here point me in the right direction for making post effects work through a render target?
I realized that there are a few other people who came across this problem over a year ago (Can not get rendertarget when camera's posteffect is on
). One post I read said that I should use the camera’s renderTarget variable instead of a layer’s renderTarget. I have tried this but there was no change unless Im doing it incorrectly. Is there an example of how to do this?
Please forgive my simple mistake of this.cameraEntity.renderTarget = renderTargetVariable;
should have been this.cameraEntity.camera.renderTarget = renderTargetVariable; .
However I noticed that the texture is still flipped on the X and Y axis even though I set the flipX and flipY to true when initializing the RenderTarget object. Even when its set to false theres no change. Does anyone know why?
I was able to fix this by just rotating and flipping the object that I’m applying the RenderTexture object to but this may cause some issues in the future ?