- Home /
Changing AlphaSelfIllum Shader to use Cutout?
I'm currently using the AlphaSelfIllum shader found here within a project however the edges end up with a faint white outline and quite blurry as shown below...
I've tried using a Transparent->Cutout->Diffuse shader and the edges are far crisper and don't have the white outline, this is perfect except it's not self illuminated.
How can I adjust the AlphaSelfIllum shader to use this cutout method? I've never done any shader programming before so don't really know what I'm looking for in order to get this to work...
Thanks!
Answer by equil · Mar 18, 2013 at 09:15 PM
this should do the trick:
Shader "My Shaders/CutoutSelfIllum" { Properties { _Color ("Color Tint", Color) = (1,1,1,1) _Cutoff ("Alpha cutoff", Range(0,1)) = 0.5 _MainTex ("SelfIllum Color (RGB) Alpha (A)", 2D) = "white" } Category { Lighting On ZWrite Off Cull Back Tags { "Queue"="AlphaTest" "IgnoreProjector"="True" "RenderType"="TransparentCutout" } Alphatest Greater [_Cutoff] SubShader { Material { Emission [_Color] } Pass { SetTexture [_MainTex] { Combine Texture * Primary, Texture * Primary } } } } }
Answer by MSFX · Mar 27, 2013 at 09:52 PM
thanks for the response!
that works but I still get a nasty edge... it's nowhere near as nice as the edge when just using a diffuse... :s
Your answer
Follow this Question
Related Questions
Changing material color´s alpha in self iluminated shader 1 Answer
which shader to use for dualsided alpha cutout with light cookie enabled? 1 Answer
Separate Alpha and Color Textures for CutOut Shader 1 Answer
Merging (alpha) Unlit shader with Cutout shader 3 Answers
Transparent cutout shader for circular timer from Photoshop PNG is too messy/sloppy 1 Answer