Writing · 20 August 2019
Simple single colour shader in unity with transparency
It’s kind of annoying that Unity doesn’t come with an unlit color shader that you can change the alpha value. So here one is. Instructions:
- From the ‘Create’ menu in the ‘Project’ window, select ‘Shader’ => ‘Unlit Shader’.
- Open the file that is created and copy paste the below.
- Finally, drag your shader onto your material, or select the shader in the material in the inspector window.
Shader "Unlit/Transparent Colored" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
}
SubShader {
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
ZWrite Off
Lighting Off
Fog { Mode Off }
Blend SrcAlpha OneMinusSrcAlpha
Pass {
Color [_Color]
}
}
}
← Planet Juggle now available to download for Oculus Rift and Quest!Flow Zone wins 3rd Place at Siggraph Asia →
in fiction
Featured
December 23, 2015
December 23, 2015
December 23, 2015
December 9, 2015
December 9, 2015
December 9, 2015
December 9, 2015
December 9, 2015
December 9, 2015


