Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Dajuice

Pages: 1 [2]
16
Support / Sprite ID performance vs Animated Sprites?
« on: November 23, 2012, 05:07:04 pm »
Hello, I have a game that has several static sprites which change stance from time to time, nothing needing an actual timeline, they just switch between 2 static images when prompted to. Is it more optimized CPU and memry wise to just switch sprite ID in this case?

17
Support / Overlay a color completely? -Performance cost?
« on: November 01, 2012, 08:30:13 pm »
In this topic
http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,118.msg311.html#msg311

you propose a shader I imagine you made for the guy, nice! But when I wanted to use it in my game so I changed every shader for this, changed some parts of the shader so I could have black as well as white shades of my sprites, then I tried all that on the iPad1... the framerate was around 30fps (the game is supposed to run at 60fps, it is a really basic game). The part I changed to do this was:

Code: [Select]
SetTexture [_MainTex] { combine texture+primary, texture * primary}to
Code: [Select]
SetTexture [_MainTex] { combine texture+-primary}
SetTexture [_MainTex] { combine previous+-primary, texture * primary}

Then I figured that settings a texture twice would be rather GPU intensive so I reverted to the original version, but it was only slightly better, setting all the materials to the original shader gave me a steady 60fps.

I only have one element to flash to white so this is not so much of an issue for me right now, but I'm planning to make a game that will hold many more blinking elements on screen, do you have any idea as to why the shader is so much heavier and if there could be another way/shader to achieve white blinking?

Pages: 1 [2]