aframevr / aframe

:a: Web framework for building virtual reality experiences.
https://aframe.io/
MIT License
16.43k stars 3.91k forks source link

Lower performance A-Frame 1.0.x vs 0.9.2 #4439

Open smeybi opened 4 years ago

smeybi commented 4 years ago

Hi, I found out the performance is noticeably lower (specially with the Quest) since A-Frame Version 1.0.x vs. 0.9.2

I also tested with the Vive and Firefox, the same, lower performance. Unfortunately I have not found the reason.

Here some tests:

https://glitch.com/~aframe-performancetest-v092

https://glitch.com/~aframe-performancetest-v104

rigel-prime commented 4 years ago

Yes, I'm seeing this as well in my projects (tested on Quest w/ Oculus Browser)

dmarcos commented 4 years ago

There are no major API changes from 0.9.2 to 1.0.4 besides THREE updates. It needs profiling. I haven't noticed any perf regression on our deployed experiences.

IvoJager commented 4 years ago

This is likely(?) a duplicate of #4347. It is because of changes to the standard material shaders in THREE.js. We're sticking with a 0.9.2 and 1.0 hybrid as we have found 1.0+ to be too slow to be usable for our purposes.

dmarcos commented 4 years ago

@IvoJager Thanks! If it's the same issue, switching to flat shader should work around the problem, right?

IvoJager commented 4 years ago

@dmarcos Yep - if it's the same issue it should! :)

arpu commented 4 years ago

make sure alpha is set true in the renderer, there was some problems with set it false on oculus browser

arpu commented 4 years ago

https://github.com/mrdoob/three.js/issues/18338

dmarcos commented 4 years ago

Anything actionable here on A-Frame side?

IvoJager commented 4 years ago

In our case, we've been able to isolate the performance drop (across other 835 headsets as well - e.g. Vive Focus) to the changes in the standard materials in three.js. I believe it is the A-Frame team's intention #4347 to implement three.js' other, simpler materials that have a lower, fixed computation costs for the 1.1 milestone. This should avoid coding against a moving target (e.g. upstream three.js changes to the standard material) in the future, while allowing us to be more clever with resource allocation at little expense to visual fidelity.

arpu commented 4 years ago

the oculusGo alpha problem is fixed in upstream OculusBrowser

@IvoJager can you share the standard material change in threejs?

IvoJager commented 4 years ago

@arpu The biggest change is in the integrateSpecularBRDF shader function. I believe it has to do with the way roughness is rendered. I am not an expert in this subject matter though.