Page 1 of 1

Material.Shading Wireframe vs Flat rendering speed

Posted: Thu Aug 09, 2018 3:39 am
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?

Re: Material.Shading Wireframe vs Flat rendering speed

Posted: Thu Aug 09, 2018 9:29 am
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