Mobile Specular Lighting Stuff

Been working on ways to improve upon standard vertex lit shading for mobile games…
I figured out I could fake pixel lighting by using cubemaps with specular highlights baked in.
I slightly modified the Reflective-VertexLit (since the default one doesn’t account for ambient light, lame), and created an editor utility to bake specular highlights from a single directional light.
The result isn’t entirely accurate, but I don’t need it to be (I just need it to look good)

Here’s the results:
1120054--42227--$UnityFakeSpecularComparison.png

The one on the left is the standard Specular shader, and the one on the right is the modified Reflective-VertexLit shader.

Thoughts?

It’s a lot of memory to use to store mostly black. The per-pixel capability of mobile GPUs is increasing at an incredible rate. Memory performance and storage is not. I don’t think this is a good use of cubemaps. Especially if you’re using normal maps, because then you introduce a dependent texture read.

Well, in this case I wasn’t using normal maps, and my cubemap was a 64x64 cylindrical texture converted to a cubemap via the texture settings dropdown.
I also decided to take that image into GIMP and drop an environment map into it, so now instead of just specular highlights it’s got a bunch of other ambient stuff in it as well (which is a much better usage than having a bunch of black pixels in there, I agree).
This was my final environment image
1120629--42262--$Gen-Spec.png

I mainly wanted a way to output a specular highlight that would line up with the diffuse lighting in the scene (since I need this to work on a lot of objects in the scene so I can’t just use regular pixel lighting). Of course I also wanted to add in more ambient reflections (as shown above) because it just ends up looking better.

I should also point out that I’m not aiming this at low-end mobile devices, specifically I’m targetting the upcoming OUYA (equivalent to a high-end mobile device)

You can if you use PowerVR hardware instead. It doesn’t matter how many objects you use, with their TBDR.

Its GPU is not high-end.