Hi, I’d like to get some advice regarding multiple platform support.
I’m targeting iPhone 3G and up (I’m also building for Android, but let’s stick to iOS for the moment).
In my game I use a realtime vertex point light, which illuminates my level geometry. It’s the only realtime light in the game.
If I lightmap my levels using Beast it seems I can only get the point light to work if it is set to a pixel light (rendering set to ‘important’). This doesn’t work on older 3G devices and anyway pixel light is too slow for my purposes - I only need a vertex point light. It seems 2.0 can’t handle this so I am targeting ES1.1.
However it seems it’s not possible to have a vertex point light illuminating a Beast lightmapped object in ES1.1 - only a non-beast lightmapped object shows the lighting effect.
Is there a solution that would work for 3G and up that provides?
1 vertex point light
Beast Lightmapped level, with mobile/vertex lit shader
1.1 and 2.0 seem too different to have a “one size fits all solution” (assuming I want the gfx to look the same on each device). Could I script material / light property changes depending on the device?
Novice with shaders and this field of Unity is not my strong point… any help would be great!
This will work for OpenGL ES 1.1 and 2.0, but you won’t get optimal performance in 2.0 without a GLSL shader. Make sure you only bake the lights that can be baked. Also, name it; forward slashes create folders.
In the meantime, after following your tutorials and through a process of trial and error I ended up with this shader, which blends two textures (one can be a base texture and the other a lightmapped texture) and also uses vertex lighting. It works well on my iPhone 3G and on my iPhone4. I also managed to cobble together a version which blends in vertex colors as well - however I was unable to get that to work in a single pass. So I am using this currently:
Hi Jessy on the shader that you wrote above was looking for a version with alpha and alpha cutout in it I tried programming it but as usual i am not good at this kind of stuff