Hi all,
first of all sorry for my english, I’ll try to explain myself in the best way i can.
I’m having some problem trying to show a markings mesh on a pitch in a soccer game, it’s basically not showing correctly and the more the camera is far the more the mesh it’s broken/some parts just disappear.
don’t know if it’s caused by the mesh or by the shader and if this is the right section for a post like this (don’t really know too much abouth shader programming)…
I don’t think it’s a Z-fight problem, i can raise up the markings as much as i want and the problem will always be there.
anyway i’ve added some screenshots, I’ve used a transparent/cutout/diffuse for these screenshots just because the problem is more evident with this shader but what i would like to use at the end is this transparent/vertex color shader (I’m using it on other meshes without problems)
Shader "Transparent/VertexLit Colored" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
}
SubShader {
Alphatest Greater 0
Tags { "Queue" = "Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
ColorMask RGBA
Pass {
ColorMaterial AmbientAndDiffuse
Lighting Off
SetTexture [_MainTex] {
Combine texture * primary
}
SetTexture [_MainTex] {
ConstantColor [_Color]
Combine previous * constant, previous * constant
}
}
}
Fallback "Alpha/VertexLit", 1
}
Hope you can help me,
thank you