- Home /
Mobile alternative to shader "Self Illuminated"?
Is there a mobile alternative to the "Self Illuminated" shader?
I have tried using the regular one but it performs poorly.
Answer by numberkruncher · Feb 05, 2012 at 05:34 PM
I think that I have come up with an alternative solution. I have created my very first shader (with the help of Unity iOS ShaderLab Video Tutorials).
This shader uses vertex colours (from vertex painting in Blender) instead of separate self-illumination texture. It supports fog and a basic amount of lighting. It seems to be more efficient and I have saved the need for a texture!
Shader "Custom/Vertex Emission" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Pass {
Material {
Ambient [_Color]
Diffuse [_Color]
}
ColorMaterial Emission
Lighting On
SetTexture [_MainTex] {
Combine texture * primary Double, texture * primary
}
}
}
Fallback "Mobile/VertexLit", 1
}
Answer by roberto_sc · Jun 08, 2013 at 03:37 AM
If you don't need the main color you can use the Unlit shader.
Your answer
![](https://koobas.hobune.stream/wayback/20220613063733im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Efficient Way to Draw Wireframes (OpenGL ES 2.0, iOS) 0 Answers
Point Light Behave different from editor and IOS device 0 Answers
iOS Shader - Emulator vs Device Inconsistency 0 Answers
Custom shader works in Unity but broken on ios/android 0 Answers
Surface lighting model 'MobileBlinnPhong' not found. 0 Answers