Self-Illuminated Diffuse
Reference Manual > Built-in Shader Guide > Self-Illuminated Shader Family > Self-Illuminated Diffuse

Self-Illuminated Diffuse

Self-Illuminated Properties

This shader allows you to define bright and dark parts of the object. The alpha channel of a secondary texture will define areas of the object that "emit" light by themselves, even when no light is shining on it. In the alpha channel, black is zero light, and white is full light emitted by the object. Any scene lights will add illumination on top of the shader's illumination. So even if your object does not emit any light by itself, it will still be lit by lights in your scene.

This shader is similar to a Lightmapped shader, but there are slight differences. In this shader, the illumination map uses the same UV mapping as the main texture whereas the UVs can differ in a Lightmapped shader. Lightmapped shaders can also "emit" colored light, while Self-Illuminated emits monochrome light. This shader is also a bit more compatible with older graphics cards than a Lightmapped shader.

Diffuse Properties

This shader is a Pixel-Lit shader, which is more expensive than Vertex-Lit. Pixel lighting is expensive mostly because each object has to be drawn multiple times for each pixel light that shines on it. Vertex lights don't affect the shader in this way. Pixel lights support cookies, bumpmapping, and shadows while vertex lights do not. Pixel lights are also much less sensitive to tesselation of the models - if you have a cube using this shader, you can put point light very close to its surface and it will have nice round highlight. This effect cannot be achieved with Vertex lighting.

Diffuse computes a simple (Lambertian) lighting model. The lighting on the surface decreases as the angle between it and the light decreases. The lighting depends only on the this angle, and does not change as the camera moves or rotates around.

Performance

Generally, this shader is cheap to render. For more details, please view the Shader Peformance page.