Hi all
(sorry for my english, i try my best)
I made my own shader, very simple (i think), because i wished to mix two textures, with specular in both and alpha in second texture, but the problem is the second texture, is like self_ilum all time, and not specular affected. Here is the shader:
Shader “Specular Details” {
Properties {
_Color (“Main Color”, Color) = (1,1,1,0)
_SpecColor (“Spec Color”, Color) = (1,1,1)
_Shininess (“Shininess”, Range (0.01, 1)) = 0.7
_MainTex (“Base (RGB)”, 2D) = “white” {}
_BlendTex ("Alpha Blended (RGBA) ", 2D) = “white” {}
}
SubShader {
Pass {
Lighting On
SeparateSpecular On
Material {
Diffuse [_Color]
Ambient [_Color]
Shininess [_Shininess]
Specular [_SpecColor]
}
SetTexture [_MainTex] {
constantColor [_Color]
Combine texture * primary DOUBLE, texture * constant
}
SetTexture [_BlendTex] {
constantColor [_Color]
combine texture lerp (texture) previous
}
}
}
}
I attached and image with the result, so, you can see the darkside of a cube, the second texture is not shade. Can any one help me??
Thanks in advance
Jose