Jump to content

  • Log In with Google      Sign In   
  • Create Account

iPad3 static shadow maps


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 wildboar   Members   -  Reputation: 281

Like
1Likes
Like

Posted 10 July 2012 - 10:59 AM

Hmm so I implemented a small test for my mobile game engine. I knew that it ipad could not handle dynamic shadowmapping of the entire scene so I generate a 768x768 shadowmap at the start of the frame and leave it there, this is just done on the first frame and repeated on scene changes. It works pretty well producing very nice shadows which have nice quality with retina resolution and MSAA. But doing so my game performance drops from 60fps to 30-40fps depending how many mesh instances I have in the scene (I use frustum culling). I just cant understand why when having 5 extra meshes in the scene the frame rate drops so drasticly, I mean I am just sampling a static shadowmap once for each pixel.

How does infinity blade dungeons manage to have all these nice screen space effects combined with dynamic shadow mapping for characters. Is there some trick to this?

Sponsor:

#2 freakchild   Members   -  Reputation: 557

Like
0Likes
Like

Posted 10 July 2012 - 11:16 AM

For stuff like this, I think it's always best to analyze it in the GPU profiling tools. That will at least help to understand whether or not it should be taking this time and maybe point out a specific problem. What do those tools say?

It's a long shot, but given I once had a very similar frame rate drop I would also quickly check that something you have done has not kicked in the 'slow gl' path. There's a tool in the core animation profiler that can help determine this. If you support both landscape and portrait modes...do all profiling in both because some things only occur in landscape due to rotation processing and you need to understand the differences.

Edited by freakchild, 10 July 2012 - 11:17 AM.


#3 wildboar   Members   -  Reputation: 281

Like
1Likes
Like

Posted 10 July 2012 - 11:20 AM

I dont actually use apple tools at all. I am using a crossplatform API called marmalade which lets me code in C++
I am not sure what kind of profiling tools I can use with it as I cant even use gdebugger with it.

#4 EngineCoder   Members   -  Reputation: 246

Like
0Likes
Like

Posted 14 July 2012 - 07:00 AM

I dont actually use apple tools at all. I am using a crossplatform API called marmalade which lets me code in C++
I am not sure what kind of profiling tools I can use with it as I cant even use gdebugger with it.

Xcode includes a handy tool called Instruments that can be used to find bottlenecks.
My iOS 3D action/hacking game: http://itunes.apple....73873?ls=1&mt=8
Blog

#5 L. Spiro   Crossbones+   -  Reputation: 14245

Like
0Likes
Like

Posted 20 July 2012 - 04:24 AM

I know I am late to the party but what you are trying to do is a complete match for the results you are getting. You can’t really do much in retina display—only the most basic of basic graphics.


Shadow mapping causes dependent texture reads which are terribly slow on iOS devices in the first place.
This is done for every pixel of the scene, and the device is fill-rate limited, which is a bad mix.

In fact you optimized away exactly the opposite of what you should have. Generating mipmaps is virtually free if done properly. Using them is the problem.

Unreal Engine 3 generates shadow maps only for characters, and then all objects besides characters actually receive those shadows. Characters do not cast shadows on themselves nor on other characters. Characters often occupy a lot of the screen, so having them not receive shadows reduces fill-rate costs.


L. Spiro
It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS