Hi everyone.. newbie question here.. I'm looking for a "flat" material.. should be easy but I can't find it in unity. basically a material that receives no light/shadow info, only texture... any help is appreciated, thanks!
You can use this shader for that:
Shader "CtrlJ/Unlit" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
}
Category {
Lighting Off
ZWrite On
Cull Back
SubShader {
Pass {
SetTexture [_MainTex] {
constantColor [_Color]
Combine texture * constant, texture * constant
}
}
}
}
}
Do what IJM said, or, if you need no tinting, make it even slightly faster and less complicated:
http://www.unifycommunity.com/wiki/index.php?title=Texture_Only#ShaderLab_-_Texture_Only.shader
I use the various particle materials for materials where I don't need any lighting. There's alpha blended, additive, and just plain diffuse. All have tinting though so if you don't need that Jessy's reply is the best...
The “CtrlJ/Unlit”-shader worked fine until I used transparent textures. Later found this that is both self-lit, flat and transparent:
Shader "AlphaSelfIllum" {
Properties {
_Color ("Color Tint", Color) = (1,1,1,1)
_MainTex ("SelfIllum Color (RGB) Alpha (A)", 2D) = "white"
}
Category {
Lighting On
ZWrite Off
Cull Back
Blend SrcAlpha OneMinusSrcAlpha
Tags {Queue=Transparent}
SubShader {
Material {
Emission [_Color]
}
Pass {
SetTexture [_MainTex] {
Combine Texture * Primary, Texture * Primary
}
}
}
}
}