Hello everyone
I’m working on an iphone game using Unity 3 iOS Pro
We made the choice to go for GLSL shaders and aim at 3GS devices.
The game features a lot of opaque geometry (both Static for environment and ‘non-Static’ for ships and such) and additive geometry for FX (bullets, halos, trails, force fields, …). I haven’t been looking into doing alpha blended stuff right now but there should be some of those as well in the final product.
In those screens the floor has a ‘regular’ opaque glsl shader (I assume the default states are Blend Off, ZWrite On, ZTest LEqual ).
The trail behind the ship, the bullets meshes and the force field all use the same shader and material for dynamic batching. The force field is also the children of the player ship, which is an opaque geometry
The halos are generated using the Halo component and seem to have a built in additive shader I have no access to.
Here’s the thing: I can never see my additive geometry if a Static geometry is drawn in the same place (pixel). Even when I force the ZTest off (ZTest Always - image n°6), the additive meshes disappear (but the halos don’t, even if they’re additive as well).
When the floor is not flagged as Static (which is obviously not the solution anyway), the bullets appears ok, but not the force field) (image n°2).
The relation the being Static or not seems like a bug to me, especially since it displays fine in the editor. But am I missing something? Can I somehow force the draw order with layers? Did I do something wrong with the rendering states maybe?
Thanks in advance