Jump to content
Posted 15 October 2012 - 02:36 AM
Posted 15 October 2012 - 07:15 AM
Posted 16 October 2012 - 08:36 AM
Hello guys. Sorry for my English in advance.
In brief: I’d like to get my game characters outlined like in the game MyBrute (http://www.mybrutech...m-simulator.jpg)
The character animation consists of a number of images that move around (it all works on OpenGLES2.0, iOS). I’d want to outline the animation dynamically while it’s playing, with all the moving parts.
I’ve already tried:
1. To make a virtual texture out of the animation, then to get the information about this texture and make the stroke (but FPS goes down a lot), then to draw the texture in the scene.
2. To make a virtual texture out of the animation and then to use a pixel shader on it while rendering.
I have noticed that drawing a texture lowers FPS by 10%, which is quite strange to me.
Probably, someone could think of any solution? And why you think drawing a texture affects FPS so much?
Thanks a lot in advance!
Edited by InvalidPointer, 16 October 2012 - 09:02 PM.
Posted 16 October 2012 - 10:43 AM
Posted 16 October 2012 - 12:12 PM
(1/30-1/60)/(1/900-1/1000) = 150
A bit offtopic but:
Difference between 1000 FPS and 900 FPS is 1 ms. Difference between 60 FPS and 30 FPS is 16.6 ms.
Posted 23 October 2012 - 10:16 AM
Posted 25 October 2012 - 04:33 AM
This is the proper way to build outlines; to do it in a preprocessing step you need to leave enough transparent pixels between adjacent sprites in your sprite sheet and account for outline size in your draw calls, but it isn't a big deal.
Something like... if this pixel is transparent, then test the pixels around this pixel to see if any are NOT transparent, if any neighbors are NOT transparent then you are probably a border pixel and can draw it as black instead of it's alpha color.
Omae Wa Mou Shindeiru