How would you create look for floating computer interface?

Hi there!

I'd like to create a look for an in-game computer interface, that floats like an object in the level (like in the image below). How would you create an alpha channel like those stripes? Shader? Post Effect? Something else? What do you think is the most easy way?

Thank you for your suggestions!

alt text

Shader. In the Pixel shader, for a pixel whose x position on screen is odd (or even, doesn't matter), divide the alpha value by whatever you want.

Ok, just in case someone is interested: This is the final shader code I wrote for this effect. It uses a texture for the alpha channel, that is textured in screen coordinates, so you can decide for yourself how the alpha should look like. The Lighting function produces a flat, unlit surface.

Most likely not as performant as taoa's answer, but more flexible and better suited for what I needed.

Only drawback so far: In oder not to stretch the alpha, but tile it across the screen, you have to pass the shader the dimensions of your (quadratic) alpha texture and the screen.

Shader "FX/Computer Display" {
Properties {
    _Color ("Color", Color) = (1,1,1,1)
    _AlphaTex ("Alpha Texture (R = Transparency)", 2D) = "white" {}
    _ScreenResW ("Screen Resolution Width", Float) = 1024
    _ScreenResH ("Screen Resolution Heigth", Float) = 768
    _TexRes ("Quadratic Texture Resolution", Float) = 128
}

SubShader {
    Tags { "RenderType"="Transparent" "Queue"="Transparent"}

    CGPROGRAM
    #pragma surface surf Unlit alpha 

    struct Input { 
        float4 screenPos;
    };

    float4 _Color;
    sampler2D _AlphaTex;
    float _ScreenResW;
    float _ScreenResH;
    float _TexRes;

    void surf (Input IN, inout SurfaceOutput o) { 

        // calculate pixel-correct screenspace UVs
        float2 screenUV = IN.screenPos.xy/IN.screenPos.w;
        screenUV.x *= _ScreenResW/_TexRes;
        screenUV.y *= _ScreenResH/_TexRes;

        half4 ac = tex2D(_AlphaTex, screenUV);

        o.Alpha = ac.r * _Color.a;
        o.Albedo = _Color.rgb;
    }

    half4 LightingUnlit (SurfaceOutput s, half3 lightDir, half atten) {
        half4 c;
        c.rgb = s.Albedo * 0.2;
        c.a = s.Alpha;
        return c;
    } 

    ENDCG
} 
Fallback "Transparent/VertexLit"
}

#pragma surface surf Unlit alpha
does not work for iPhone ?
It says:Shader error in ‘Mobile/Alpha Vertex Color’: Surface lighting model ‘Unlit’ not found. Available models: BlinnPhong, Lambert at line X