12-10-2017 05:14 PM
I'm heavily invested in implementing stereo-correct specular highlighting in Gear VR. One of my biggest issues with almost all existing Gear VR titles is that the best looking ones still have a dull, unrealistic look. My working theory which I'm looking to test is that it has to do with the complete lack of specular highlighting.
Of course, a full featured reflection shader will kill mobile performance, so that's of the table. Normally, the right optimization would be to use specular & roughness maps (Daedalus for Gear VR uses this). Unfortunately, this is still incredibly GPU intensive, and causes heavy aliasing if done wrong.
The suggestion proposed by John Carmack would be to do specular highlighting in realtime, but in the simplest possible case: one directional light e.g. the Sun, the camera & normal angles calculated in the vertex shader, and the light angle & specular highlight itself calculated in the fragment shader.
Even with this simple case, fairly advanced functions (pow, cos) need to run on the vertex & fragment shaders. I was wondering: has anyone tried using LUTs (look up textures) to speed up the calculations? Is the bandwidth tradeoff acceptable in a real world Gear VR game? What other optimizations could I try to speed up the process of calculating specular highlighting in realtime?
12-11-2017 10:47 AM
12-11-2017 05:54 PM
12-12-2017 04:24 AM
firagabird said:
@Norman3D
Thanks for the highly detailed insight into your game's graphics implementation.
Your wholehearted recommendation for using cubemaps is incredibly surprising, and seems in contrast with Oculus & Carmack's guidelines. It really goes to show that very few rules in VR are a given. Beyond specific implementations (which I'll definitely try!) I think the biggest takeaway for graphics is: don't knock it till you try it.
Re: Oculus Go, it actually uses a Snapdragon processor (SD is also used in American S7's) which would explain the similar performance profile between the two. It's really unfortunate that Exynos processors behave differently, and that some things that run well on them are less performant on their Snapdragon equivalents. I was kind of hoping for Oculus Go to be an undisputedly faster device than at least both S7 models.
12-12-2017 05:31 PM
Norman3D said:
Hardware specs for the Oculus Go are not confirmed afaik. Even if it's the same chip as american S7 (Snapdragon), you can't forget that multires will be implemented at the driver level, giving us at the very least 15% more pixel shader, depending on your foveation level.
My point with the post above is that cubemaps can be used, just make sure to add them where it counts. All the materials in Daedalus for the S8 have parallax corrected cubemaps, with roughness maps and normal maps. On the S6 the concrete surfaces have no cubemap at all, and only the metallic surfaces have a cubemap with roughness map, but no normalmap and no parallax correction.
If your game features no locomotion then parallax corrected cubemaps make little sense for example, as the parallax can only really be perceived when moving the camera around.
It's not all black or white, there are definitely shades of grey when it comes to adding graphical features to your gear vr games.
12-15-2017 01:39 AM
12-15-2017 04:04 AM
Norman3D said:
[...] I took it upon myself to put in as many graphical features as I could, seeing as most games on GearVR look very flat and don't seem to have much effort put into shader and shader optimization.