Material.Shading Wireframe vs Flat rendering speed

All topics about ZGameEditor goes here.

Moderator: Moderators

User avatar
rrTea
Posts: 320
Joined: Sat Feb 15, 2014 9:54 am

Material.Shading Wireframe vs Flat rendering speed

Postby rrTea » Thu Aug 09, 2018 3:39 am

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: 1648
Joined: Sat Feb 23, 2008 11:15 pm

Re: Material.Shading Wireframe vs Flat rendering speed

Postby Kjell » Thu Aug 09, 2018 9:29 am

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


Return to “General discussion”

Who is online

Users browsing this forum: No registered users and 1 guest