Making animated scrolling texture with two alpha channels.

This is a mix between “I need a scrolling texture”, and “I need two alpha channels”.

It’s much easier to accomplish this in the source engine.

I’m creating billboard fire effects. This is a simple quad with a scrolling fire texture on it. To make it look more “fire like”, I’m adding a second alpha map to create the outline, (otherwise it’s just a block of fire which looks weird).

I need to scroll the BASE TEXTURE ONLY! My current code scrolls BOTH TEXTURES! This makes it unusable.

Here’s my shader code:

 Shader "Transparent/Diffuse + Extra Alpha"
 Properties {
     _Color ("Main Color", Color) = (1,1,1,1)
     _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
     _AlphaMap ("Additional Alpha Map (Greyscale)", 2D) = "white" {}
 SubShader {
     Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
     LOD 200
 #pragma surface surf Lambert alpha
 sampler2D _MainTex;
 sampler2D _AlphaMap;
 float4 _Color;
 struct Input {
     float2 uv_MainTex;
 void surf (Input IN, inout SurfaceOutput o) {
     half4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
     o.Albedo = c.rgb;
     o.Alpha = c.a * tex2D(_AlphaMap, IN.uv_MainTex).r;
 Fallback "Transparent/VertexLit"


#pragma strict

function Start () {
 //scroll main texture based on time
 var scrollSpeed : float = .5;
 var offset : float;
 var rotate : float;
 function Update (){
     offset+= (Time.deltaTime*scrollSpeed)/10.0;
	GetComponent.<Renderer>().material.SetTextureOffset ("_MainTex", Vector2(0,-offset)); 

I’m assuming I need to change the function to only apply to one of the textures in the above shader. How do I do this?

Here’s a picture to see what it looks like for example:

I need help with this ASAP, I need to finish by tonight. Please give me a fix to my code.

can anyone please review this. I really need an answer asap.