x


alpha-cancel shader usage

Hi, I am trying to create a GUI interface which needed to use alpha-cancel shader as done in Bootcamp demo for making Radar. I can't get it to work in my project as the alpha-cancel shader seems to be not working in my project. But it seems to work on bootcamp demo.

I even export the package from the bootcamp demo and reimported to my project and it doesn't work either. Any help or advice would be really appreciate.

more ▼

asked Jul 14 '11 at 03:12 AM

softready gravatar image

softready
41 8 10 11

(comments are locked)
10|3000 characters needed characters left

2 answers: sort newest

got an answer to my self.. I just have to fiddle around with the alpha value of the Main Color inside Alpha-Cancel shader.. :)

more ▼

answered Jul 14 '11 at 03:26 AM

softready gravatar image

softready
41 8 10 11

just one more problem.... It doesn't work on text meshes... Anyone know How canI solve this?

Jul 14 '11 at 04:23 PM softready
(comments are locked)
10|3000 characters needed characters left

Shader "GUI/Textured Font" { Properties { _MainTex ("Font Texture", 2D) = "white" {} _Color ("Text Color", Color) = (1,1,1,1) }

SubShader {     
    Lighting Off       
    Cull Back
    ZWrite Off
    ZTest LEqual
    ColorMask RGB
    Alphatest Off

   Fog { Mode Off }
   Tags {"Queue" = "Transparent" }
   Pass {
      Blend SrcAlpha OneMinusSrcAlpha
      SetTexture [_MainTex] {
         constantColor [_Color]
         Combine texture * constant, texture * constant
      }
   }
}

}

Using the above shader and it works perfect for now ... :)

more ▼

answered Jul 15 '11 at 03:42 AM

softready gravatar image

softready
41 8 10 11

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x23

asked: Jul 14 '11 at 03:12 AM

Seen: 754 times

Last Updated: Jul 18 '11 at 11:37 PM