I try really hard to figure this out on my own but it don’t work…
The facts are:
-this is a iPhone game
-I use only 2 (“mobile”) shaders (Vertex Lit and Alpha Vertex Lit)
-there are no problems with poly/tris/Vertex count, Texture size etc
-the textures are all TGA (in case of the alpha bled stuff they use the Alpha channel)
and here is the problem:
Left is the same scene on iOS device (iphone 4) and right the same scene in the editor…
What are this black artifacts on the alpha? This only happens in fog.
Is there any way to make this run correctly? maybe I have forgot about something?
What does that mean? Where did you get them? “Alpha Vertex Lit” is a really terrible name; it propagates the myth that a lot of people around here seem to have, where alpha = “transparency”. It doesn’t have to.
A few things I have come across in IOS dev in regards to both alpha and fog.
Avoid alpha-testing, choose alpha-blending instead. Alpha Test is using hard edged alpha (it’s either 1 or 0, on/off alpha) and alpha blending is using an alpha channel that has different shades of gray (different levels of transparency).
Avoid fog (especially on newer than iPhone 3GS devices). It’s a performance killer I guess or causes draw issues.
Lastly check into the Unity shader your using and make sure it takes into account the alpha channel embedded within the TGA image. It might be only looking at the vertex alpha information applied to the geometry from your 3d package…(i.e. the same thing as vertex coloring on a vertex, but it’s transparency is also affected.)
JEssy: "Sorry I meant the standard mobile shaders: “Mobile/Transparent/Vertex Color” and “Mobile/Vertex Color”
I figured out right now that I was using the “old” standard iphon shaders from Unity Iphone 1.7 - Now when I use the default Mobil shaders - the fog is not working
I see there are problems with fog on the iOS… but is there any way to even fake this?
Our goal is to make a Silent Hill (Psx) graphic with this thick fog
It can be even something like in SH - so not with this soft gradient.
I don’t know what you’d be using the latter for, so I’ll comment on the former. It makes no sense. There’s all this setup for lighting (much of which won’t work on iOS anyway), but the lighting isn’t used. There’s some other shader like that, in that package, for which I tried reporting a bug, but the bug tracker was broken at the time, and I don’t even remember which it was. Also, neither of those shaders use fog, so I’m pretty confused about your intentions.
Again, it’s potentially an OpenGL ES 2.0 issue. Please answer the last question from my previous post, and tell us if you’ve tried the scene, building for 1.1.
tatoforever - but OglES1.1 is not a solution… I mean we all want to use Retine display and with 1.1 its impossible please unity do all you best to fix this
I understand that many games with wide aeras are using fog to vanish theyr object nicely, due to much objects/polys, instead of poping them off brutaly. =)
but fog does also give the feeling of an wide aera itself! What i want to say is, that the room gets bigger and the characters in there are getting optically smaller. in my project fog is an absolut necessary effect to get the right feeling of a big scene! And there is nothing to be alpha blended. Its an static scene, which uses transparency objects.
so i need this opengles2.0 fix too.
Poras, the Unity QA Engineer wrote on 15.12.2010 this thread “Fog issue is now fixed and fix should be available in the next release.”