I know this is too common question, but after google and search in forum threads, I still can not understand clearly what is render target use for? And how it resolved your "problem" ? How to use it to boost our game performance? I am waiting explain from you here , thank you so much!
RenderTarget is a magic thing which lets you copy the visible pixels of any sprite. This is useful for screenshots, especially now when you can also save the RenderTarget to disk as an image.
It has to some degree been replaced by setClip(), which now lets you crop a sprite. This was my main use for RenderTarget before setClip() was added.
As totebo said, I was using it to "setClip" before setClip() was available, now I use it to apply shaders; with the new feature to save the rendertarget as png I use it also to "prepare" textures (remove background from textures exported by spriteilluminator by code&web which export a background even if the source sprites have alpha borders) Another use I do of it is a basic lighting/fog of war (http://giderosmobile.com/forum/discussion/5879/basic-view-range-lighting-effect/p1)
I'm planning to use it to create texturepacks on the run, and to save screenshots too, but I have not investigated those uses yet
I use RenderTarget for dynamic texture creation: I draw complex shape on them once and the result is displayed multiple times as bitmap. Som examples I wrote also use it for multiple pass rendering (ex: bloom shader). Lately I've been using it for capturing live video from camera device (snap shot) and saving that for later upload to a server.
RenderTargets are great and like @pie I want to use them to create special TexturePacks. I tried once and found a bug that got fixed recently so I'll look into that soon.
RenderTarget would be way more powerful if you could use it as a real texture, which can use wrap. Wrap is such a powerful part of textures I think.
I use rendertexture in the soon to be release new version of Bacteria to do a pixel fade over time effect (by not clearing the texture fully each frame) and also a bloom effect (a simple bloom shader attached to the sprite that points to the render texture).
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Comments
It has to some degree been replaced by setClip(), which now lets you crop a sprite. This was my main use for RenderTarget before setClip() was added.
Likes: vitalitymobile
Another use I do of it is a basic lighting/fog of war (http://giderosmobile.com/forum/discussion/5879/basic-view-range-lighting-effect/p1)
I'm planning to use it to create texturepacks on the run, and to save screenshots too, but I have not investigated those uses yet
Likes: vitalitymobile
Som examples I wrote also use it for multiple pass rendering (ex: bloom shader).
Lately I've been using it for capturing live video from camera device (snap shot) and saving that for later upload to a server.
Likes: vitalitymobile
RenderTarget would be way more powerful if you could use it as a real texture, which can use wrap. Wrap is such a powerful part of textures I think.
Likes: vitalitymobile
You can see the result here:
http://www.sinistersoft.com/bacteria/gideros.html
The actual sprites are path2D objects.
Likes: vitalitymobile
https://deluxepixel.com
Likes: SinisterSoft