Yesterday I tweeted about my first two shaders: Sprite and Sprite Additive…
And today Aras Pranckevičius, lead graphics programmer at Unity, wrote me Unity 3.2 will have a couple of unlit shaders. That is perfect for my high performance mobile sprite needs. But until Unity 3.2 is released, I’d stick with my simple shaders.
In more detail: I’ve been looking for the right shader to shade my SpriteManager sprites. The default shader bundled with SM2 has vertex colored features, specularity and so on – but for my scenario it was a bit heavyweight, I just don’t need tinting and so on.
I am no expert in shaders (yet), so all I’ve done was fiddling around Mobile/Background and Mobile/Vertex Colored shaders from the SM bundle. Here’s results of the merge.
Honestly, I am not really sure I got everything right, but it works for me and allows me a bit higher framerate.
Sprite Shader
Shader "Mobile/Sprite" {
Properties {
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
}
Category {
Tags {
"Queue" = "Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Zwrite Off
Blend SrcAlpha OneMinusSrcAlpha
Lighting Off
Cull Back
Fog {
Mode Off
}
SubShader {
Pass {
SetTexture [_MainTex] {
Combine texture
}
}
}
}
}
Sprite Additive Shader
Shader "Mobile/Sprite Additive" {
Properties {
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
}
Category {
Tags {
"Queue" = "Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Blend SrcAlpha One
Cull Off
Lighting Off
ZWrite Off
BindChannels {
Bind "Color", color
Bind "Vertex", vertex
Bind "TexCoord", texcoord
}
Fog {
Mode Off
}
SubShader {
Pass {
SetTexture [_MainTex] {
combine texture * primary
}
}
}
}
}





















Few icons.
I’d like to show you a few new icons I recently uploaded to Dribbble.
There’s more in life than ActionScript 3, so as I wanted to keep the craft flowing, I needed to create a few icons. And, well, to be honest to show one thing which is rather old. So here we go:
Gems
Flake
1stOmni icon.
Actually this image is from 2001, but was never published before.