Need Specular Decal Shader-Thingie

Howdy all,
I’m working on a Lego-style MMO and I’m trying to create texture-based clothing for the characters. I need a specular shader with an underlying “skin” color, and then a separately tinted clothing texture. I could probably do it myself eventually, but I haven’t had time to gain some experience with ShaderLab yet. If someone could knock up a shader for me, that would be really great :wink:

Edit: Managed to cobble together my own shader from the various decal textures lying around the forums and wiki. I had no idea what I was doing, but as long as it works I’m happy. Here it is, if anyone finds it useful.

Shader "Decal with Tint" { 

Properties
{ 
	_Color ("Main Color", Color) = (1,1,1)
	_DecalColor ("Decal Color", Color) = (1,1,1)
	_SpecColor ("Spec Color", Color) = (1,1,1) 
	_Emission ("Emmisive Color", Color) = (0,0,0) 
	_Shininess ("Shininess", Range (0.01, 1)) = 0.7 
	_DecalTex ("Decal (RGBA)", 2D) = ""
} 

// More than two texture units
SubShader {
Pass{
	Lighting On
	SeparateSpecular On
	Material
	{ 
		Diffuse (1,1,1) 
		Ambient (1,1,1) 
		Shininess [_Shininess] 
		Specular [_SpecColor] 
		Emission [_Emission] 
	} 
	SetTexture[_DecalTex] {Combine texture * constant constantColor [_DecalColor]}
	SetTexture[_DecalTex]
	{
		ConstantColor[_Color]
		Combine previous Lerp(previous) constant
	} 
	SetTexture[_] {Combine previous * primary Double}
}
}

// Two texture units
SubShader
{ 
	Lighting On
	Material
	{ 
		Diffuse (1,1,1) 
		Ambient (1,1,1) 
		Shininess [_Shininess] 
		Specular [_SpecColor] 
		Emission [_Emission]
	}
	Pass
	{
		SetTexture[_DecalTex]
		{
			ConstantColor[_Color]
			Combine texture Lerp(texture) constant
		}
	}
	
	// 'Double' Lighting
	Pass {Blend DstColor SrcColor}
} 

}

Hey Maroy,

Love this shader! Great work! I’m a total shader noob so is there any chance you could provide a version of this that would work with realtime shadows? Longshot i know!

Cheers! ;0)