- Home /
Sprite/Vertext Colored, Fast Shader - Black and White
I'm not familiar with cusomizing shaders. Does anyone know how to make a Sprite/Vertex Colored Fast shader Black and White?
Here is the default shader:
Shader "Sprite/Vertex Colored, Fast" {
Properties {
_MainTex ("Particle Texture", 2D) = "white" {}
}
Category {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
Cull Off Lighting Off ZWrite Off Fog { Color (0,0,0,0) }
BindChannels {
Bind "Color", color
Bind "Vertex", vertex
Bind "TexCoord", texcoord
}
SubShader {
Pass {
SetTexture [_MainTex] {
combine texture * primary
}
}
}
}
}
Why do you need a black and white shader, rather than just making the textures black and white?
I have a large amount of atlases for 2d character animations, and need all these character animations to be in B&W for just a $$anonymous$$ute of game-play or so. Rather than add 4 mb to the game with new B&W atlases, I would prefer to just manipulate the current color of the character animations.
I can see many applications for a shader like this. Unfortunately I cannot help! Voting the question up =]
Here are some links that may help. You may have read the docs already, but check the links on the last link :
http://docs.unity3d.com/Documentation/Components/SL-SurfaceShaders.html
http://docs.unity3d.com/Documentation/$$anonymous$$anual/Shaders.html
http://docs.unity3d.com/Documentation/Components/SL-Shader.html
http://answers.unity3d.com/questions/7758/good-resources-for-learning-how-to-write-shaders-c.html
Your answer
![](https://koobas.hobune.stream/wayback/20220613081730im_/https://answers.unity.com/themes/thub/images/avi.jpg)