Problem rendering a texture

Hi, I'm newbie in unity and I'm getting problems when trying to render a plane with a texture over another plane.

I don't know what could be the problem, so I attach an image to show you the problem. Some squares looks bad and other looks good.

The orange squares are a plane with a texture with transparent/diffuse shader. The position of that squares is a little upper than the big plane under (+0.001 on the Y axis).

alt text

Thx, and sorry for my bad english.

Just a thought but for a start you might try setting "Wrap Mode" on the bad texture to "Clamp" instead of "Repeat".

I assume that you want the black lines to show through the orange upper squares, so if the above doesn't work then double check your alpha channel. Are you sure it has the correct transparency that you need?

Without seeing the actual texture you're using it's hard to say for sure what they problem might be.

The big plane under has 2 material, the first one with a diffuse shader and a texture of grass, the second one with a transparent/diffuse shader with a texture with black lines only, the rest is transparent. The orange squares are planes with an orange texture 50% transparent. One instance of the object for each square.

I try with some shaders at the penelope tutorial, and VertexColor-1 solve my problem, but I don't know why, I don't know much about graphics. Maybe someone could help me a bit if they know where was the problem.


Shader "Transparent/VertexColor-1" {
Properties {
    _Color ("Main Color", Color) = (1,1,1,1)
    _SpecColor ("Spec Color", Color) = (1,1,1,0)
    _Emission ("Emmisive Color", Color) = (0,0,0,0)
    _Shininess ("Shininess", Range (0.1, 1)) = 0.7
    _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}

Category {
    Tags {"Queue"="Transparent-1" "IgnoreProjector"="True" "RenderType"="Transparent"}
    ZWrite Off
    Alphatest Greater 0
    Blend SrcAlpha OneMinusSrcAlpha 
    SubShader {
        Material {
            Diffuse [_Color]
            Ambient [_Color]
            Shininess [_Shininess]
            Specular [_SpecColor]
            Emission [_Emission]    
        Pass {
            ColorMaterial AmbientAndDiffuse
            Lighting Off
            SeparateSpecular On
        SetTexture [_MainTex] {
            Combine texture * primary, texture * primary
        SetTexture [_MainTex] {
            constantColor [_Color]
            Combine previous * constant DOUBLE, previous * constant