Cutout Diffuse problem in Win web player

I’ve just tested webplayer build on Windows and I’m getting some ugly looking artefacts. :frowning: Runs fine on Mac. Using Unity 2.1 Pro, testing on iMac.

There is a polygon, 0.005 above grass plane. It is used to blend path (going around tanks) with grass. It uses cutout diffuse shader (receiving tank’s shadow).

When moving toward path, a line appears (and moves “up” and “down”, depending on viewing angle) dividing “OK” and “not OK” part of the same polygon. Everything below line is OK - blended perfectly, but everything above line is “wrong” - seems like lighting is ignored.

Is there any workaround? :cry:

It was z-fighting, after all. :sweat_smile:

0.05 distance works fine in Windows. Hope this will help someone. :slight_smile:

It’s better if you use a modified shader with Offset -1, -1 in it, which sort of “pulls the geometry forward” without changing its position. This way you don’t have z-fighting and don’t depend on trying to move objects arbitrary distances away from other objects.

–Eric

I’ve been reading about this, but had no clue that it could help me in this particular situation (although it’s pretty obvious now when you’ve mentioned it). :slight_smile: Tnx for the hint!