BlendedFlatColor

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
(Removing all content from page)
m (Reverted edits by Joseph05408 (Talk); changed back to last version by NCarter)
Line 1: Line 1:
 +
== Description ==
 +
Use this shader when coloring a self illuminated transparent or solid object. It is not affected by scene lighting and does not waste GPU instructions or VRAM on a one color texture.
  
 +
== Usage ==
 +
This works well for HUD items, because it is not affected by lighting.
 +
 +
== ShaderLab - BlendedFlatColor ==
 +
<shaderlab>
 +
Shader "BlendedFlatColor" {
 +
Properties {
 +
_Color ("Main Color, Alpha", Color) = (1,1,1,1)
 +
}
 +
Category {
 +
ZWrite Off
 +
Lighting Off
 +
Tags {Queue=Transparent}
 +
Blend SrcAlpha OneMinusSrcAlpha
 +
Color [_Color]
 +
SubShader {
 +
Pass {
 +
Cull Off
 +
}
 +
}
 +
}
 +
}</shaderlab>

Revision as of 19:26, 19 October 2009

Description

Use this shader when coloring a self illuminated transparent or solid object. It is not affected by scene lighting and does not waste GPU instructions or VRAM on a one color texture.

Usage

This works well for HUD items, because it is not affected by lighting.

ShaderLab - BlendedFlatColor

<shaderlab> Shader "BlendedFlatColor" { Properties { _Color ("Main Color, Alpha", Color) = (1,1,1,1) } Category { ZWrite Off Lighting Off Tags {Queue=Transparent} Blend SrcAlpha OneMinusSrcAlpha Color [_Color] SubShader { Pass { Cull Off } } } }</shaderlab>

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox