GetRenderTargetTexture() on GameViewport works in editor mode, but returns 0 in standalone
I'm trying to get a native texture pointer to the content currently displayed on screen.
Using 4.8.3 and executing the following code on the render thread:
Returns the correct texture pointer when run in the editor, and everything works fine.
However, when I run my project as a standalone or after packaging, it returns a null pointer. I'm guessing the viewports and rendertargets are set up differently in standalone mode compared to regular mode. How can I achieve what I want, so it works in all cases?
asked Jul 30 '15 at 12:29 PM in Rendering
I did in fact solve this! To convert the pixel format, you can sample the backbuffer using a simple pixel shader and draw it on a new render target with the desired size and format. Seems to have close to zero impact on performance.
Follow this question
Once you sign in you will be able to subscribe for any updates here