Triang3l / WebQuake

HTML5/WebGL source port of Quake
628 stars 100 forks source link

Performance issues with WebQuake build 54 (1.09) #32

Open JustH3LL opened 7 years ago

JustH3LL commented 7 years ago

So I decided to Mirror WebQuake on http://h3ll.x10host.com/WebQuake/

I couldn't help but notice that the version on Quaddicted seems to be way better optimized than the latest on here, I tested on a Chromebook to confirm this (huge random performance drops on the latest version on here even with a performance-increasing autoexec)

I'm sure this is due to optimization, and I'm willing to fix this myself if I had a pointer on where to start on this

My target is Chromebooks due their wide usage in schools

Triang3l commented 7 years ago

Probably caused by the dynamic vertex buffer rewrite. Dynamic vertex buffers are extremely messy and unpredictable in OpenGL, especially on mobile GPUs, I don't really know how to make the performance nice with them, considering WebGL doesn't even provide things like glMapBufferRange :(

LiamKarlMitchell commented 5 years ago

Could a shader do the job to change the vertex geometry if it's just moving points around? Or is it more involved?

Triang3l commented 5 years ago

Particles still need at least to be spawned and destroyed on the CPU, so they will be resubmitted in some form anyway, changing position to base position, velocity and time won't help. That's how dynamic VBOs are probably supposed to be modified in OpenGL ES, but also it's very broken in GL implementations.

SpiritQuaddicted commented 5 years ago

Quaddicted was finally updated too :p

I guess this issue can be closed as things simply changed and it sounds like it is going to stay that way.

Triang3l commented 5 years ago

OpenGL ES 2 sucks in general.