turbulenz / webgl_benchmark

Polycraft.gl is an online benchmark application that measures the performance of your WebGL compatible device, powered by Polycraft and ga.me.

Home Page:polycraft.gl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wobbling corruption seen on devices with 10-bit mediump vertex shader precision

Oletus opened this issue · comments

Steps to reproduce:
-You need a device which reports ~10 mantissa bits for mediump vertex shader precision on https://www.khronos.org/registry/webgl/sdk/tests/extra/webgl-info.html . Tested on Nexus 10 using ARM Mali T-604 GPU. Most devices don't work, since they use only one underlying precision for vertex shaders.
-When using Chrome, set "Override software rendering list" from chrome://flags and restart if necessary to unlock WebGL.
-Run the benchmark.

The geometry will noticeably wobble around as the camera and characters move due to the insufficient vertex shader precision. This will also cause geometry that is close to other geometry in the z-buffer to flicker in and out.

This might be a bug in the engine rather than this specific demo, if the shaders are supplied by the engine. Easiest fix is to set the precision of all vertex shaders to highp instead of mediump. Highp support is only optional in fragment shaders in GLES2.0, so using highp in vertex shaders does not regress compatibility.

This issue has been addressed in the Turbulenz Engine. Engine updates to the benchmark will include this fix. Waiting on integration to test.