Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
firagabird's avatar
firagabird
Adventurer
8 years ago

How expensive is specular in mobile, & how should it be implemented?

In John Carmack's indispensable VR Anti-Aliasing guide on Facebook, he mentioned this about specular reflections:
Specular at the geometry level (still calculated in the fragment shader, not the vertex level!) is usually ok, and also a powerful stereoscopic cue.

He implies that because specular reflection is still calculated per pixel, it will incur a significant performance cost. I'm interested to know how much it actually costs to implement specular reflection, particularly for mobile/Gear VR. I would very much like to implement it for its 3D cue.

Are there any guides or best practices to follow when designing my assets & optimizing my game with specular in mind?

3 Replies

Replies have been turned off for this discussion
  • @imperativity 

    This is incredibly helpful advice straight from the foremost authority on the matter! Thank you very much for helping with this query. :)
  • @imperativity 

    Can I ask a follow up question? I noticed in Oculus Home that the VR controller model uses specular highlighting. Would it be right to assume it's using a specular map, and since it's the only rendered game object (everything else is a compositor layer), the perf hit was acceptable?
  • @imperativity

    Just wanted to let John know one of the Daedalus dev's thoughts on the matter, both regarding his critique on the game's use of specular & normal maps, as well as the use of cubemap-based effects for Gear VR games in general:
    https://forums.oculusvr.com/developer/discussion/comment/572447/#Comment_572447

    Of note is @Norman3D's recommendation for other devs to make use of such maps, which is in direct opposition of Oculus' and John's guidelines. The dev also notes that their test environment is restricted to the Exynos/international Galaxy phones (S6 & S7), which seems to perform significantly better with cubemaps than the SD counterparts (including the SD821-powered Go). Finally, they noted that the driver performance regressed from Android 6 to 7.