Issue metadata
Sign in to add a comment
|
VR UI performance: Make the floor grid cheaper to draw |
||||||||||||||||||||||||||
Issue descriptionThe current UI draws every floor pixel, using the shader to compute the appearance of lines. While flexible, this is very expensive to draw. Originally, we drew simple GL lines. We moved away from this, possibly because the lack of MSAA made them look rough. Now that we use MSAA, the original approach may again be fine. Assuming that it's much cheaper to render, we should move back.
,
Apr 27 2018
,
May 17 2018
,
May 17 2018
,
May 18 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a390e0340ad7432fc2bbdcf863b04ac3bf290f57 commit a390e0340ad7432fc2bbdcf863b04ac3bf290f57 Author: Aldo Culquicondor <acondor@chromium.org> Date: Fri May 18 21:18:44 2018 VR: Optimizing floor grid shader performance. According to meassurements, the grid costs about 2.4ms to render. This CL reduces the time to about 1.1ms. The approach was to simplify the math and to use discard, as we don't really need a gradient anymore. Branch and discard is a good option in this case (as opposed to using step) because the discarded fragments are the majority. Bug: 831620 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr Change-Id: Ieee547205e7a3f01ac028b39a31c4232e32e5c3d Reviewed-on: https://chromium-review.googlesource.com/1065574 Reviewed-by: Christopher Grant <cjgrant@chromium.org> Commit-Queue: Aldo Culquicondor <acondor@chromium.org> Cr-Commit-Position: refs/heads/master@{#560041} [modify] https://crrev.com/a390e0340ad7432fc2bbdcf863b04ac3bf290f57/chrome/browser/vr/elements/environment/grid.cc [modify] https://crrev.com/a390e0340ad7432fc2bbdcf863b04ac3bf290f57/chrome/browser/vr/elements/environment/grid.h [modify] https://crrev.com/a390e0340ad7432fc2bbdcf863b04ac3bf290f57/chrome/browser/vr/ui_scene_creator.cc
,
May 23 2018
,
May 23 2018
Did we measure the savings if we were to use lines?
,
May 23 2018
I just did the testing. Only about 0.2ms are saved with GL_LINES (Tested on Pixel XL). In exchange, we obtain a harsh grid and the perspective is lost (which should affect width of the lines). As a side note, both the shader grid and the lines grid don't produce artifacts when AA is disabled. Just in case we want to revisit this later, a CL was posted: crrev.com/c/1070482
,
May 23 2018
Cool, thanks for checking! |
|||||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||||
Comment 1 by tiborg@chromium.org
, Apr 13 2018