Material.Shading Wireframe vs Flat rendering speed

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
User avatar
rrTea
Posts: 475
Joined: Sat Feb 15, 2014 9:54 am

Material.Shading Wireframe vs Flat rendering speed

Post by rrTea »

On my old laptop I'm getting some framerate drops here and there. I already implemented some checks to try and reduce some rendering when this happens (for example instead of using bitmap particles and glow effects for an explosion, I just draw a round mesh, or turn off some rendering intense background stuff etc) but seems this still isn't enough.

The next thing I was thinking of is to switch a Material.Shading that is used to render lots of elements on screen from Flat to Wireframe when the framerate drops, by checking for the framerate in main OnUpdate (if it's below 555 or 50, set the Shading to Wireframe, otherwise keep it on Flat for this frame).

If it matters, this Material also uses a Material texture (a small 128*128 or so). I made some tests but I'm not sure I see any difference. Is this idea even helping the situation or should I think of something else?
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Re: Material.Shading Wireframe vs Flat rendering speed

Post by Kjell »

Hi rrTea,
rrTea wrote:The next thing I was thinking of is to switch a Material.Shading that is used to render lots of elements on screen from Flat to Wireframe when the framerate drops, by checking for the framerate in main OnUpdate (if it's below 555 or 50, set the Shading to Wireframe, otherwise keep it on Flat for this frame).
Some GPUs don't have hardware support for wireframe-mode or drawing lines .. so in those cases switching to wireframe will actually be slower than sticking to flat shaded polygons.

Anyway, i'd recommend familiarizing yourself with a OpenGL debugger so you can measure & pin-point exactly what is causing the frame-drops :wink:

K
Post Reply