|
Hello we just faced this problem which is quite weird. I have 2 groups of objects which have mobile/transparent vertex color shader assigned to their material. now the problem is in come certain camera angle these object either have weird cutoffs or just totally disappeared. now when I change the camera height or angle these objects appear or the cutoff problem is gone. having said that, our camera is stationary and we certainly do not like to relocate it. any solutions?
(comments are locked)
|
|
ok, I actually figured it out. just in case others have the same problem: when you are have 2 object in front of camera and in front of eachother and they both have transparency assigned specially if they have transparent texture like PNG files, make sure that at least the one behind is using alpha cut off not regular simple transparency shader. That doesn't solve the problem. Your edges are either binary or will be sorted in the wrong order (and the latter requires two draw calls). You need to do something to control the sorting order unless that is acceptable.
Jun 15 '11 at 02:23 AM
Jessy
you might be right but do you have a solution for it? because the only way that solved the issue was just that. using alpha cut of on one of them
Jun 17 '11 at 06:14 AM
raminsh
Unless your edges were binary, you did not solve the problem; you only mitigated it. There is no universal solution; how to sort queues depends on your project, and may be practically impossible, which is why people take the approach you did. http://unity3d.com/support/documentation/Components/SL-AlphaTest.html Metroid: Other M is a recent game that used only alpha testing and no blending. Very ugly foliage!
Jun 17 '11 at 01:40 PM
Jessy
(comments are locked)
|
|
Have tried playing with near and far clip already no result there. Apparently it's an issue with two transparent objects in front of eachother.
(comments are locked)
|
|
If you look into the last shader from the page http://docs.unity3d.com/Documentation/Components/SL-AlphaTest.html you can notice they turn off ZWrite. Adding ZWrite off to every passes of your shader should do the trick. At least, it did for me.
(comments are locked)
|
|
Sounds like a problem of Clipping Planes. Go to your Camera object, then both reduce the Near vale and increase Far value. This should solve the problem, let us know!
(comments are locked)
|

Do not post on two different sites without crosslinks.